How to visible or available a Textbox in MFC ?

zippor's Avatar
Light Poster
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
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Do you mean invisible? Just call the ShowWindow(SW_HIDE) for the textBox window.
zippor's Avatar
Light Poster
Ya, it's mean invisible, but where to call ShowWindow(SW_HIDE)? ( both of the textbox and the button belongs to be dialog).
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
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