🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.os2.programmer
3 messages
3 total messages Started by Jim Howe Wed, 03 Apr 1991 21:51
Dialog Box Question
#2504
Author: Jim Howe
Date: Wed, 03 Apr 1991 21:51
24 lines
1738 bytes
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         
Re: Dialog Box Question
#2512
Author: mikem
Date: Fri, 05 Apr 1991 01:32
16 lines
1460 bytes
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 
Re: Dialog Box Question
#2526
Author: Ramesh_Rama_Pendakur
Date: Wed, 10 Apr 1991 04:55
3 lines
509 bytes
In responce to the Dialog Box Question:

Try setting the item's parent to an Object window...
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads