|
-
September 12th, 2007, 08:08 AM
#1
LoadFrame, but hidden
Hello. I have a 3rd-party MFC-app. I thought this was a simple task: I want to run the app with the main-window hidden.
So I want to CTheApp::InitInstance() where the main-window is created:
Code:
if (pFrame->LoadFrame(IDR_MAINFRAME,
WS_OVERLAPPEDWINDOW, NULL,
NULL))
{
if (bShow)
{ pFrame->ShowWindow(SW_SHOW);
pFrame->UpdateWindow();
}
else
pFrame->ShowWindow(SW_HIDE);
}
Depending on bShow, the window should be visible or hidden.
This works in general, but LoadFrame shows the window and ShowWindow(SW_HIDE) is hiding it again, so that the user sees the window for a short time. How is it possible to hide the window from the start?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|