I am trying to make a push button control call itself a second time by using the SendMessage function to add the second button press to the que. However this does not seem to be occuring. The reason I need to do this is because the first time the button is pressed the function initializes a routine where a second thread analyzes some data. If the data is found it sets a bit. But in order for th second thread to process the data the main thread has to finish processing the message it is currently on (ie the first button press). So if I call a second button press to occur after the first one it should detect the bit change. Does anyone know of a method that I could get this to work, or if you have a better implementation you could reccomend I am all ears.
Thanks
-geoff
Code:
case 508:
switch(setup)
{
case 0:
FindSearch=FindInBuffer("]#",2);
if(FindSearch==1)
{
MessageBox(NULL,"Prompt Check","Error",MB_OK|MB_ICONEXCLAMATION);
}
setup=1;
break;
case 1:
FindInBuffer("]#",1);
Command(" ",hwnd);
SendMessage(hwnd,WM_COMMAND,(WPARAM)NULL,(LPARAM)508);
break;
}
break;
