C / C++ / MFC
|I prepared (in Visual Studio 2003 + MFC) "Dialog Based" Application. Now, I have one dialog window where I want to add two book marks.
I have two objects:
class DlgPage1 : public CPropertyPage
// variable mPage1
class DlgPage2 : public CPropertyPage
// variable mPage2
In the resource window I have done two dialogs with properties:
Style = child
Border = thin
TitleBar = true
Disabled = true
In the OnInitDialog (main window) function I have code:
mPropertySheet = new CPropertySheet("Simple PropertySheet");
mPage1 = new DlgPage1();
mPage2 = new DlgPage2();
mPropertySheet->Create(this, WS_CHILD | WS_VISIBLE, 0);
// now, I want to resize windows for almost maximum size
int Width = rect.Width()-7;
int mHeight = rect.Height()-7;
mPropertySheet->SetWindowPos(NULL, 7, 7, mWidth, mHeight, SWP_NOZORDER);
The SetWindowPos doesn't do what I expect.
Why the windows doesn't resize?
It has the size - I designed in the Resource.
General News Suggestion Question Bug Answer Joke Praise Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.