From GS email support:
"you must not name your function "ScanMessage" because
there's already a function pointer of this name (see manual). And you'll
need that pointer for implementing a message loop."
AND
"You must not have a default case, and not call DefWindowProc. Otherwise
the Windows Message loop is called twice for most messages, with
undesired effects."

@TWO: are you sure that your implementation of ScanMessage works? I noticed that most of your callbacks do default things (like exit)

How do you use the ScanMessage function pointer to implement the message loop?

I assumed it was something like this, but it's still not working (MyMessageFunction should cause a beep and error message when the window is resized):
Code:
 
#include <acknex.h>
#include <windows.h>

long MyMessageFunction(UINT message, WPARAM wParam, LPARAM lParam);

function main() {
ScanMessage=MyMessageFunction;
while(1) {
wait(1);
}
}

long MyMessageFunction(UINT message, WPARAM wParam, LPARAM lParam){
switch(message){
case WM_SIZE:
beep();
error("resized");
return(0);
}
}



Last edited by yorisimo; 09/27/07 21:55.