Doomulation
?????????????????????????
I was wondering because I've been trying to do it forever now...
how is the message pump done? The one that translates and dispatches messages from the applications message quene? Looking at a normal, non-MFC app, it looks like this:
However, anytime I try to do a similar message pump - anywhere - anyhow, it just freezes the window. I don't know how to now make it this way. I've tried putting an additional thread; but to no avail. Usually, the message pump I use looks like this:
(Yeah, it's the chip8 emulator.)
And...besides that, I can't seem to create a window using windows api. The only possible way I found of doing it was using the CreateDialog macro. The CreateWindow always fails with ret code 1400.
What am I doing wrong here? I desperatly need to get the message pump working while not blocking the application's main window.
how is the message pump done? The one that translates and dispatches messages from the applications message quene? Looking at a normal, non-MFC app, it looks like this:
Code:
while( PumpMessage(...) )
{
TranslateMessage(...);
DispatchMessage(...);
}
However, anytime I try to do a similar message pump - anywhere - anyhow, it just freezes the window. I don't know how to now make it this way. I've tried putting an additional thread; but to no avail. Usually, the message pump I use looks like this:
Code:
while (!bExit)
{
cpu();
CheckInput();
...
(code as shown above)
}
And...besides that, I can't seem to create a window using windows api. The only possible way I found of doing it was using the CreateDialog macro. The CreateWindow always fails with ret code 1400.
What am I doing wrong here? I desperatly need to get the message pump working while not blocking the application's main window.