Solved

Visible <--> Invisible 'Edit Box'

Posted on 1998-10-03
1
270 Views
Last Modified: 2013-11-20
I would like to know how to change an 'Edit Bot' style
to invisible, from inside the c++ code. I have a dialog
box with 3 buttons. Depending on which button is pushed,
a dialog box pops up with some edit box hidden, some not.
( I want to use a precreated edit box id as 'IDC_EDIT1'. )

I would also like to know how to change the title for a
precreated dialog box from inside program code.

Thank you, Tomas
0
Comment
Question by:tko092397
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 8

Accepted Solution

by:
Answers2000 earned 100 total points
ID: 1322897
To show edit box

GetDlgItem(IDC_EDIT1)->ShowWindow( SW_SHOW ) ;

To hide edit box

GetDlgItem(IDC_EDIT1)->ShowWindow( SW_HIDE ) ;

To enable edit box

GetDlgItem(IDC_EDIT1)->EnableWindow(FALSE) ;

To disable edit box

GetDlgItem(IDC_EDIT1)->EnabbleWindow(TRUE) ;


Normally you will wish the edit box to be disabled whenever it's hidden


To change dialog title

SetWindowText( "New Title" ) ;


Any of the above will work anywhere in the dialog class provided the dialog is up (e.g. not in constructor but in response to any message such as button being clicked)
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question