Contents of the EXPAND.DOC file
Question: How can I make a Dialog Box expand like Excel uses for
it's Fonts Dialog Box?
Here are the steps necessary in order to do this.
1] Make your dialog box in the RC file smaller than what
it should be so that it not show, "hide", the other controls.
2] Disable the "hidden" controls in the RC file so that using
the TAB key or other neumonic keys will not give them the focus.
When the person presses the desired "expand" key:
3] Disable the "expand" key.
4] Enable the other controls.
5] Set the focus on the control you want to now have the focus.
6] Use the following function to get the current origin of the Dialog.
] Use the following function to then expand the dialog to it's
MoveWindow(hWndDlg, r.left,r.top, r.right-r.left,
(r.bottom-r.top)+14, TRUE );
] Replace the "+14" with the desired depth.
That is all that is necessary. Note that you can also expand
in any direction that you want with the MoveWindow function.