Solved

BPW: how to change the appearance of the

Posted on 1997-09-09
2
192 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Disable ctrl+alt+del 7 676
USB Flash Drive Serial Numbers 9 3,901
Utf8 encode 2 568
Can C++Builder Form Application wait until termination on command prompt ? 6 355
In 2017, ransomware will become so virulent and widespread that if you aren’t a victim yourself, you will know someone who is.
A customer recently asked me about anti-malware and the different deployment options available for his business. Daily news about cyberattacks, zero-day vulnerabilities, and companies that suffered a security breach made him wonder if the endpoint a…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

895 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