How to modify size of a dialog based application?
I have a dialog based application that is very similar to "Find" of the Windows Explorer. When I start the application I want the dialog to have a size such that a list control at the bottom is hidden until I press the button "Find". At this time I want to resize my dialog (application window) and display the results in my list control. How can I achieve this? I have tried MoveWindow and SetWIndowPos and none of them work. Any help will be greatly appreciated. Thanks,
KAF
another way to do it, instead of resizing.
//Instead of resizing the window, you may do the following.
class CMyDlg: public CDialog
{
....
....
CListCtrl m_list;
.....
...
..
...
..
};
void CMyDialog::OnInitDialog()
{
...
...
//add the following line.
m_list.ShowWindow(SW_HIDE);
}
void CMyDialog::OnFind()
{
...
//add the following line.
m_list.ShowWindow(SW_SHOW);
}
Re: How to modify size of a dialog based application?
MoveWindow must work.
Try to write after it
PostMessage(WM_PAINT);
WBR Oak