Resize dialog 
Author Message
 Resize dialog

Hi everybody!
I have problem with a modal dialog. What I want to do is simple, I would
like the dialog be create in a size decided by me. I have tried the
following:

//In the parent dialog
CInfoBar infoBar;
 infoBar.m_rectArea = rect;    // rect is the size I want the new dialog to
have
 infoBar.DoModal();

// In the dialog I want to resize. I have tried to put this code in
OnCreate, OnInitialUpdate and OnShowWindow. OnCreate isn't called at all,
the othe r two funtions are called but nothing happends
SetWindowPos(this,
                 m_rectArea.left,
                 m_rectArea.top,
                 m_rectArea.Width(),
                 m_rectArea.Height(),
                 SWP_SHOWWINDOW);

The dialog is created for a few milliseconds in my preferd size, then it is
maximized. What am I doing wrong?

Regards,
Markus



Fri, 04 Jun 2004 23:56:02 GMT  
 Resize dialog

Quote:
> // In the dialog I want to resize. I have tried to put this code in
> OnCreate, OnInitialUpdate and OnShowWindow. OnCreate isn't called at all,
> the othe r two funtions are called but nothing happends

Try OnInitDialog (WM_INITDIALOG). I am not sure if it helps, but I
successfully did most of my initialisations at this entry point.

Yours DW.



Sat, 05 Jun 2004 15:43:54 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Resize Dialog and Controls

2. Resizing Dialog/Controls

3. Resize Dialog with Controls

4. resizing dialog dynamically

5. Behaviour of resizing dialog

6. resizing dialogs

7. resize dialogs and button position problem

8. Resize Dialog Box via Code :: MFC

9. Resize dialog although WS_BORDER removed

10. Resizing dialog

11. Question on resizing dialog box

12. Prevent User from resizing dialog too small

 

 
Powered by phpBB® Forum Software