Resize dialog with SetWindowPos |
Post Reply |
Author | |
roan98dk
Groupie Joined: 13 February 2011 Status: Offline Points: 14 |
Post Options
Thanks(0)
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. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |