Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Controls
  New Posts New Posts RSS Feed - Resize dialog with SetWindowPos
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Resize dialog with SetWindowPos

 Post Reply Post Reply
Author
Message
roan98dk View Drop Down
Groupie
Groupie


Joined: 13 February 2011
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote roan98dk Quote  Post ReplyReply Direct Link To This Post Topic: Resize dialog with SetWindowPos
    Posted: 17 February 2014 at 8:07am
I have a few modal CXTPDialogs in my MFC windows application, that behave strangely in random cases. My problem is that sometimes the dialog is not resized to fit the entire content.

What is common in the failing cases is that the dialog is automatically resized to fit the content. In the cases where we expand the dialog it sometimes doesn't, and in cases where we make the dialog smaller it sometimes doesn't. In cases where there is a button to enable elements that resize the dialog, there are not problems. I am talking about dialogs resized in OnInitDialog.

When it comes to this kind of behavior, I must admit that I am no C++ or MFC expert. I guess it is because I am not resizing the dialog at the right moment, but then where would be the proper location (OnSize ?)

There is also no apparent connection between where it fails and where it doesn't. Problem is that I cannot replicate the scenario in development and it happens randomly with some customers running, Windows XP, Windows 7, Windows 8, etc.

I tried to find an example, but most relate to manual resizing by dragging the dialog window, but that is not the problem here.

I am using VS2013 with the new Update 1, but I compile my solution as v120_xp to keep backwards compatibily with Windows XP. The application is an SDI Windows application with ribbon and frames around windows using the Office2010.dll style.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.