SendMessage does not work
-
Hi , I have a embededVC code something like this: DWORD wc = WaitForMultipleObjects( sizeof(hObjectList)/sizeof(HANDLE), // number of handles in array hObjectList, // object-handle array FALSE, // wait option (DWORD) INFINITE // time-out interval ); switch ( wc) { case WAIT_OBJECT_0: break; case WAIT_OBJECT_0 + 1: //Center button if (WaitForSingleObject(hCenterState,0)==WAIT_OBJECT_0) { /*hCenterState button pushed*/ ::SendMessage(hWnd,WM_TRIGGER_PULL,0,0); } break; } the above code is in a function which is on a thread (obviously) ...(. thread is initiaited on WM_INITDILAOG of the dialog.I pass the dialog handle to the creathread function) Problem is that the SendMessage function posts a message WM_TRIGGER_PULL only for the first time i open the dialog.If i exit the dialog and then open it again , this time the SendMessage does not post the WM_TRIGGER_PULL message. i cant get y it cant post the msg the second time. Any body has solution to this is most welcome with a reply. thanks in Advance:)
-
Hi , I have a embededVC code something like this: DWORD wc = WaitForMultipleObjects( sizeof(hObjectList)/sizeof(HANDLE), // number of handles in array hObjectList, // object-handle array FALSE, // wait option (DWORD) INFINITE // time-out interval ); switch ( wc) { case WAIT_OBJECT_0: break; case WAIT_OBJECT_0 + 1: //Center button if (WaitForSingleObject(hCenterState,0)==WAIT_OBJECT_0) { /*hCenterState button pushed*/ ::SendMessage(hWnd,WM_TRIGGER_PULL,0,0); } break; } the above code is in a function which is on a thread (obviously) ...(. thread is initiaited on WM_INITDILAOG of the dialog.I pass the dialog handle to the creathread function) Problem is that the SendMessage function posts a message WM_TRIGGER_PULL only for the first time i open the dialog.If i exit the dialog and then open it again , this time the SendMessage does not post the WM_TRIGGER_PULL message. i cant get y it cant post the msg the second time. Any body has solution to this is most welcome with a reply. thanks in Advance:)
Please stop reposting. Post a question once only, else people will ignore them.
Jonathan Wilkes Darka [Xanya.net]
-
Hi , I have a embededVC code something like this: DWORD wc = WaitForMultipleObjects( sizeof(hObjectList)/sizeof(HANDLE), // number of handles in array hObjectList, // object-handle array FALSE, // wait option (DWORD) INFINITE // time-out interval ); switch ( wc) { case WAIT_OBJECT_0: break; case WAIT_OBJECT_0 + 1: //Center button if (WaitForSingleObject(hCenterState,0)==WAIT_OBJECT_0) { /*hCenterState button pushed*/ ::SendMessage(hWnd,WM_TRIGGER_PULL,0,0); } break; } the above code is in a function which is on a thread (obviously) ...(. thread is initiaited on WM_INITDILAOG of the dialog.I pass the dialog handle to the creathread function) Problem is that the SendMessage function posts a message WM_TRIGGER_PULL only for the first time i open the dialog.If i exit the dialog and then open it again , this time the SendMessage does not post the WM_TRIGGER_PULL message. i cant get y it cant post the msg the second time. Any body has solution to this is most welcome with a reply. thanks in Advance:)
read the Forum Posting Guidelines[^] PLEASE ! :(
Don't know where to start ?
Refer the Forums Guidelines and ask a friend