Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Visible <--> Invisible 'Edit Box'

Posted on 1998-10-03
1
Medium Priority
?
283 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 400 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Suggested Courses

670 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