jwh@bodwin.ifs.umich.edu (Jim Howe) (04/04/91)
I am working on a program that requires the use of two very similar versions of a dialog. Sometimes I need to display the dialog with all controls visible, othertimes I need to hide a couple of the controls. I am having trouble getting this to work, however. Here's what I do: I load the dialog from a DLL file. (The dialog is initially not visible) If I need to hide some controls I get the window handle for each control that I want to hide and call WinShowWindow with a value of false. I then call WinShowWindow with the handle of the dialog window to make the dialog visible. When I do this, the dialog and all controls are visible. It appears that the WinShowWindow command for the dialog window uses the visibility settings found in the dialog definition and ignores the settings that I set with the previous WinShowWindow commands. Is there an easy way for me to accomplish what I want to do? In other words, is there a way to change the visibility settings for individual controls in a dialog after it has been loaded but before the dialog has become visible? Any help is appreciated. James W. Howe internet: jwh@citi.umich.edu University of Michigan uucp: uunet!mailrus!citi.umich.edu!jwh Ann Arbor, MI 48103-4943
mikem@ibmpa.awdpa.ibm.com (04/05/91)
In article <1991Apr3.215150.3623@terminator.cc.umich.edu> jwh@bodwin.ifs.umich.edu (Jim Howe) writes: >I am working on a program that requires the use of two very similar >versions of a dialog. Sometimes I need to display the dialog with >all controls visible, othertimes I need to hide a couple of the >controls. I am having trouble getting this to work, however. Here's >what I do: > Usually, your dialog window proc is where you control the windows in a dialog box. the WM_INITDLG message is where you need to set the states of your control windows. Try just disabling the controls (as opposed to hiding them) with WinEnableWindow(hwnd, FALSE). See if that gets you anywhere... Michael R. MacFaden IBM Palo Alto Marketing Systems mikem@ibmpa.awdpa.ibm.com, macfaden@paloic1.vnet.ibm.com disclaimer: what I write above is not necessarily my employer's opinion
Ramesh_Rama_Pendakur@cup.portal.com (04/10/91)
In responce to the Dialog Box Question: Try setting the item's parent to an Object window...