How to visible or available a Textbox in MFC ?

Light Poster
21Nov2006,21:01   #1
zippor's Avatar
I have a Textbox and a button.
When my program run, the textbox's visible (default). After the button's clicked, the textbox changes status (available).
How do i have to do? Thanks
Go4Expert Founder
21Nov2006,23:20   #2
shabbir's Avatar
Do you mean invisible? Just call the ShowWindow(SW_HIDE) for the textBox window.
Light Poster
22Nov2006,00:33   #3
zippor's Avatar
Ya, it's mean invisible, but where to call ShowWindow(SW_HIDE)? ( both of the textbox and the button belongs to be dialog).
Go4Expert Founder
22Nov2006,10:32   #4
shabbir's Avatar
If you have the DDX control of the text box then use that variable with . and ShowWindow function will be in the list.

If not you can use the GetDlgItem function to get the hwnd and then CWnd from the hWnd and then call the ShowWindow for it