
i
i
i
i
i
i
i
i
16.5. A Stereoscopic Movie Player 453
#include " .... // Header files
HINSTANCE hInstance = NULL; // global variables
unsigned char
*
ScreenL=NULL,
*
ScreenR=NULL; // Left and Right buffers
long X=0,Y=0; // Movie size
HWND hWndMain=NULL,hWndDisplay=NULL; // Window handles
// Windows classes for main and child windows
WNDCLASSEX wc1 = {...}, wc2 = { ... };
INT WINAPI WinMain(...){ // application entry point
..
CoInitialize (NULL); // initialize the COM mechanism
RegisterClass(&wc1);
hWndMain = CreateWindow(... // main window
while(1){
.. // Message loop
}
..
CoUninitialize(); // finished with COM
return 0L;
}
LRESULT WINAPI MainWindowMsgProc(...){ // Handle ...