Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

BPW: how to change the appearance of the

Posted on 1997-09-09
2
Medium Priority
?
201 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 200 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Did you know there are services out there that can turn an Instagram feed into an RSS feed? I found some interesting exclusive Instagram content which I wanted to follow without signing up for yet another social media account. RSS to the rescue!
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

877 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