Solved

BPW: how to change the appearance of the

Posted on 1997-09-09
2
191 Views
Last Modified: 2012-06-21
I would like to change the appearance of the main window of my program
simply pressing a button. The main window of my program is a dialog-window
and I'd like it to show itself in three different "views":
1) normal view
2) extended view (with a list box instead of a drop down list combo)
3) reduced view (very little, with few buttons)
I know how to load one of these three views when the program starts, but I
don't know how to change through them during program execution.
Each view has a different associated dialog resource.
0
Comment
Question by:mauromol
2 Comments
 

Accepted Solution

by:
TETARD earned 100 total points
ID: 1215640
First of all, you have in your resource file to create all the controls which can appear.

In your Dialog SetupWindow ou resource, you have to select the visible and invisible controls.
When you want to make some controls visible/Invisible, use :
ShowWindow(GetDlgWindow(HWindow, ID of Control), False/True);
EnableWindow(GetDlgItem(HWindow, ID of control), False/True); {This to prevent Tab to set focus on invisible control}

Of course, you can't transform a list box into another type of list box so both must exist and insert item in both simultaneously.

To change the size of Dialog boxes at run time, I don't have the answer but I know that this is described in the Microsoft KB : have a look to :
www.microsoft.com/kb/default.asp and select Windows 16-bits SDK as a product then search for it.
0
 

Author Comment

by:mauromol
ID: 1215641
Hello Tedard. Thank you for your answer: I understood all that you wrote. But I would need some further clarifications: what if I want to change the size of the window, too? And what if I need to place different controls in the same window location, depending on the selected view? (i.e.: in the normal view I'd like to put a drop down combo box in (x, y), while I'd like to put in its place a static control when the user switches to the extended view) Remember that my main window is a dialog-window, not a normal window!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In this article, I will show you HOW TO: Suppress Configuration Issues and Warnings Alert displayed in Summary status for ESXi 6.5 after enabling SSH or ESXi Shell.
A Short Story about the Best File Recovery Software – Acronis True Image 2017
This video discusses moving either the default database or any database to a new volume.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now