Click to See Complete Forum and Search --> : How to modify size of a dialog based application?
April 9th, 1999, 11:16 AM
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
Mallik Bulusu
April 9th, 1999, 04:07 PM
//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);
}
Oak
April 11th, 1999, 07:43 PM
MoveWindow must work.
Try to write after it
PostMessage(WM_PAINT);
WBR Oak
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.