GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 24-Sep-2005, 23:08
The_Goat() The_Goat() is offline
New Member
 
Join Date: Sep 2005
Posts: 6
The_Goat() is on a distinguished road
Question

Help With Windows Messages System


I am working on creating a DLL for one of my programs. This DLL needs to be able to intercept certain messages bound for the parent program (WM_COMMAND messages) and process them, without removing them from the parent programs queuing process. I am using the Win32 PeekMessage() function for this. For some reason, through relentless tweaking, it fails to work. Am I doing something wrong? I will post my code if requested.

Thanks,
-The_Goat();
  #2  
Old 26-Sep-2005, 18:15
The_Goat() The_Goat() is offline
New Member
 
Join Date: Sep 2005
Posts: 6
The_Goat() is on a distinguished road
Arrow

Re: Help With Windows Messages System


I'll post that I suspect that the problem is with PeakMessage not being able to to intercept messages from the calling programs thread.

EDIT:
I will post my code.
CPP / C++ / C Code:
double checkmenu(double handle, double roof)
{
        MSG msg;//Structure for messages
        PeekMessage(&msg,(HWND)(int)handle,0,0,PM_NOREMOVE);//Load messages into msg without removing them
        if(((msg.wParam > 199)&(msg.wParam < 221))&(msg.message == WM_COMMAND))//If the wParam <221 & >199
        {
        return ((double)(int)msg.wParam);//Return the wParam value
        }
        else
        {
        return ((double)(int)0);//Otherwise return 0
        }       
}//End
 
 

Recent GIDBlogStupid Management Policies by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Command & Conquer 95 under XP dexter Computer Software Forum - Games 42 20-Sep-2008 14:30
A Question on Start Menu in Windows System Melvin Lin C++ Forum 8 04-Jul-2005 00:53
D3D error when running fullscreen games/programs - help?! daa709 Computer Hardware Forum 4 01-Jul-2005 09:03
corrupt HD / File system Hood Computer Software Forum - Windows 11 20-Jun-2005 21:33
Trouble with Windows XP vsseym Computer Software Forum - Windows 29 12-Aug-2004 04:56

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 10:54.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.