Secondary Thread Creating an Object Window
void thread(HWND hWnd)
{
HMQ hMsgQ; /* Message queue handle */
HWND hWindow; /* Window handles */
QMSG qMsg; /* Message queue structure */
WinRegisterClass(hAB, /* Register window class */
WCP_OBJECT, /* Class name */
(PFNWP)wpObject, /* Window procedure */
0L, /* No class style */
0); /* No extra window words */
hObject=WinCreateWindow(HWND_OBJECT, /* Create object window */
WCP_OBJECT, /* Object handle is parent */
(PSZ)0, /* No window text */
0L, /* No style */
0,0,0,0, /* No position */
NULL, /* No owner */
HWND_TOP, /* On top of siblings */
0, /* No window id */
hWnd, /* Handle in WM_CREATE */
0); /* No pres. parameters */
while (WinGetMsg(hAB, /* Loop until WM_QUIT */
&qMsg,
(ULONG)0,
0, 0))
WinDispatchMsg(hAB, &qMsg);
WinDestroyWindow(hObject); /* Destroy object window */
WinDestroyMsgQueue(hMsgQ); /* Destroy message queue */
_endthread(); /* Terminate thread */
}
[Back: Creating a Thread With an Object Window]
[Next: Sample Object Window Procedure]