I'm using PeekMessage in my message queue, but try to filter any messages not needed. For example, I tell my program to ignore any key-down messages because I handle input differently.
Recently, however, I've been getting messages reguardless of my not interacting with the program at all. The three messages in particular it's picking up have the message numbers 15, 49417, and 49420.
Message number 15 coorisponds to the WM_PAINT message, which I understand as my program is using BitBlt to place things on the screen. However, I don't know what the other two numbers coorispond to, or why they haven't disrupted my program before now.
Here's some sample code:
Recently, however, I've been getting messages reguardless of my not interacting with the program at all. The three messages in particular it's picking up have the message numbers 15, 49417, and 49420.
Message number 15 coorisponds to the WM_PAINT message, which I understand as my program is using BitBlt to place things on the screen. However, I don't know what the other two numbers coorispond to, or why they haven't disrupted my program before now.
Here's some sample code:
Code:
totalTime = GetTickCount();
currentTick = GetTickCount();
elapsedTime = 2000;
running = true;
int numFrames = 0;
int numUpdates = 0;
int numMessages = 0;
vector<UINT>*messages = new vector<UINT>();
UINT check = WM_PAINT;
while(running)
{
currentTick = GetTickCount();
if( PeekMessage( &lpMsg, NULL, 0U, 0U, PM_REMOVE ) &&
lpMsg.message != WM_KEYDOWN &&
lpMsg.message != WM_KEYUP &&
lpMsg.message != WM_MOUSEMOVE)
{
TranslateMessage( &lpMsg );
DispatchMessage( &lpMsg );
numMessages++;
messages -> push_back(lpMsg.message);
}
else
{
update();
numUpdates++;
}
numFrames++;
if(keyboard -> keyIsDown(VK_ESCAPE))
running = false;
while((GetTickCount() - currentTick) < ((1 / 60.0) * 100))
running = running;
elapsedTime = GetTickCount() - currentTick;
}
for(int x = 0; x < messages -> size(); x++)
check = (UINT)(messages -> at(x));
delete messages;