Solved

BPW: how to change the appearance of the

Posted on 1997-09-09
2
198 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
[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
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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

First of all let me say that the only language that I speak is English, but in answering questions here I often come across people whose English skills are not the best and I’d like to be able to communicate better with them, and the following descr…
A look at what happened in the Verizon cloud breach.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

617 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