Solved

Visible <--> Invisible 'Edit Box'

Posted on 1998-10-03
1
262 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Get filename and folder into excel 7 89
notReplace  challenge 53 153
if loop in java 3 174
Problem to App 4 145
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.

739 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