This may be the wrong forum for this, if it is, point me in the right direction.
Here is a section of code that is giving me hassle.
This is an existing project, that already hs a winmain, and a primary window. What I am trying to do is create another window to interact with. Thus far, my efforts have been futile.
Here is a section of code that is giving me hassle.
Code:
extern HINSTANCE hInst; // This instance
extern HWND hWndMain; // Handle to Drawing window
BOOL MyFunc(void)
{
BOOL fStatus;
BOOL fOkay;
int iStatus;
int iDebug; // Debug output flag
char szAppName[] = "Viewer";
HWND hwnd; //Window handle
MSG msg;
WNDCLASS wndclass;
HDC hdc; // Window DC
DOCINFO di; // Document data
HINSTANCE hInstance = (HINSTANCE)GetModuleHandle(NULL);
wndclass.style = CS_HREDRAW | CS_VREDRAW;
wndclass.lpfnWndProc = WndProc;
wndclass.cbClsExtra=0;
wndclass.cbWndExtra=0;
wndclass.hInstance=hInstance;
wndclass.hIcon=LoadIcon (NULL, IDI_APPLICATION);
wndclass.hCursor=LoadCursor (NULL,IDC_ARROW);
wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH);
wndclass.lpszMenuName=szAppName;
wndclass.lpszClassName = szAppName;
hwnd = CreateWindow(szAppName,TEXT("Viewer"),
WS_OVERLAPPEDWINDOW, //dwStyle
CW_USEDEFAULT, //x
CW_USEDEFAULT, //y
CW_USEDEFAULT, //nWidth
CW_USEDEFAULT, //nHeight
NULL,
NULL,
hInstance,
NULL);
ShowWindow(hwnd,SW_SHOWNORMAL);
UpdateWindow(hwnd);
fOkay = 1; //forcing it for debugging
return(fOkay);
}
This is an existing project, that already hs a winmain, and a primary window. What I am trying to do is create another window to interact with. Thus far, my efforts have been futile.