Hi all,
I made a window in which curtain objects ( like buttons text fields etc. ) must disappear so other can re appear.
example:
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?
I made a window in which curtain objects ( like buttons text fields etc. ) must disappear so other can re appear.
example:
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?
Use the ShowWindow function.
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?
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.
try this simpe program see what I mean...the same button is used to start/stop a timer.
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
a winio.dll error ( i use win2k)
but i need to make them invisible because things have to appear also on the same place
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.
can you please make an example code or is it just
invoke btn1,SW_hide
?
invoke btn1,SW_hide
?
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
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
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 ?
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 ?
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
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
yeah tnx that works :D