How to remember the size of a dialog
Posted on 2002-07-10
I have a resizable dialog. I want the size of the dialog to be remembered so that the next user open the dialog, it is in the customized size. So, I made two member viable in the dialog class: m_DialogWidth and m_DialogHeight. The question is in what function I should change the values of m_DialogWidth and m_DialogHeight? I tried OnSize(UINT nType, int cx, int cy) function of the dialog but it does not work. Because before the dialog is displayed, OnSize is called with some default width and height values. So m_DialogWidth and m_DialogHeight are always the default values not the customized values. Can anyone recommed me how to do this? Thanks!