Original Post
I'm creating an installer in C++ (or at least I'm trying to...) I messed around a bit to get the standard Win32 application to display a bitmap on the main window. Now I'd like a child window on top of the main window that is borderless! I couldn't actually find any examples of this on Google Image Search, so I made a mockup:
; This is what my InitInstance() function looks like: The child window still doesn't display! Why is this?
; This is what my InitInstance() function looks like: //
// FUNCTION: InitInstance(HINSTANCE, int)
//
// PURPOSE: Saves instance handle and creates main window
//
// COMMENTS:
//
// In this function, we save the instance handle in a global variable and
// create and display the main program window.
//
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
HWND hWnd;
HWND ChildWnd;
hInst = hInstance; // Store instance handle in our global variable
hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
ChildWnd = CreateWindow(szChldWndClass, szTitle, WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, WS_VISIBLE | WS_CHILD | BS_VCENTER | BS_CENTER,
500, 100, NULL, NULL, hInst, NULL);
if (!hWnd)
{
return FALSE;
}
ShowWindow(hWnd, nCmdShow);
ShowWindow(ChildWnd, nCmdShow);
UpdateWindow(hWnd);
UpdateWindow(ChildWnd);
return TRUE;
}