Hi all,

I made a window in which curtain objects ( like buttons text fields etc. ) must disappear so other can re appear.


If i choose an menubar option email. ( of my program )
all current objects must disappear and all email object must appear.

then when i choose notepad in de menubar ( of my program ) all email objects wil disappear and notepad object will appear.

how can i make those objects disappear en reappear?
Posted on 2002-07-07 15:00:49 by Bolle
Use the ShowWindow function.
Posted on 2002-07-07 15:41:23 by Sephiroth3
But that does the whole window i only need to control some objects. how do i make a push button dissapear. so when i push that button that it disappear from the window?
Posted on 2002-07-07 15:45:51 by Bolle
Instead of showing/hiding why not reuse the buttons.
try this simpe program see what I mean...the same button is used to start/stop a timer.
Posted on 2002-07-07 16:04:35 by MArtial_Code
your program doesn't work O_o
a winio.dll error ( i use win2k)

but i need to make them invisible because things have to appear also on the same place
Posted on 2002-07-07 16:18:10 by Bolle
ShowWindow isn't only used for the main app window. A control like buttons, edit boxes are considered windows. Use SW_HIDE as your second parameter while your first parameter is the handle to the button control.
Posted on 2002-07-07 16:35:48 by stryker
can you please make an example code or is it just

invoke btn1,SW_hide

Posted on 2002-07-07 16:43:35 by Bolle

Take a look at this example.

I use a dialog box.

To get the handle of the button :
invoke GetDlgItem,IDB_OK
mov hButton,eax

To hide the button :
invoke ShowWindow,hButton,SW_HIDE
Posted on 2002-07-07 18:04:20 by Jurgen
jmp @F
Butn1 db "&Mail",0
Butn2 db "&System Stats",0
Butn3 db "&Zip",0
Butn4 db "&Chat",0
Butn5 db "&MatrixNet",0
Butn6 db "&Rooster",0
Butn7 db "&Cijfers",0
Butn8 db "&NotePad",0

invoke PushButton,ADDR Butn1,hWin,660,30,100,25,500
invoke PushButton,ADDR Butn2,hWin,660,60,100,25,500
invoke PushButton,ADDR Butn3,hWin,660,90,100,25,500
invoke PushButton,ADDR Butn4,hWin,660,120,100,25,500
invoke PushButton,ADDR Butn5,hWin,660,150,100,25,500
invoke PushButton,ADDR Butn6,hWin,660,180,100,25,500
invoke PushButton,ADDR Butn7,hWin,660,210,100,25,500
invoke PushButton,ADDR Butn8,hWin,660,240,100,25,500

This is what i use in my assembler file. I didn't use it in my resc.rc file so how do i get the handle of them and how do i make them invisible ?
Posted on 2002-07-07 18:17:18 by Bolle
Do you have documentation of the PushButton function ?

normaly, this function would return the handle of the button in eax.
I'm not sure, i never used this.

invoke pushbutton ....
mov hButton,eax
Posted on 2002-07-07 18:37:09 by Jurgen
yeah tnx that works :D
Posted on 2002-07-08 03:45:09 by Bolle