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.
|