From: r_z_aret on 16 Feb 2010 14:03 On Tue, 16 Feb 2010 02:31:10 +0100, "Larry" <dontmewithme(a)got.it> wrote: >How to make a Dialog resizable > >Hi, > > I am dealing with dialog window created usign ResEdit as a resource >editor. Now, I'd need to make a window resizable and to have all the child >controls in it resize themselves according to the dialog size. Can iy >actually be done? I do it all the time, but for multiple reasons, I can't share the code. Nothing very deep. Just a lot of grunt work. You need to handle WM_SIZE messages for the dialog, get the dimensions of the dialog, and then use MoveWindow and/or SetWindowPos to resize and move the controls. > > >This is the code for the dialog: > >[code] >// >// Dialog resources >// > >IDD_POPUP DIALOG 25, 25, 485, 254 >STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | >WS_SYSMENU >CAPTION "List View Window" >FONT 8, "MS Shell Dlg" >BEGIN > CONTROL "", IDC_LIST1, WC_LISTVIEW, WS_TABSTOP | WS_BORDER | >LVS_ALIGNLEFT | LVS_REPORT, 4294967294, 4294967295, 489, 230 >END >[/code] > >thanks ----------------------------------------- To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message). Robert E. Zaret, eMVP PenFact, Inc. 20 Park Plaza, Suite 400 Boston, MA 02116 www.penfact.com Useful reading (be sure to read its disclaimer first): http://catb.org/~esr/faqs/smart-questions.html
First
|
Prev
|
Pages: 1 2 Prev: U++ 2070 released Next: How to compile COM components written in VC6.0 in Visual Studio 2010 |