Solved

BPW: how to change the appearance of the

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Unsigned int64 to unsigned int32 10 1,705
SQL Query issue 13 404
Getting XML string from response stream using Indy's IDTCPClient 1 841
Copy file in dll not working but working on exe ! 18 95
ConnectWise and their customers need to ensure critical alerts automatically reach the right person at the right time. MSP superheros efficiently respond to these alerts key is providing automatic, intelligent alerting that generates a complete audi…
The advancement in technology has been a great source of betterment and empowerment for the human race, Nevertheless, this is not to say that technology doesn’t have any problems. We are bombarded with constant distractions, whether as an overload o…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

808 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