The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Derry on August 23, 2005, 07:26:18 AM

Title: Checkbox visibility
Post by: Derry on August 23, 2005, 07:26:18 AM
Hi all
Newbie question
How do I access the visible property of a checkbox at runtime
I don't wish to set it to gray with BST_INDETERMINATE
I want to make it visible or invisible depending on some condition
I have searched the forumĀ  :tdown
Thanks

Derry
Title: Re: Checkbox visibility
Post by: Tedd on August 23, 2005, 09:04:16 AM
Use the ShowWindow function :wink
Title: Re: Checkbox visibility
Post by: Derry on August 23, 2005, 10:10:36 AM
Hi Tedd
ShowWindow sets a windows state - minimized,maximized,hide etc
It's not for controls

Thanks anyway

Derry
Title: Re: Checkbox visibility
Post by: ramguru on August 23, 2005, 12:29:46 PM
Every control: button,edit-box...is a window with some extra features, you may not realize it yet. Tedd is right :)
Title: Re: Checkbox visibility
Post by: diablo2oo2 on August 23, 2005, 01:09:20 PM
i also use ShowWindow to hide/show window controls.its very simple

invoke GetDlgItem,hwnd,CONTROL_ID
invoke ShowWindow,eax,SW_HIDE
Title: Re: Checkbox visibility
Post by: Mark Jones on August 23, 2005, 01:31:52 PM
I'm curious, is that how "tabs" work internally? Just shows/hides blocks of controls?
Title: Re: Checkbox visibility
Post by: ramguru on August 23, 2005, 01:49:05 PM
Yes, this is also truth ,Mark Jones. There are 2 ways (AFAIK) it can be accomplished: you can show/hide every control; you can show/hide dialog that can hold plenty of them... The 2nd way is my favourite one.
Title: Re: Checkbox visibility
Post by: Derry on August 23, 2005, 03:59:37 PM
Thanks diablo2oo2
problem solved - i also use ShowWindow to hide/show window controls.its very simple
when you know how :U
Derry