# Windows GUI

This topic is 5025 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I recently(Yesterday) purchased a book about using the GUI and MFC with Visual C++ 6(I have .net, but the .net book was REALLY expensive). I have coded quite a bit, but it has been with minimal contact with MFC and the Window GUI. I do what the book says, and, for example, the scroll bars are gray boxes, like the old ones. Not that there is anything wrong with this, but I was hoping in the least to be able to have those nice new ones that come with XP(I think they are blue-ish), and possibly to be able to change it to something else entirely. Unfortunatly, the book does not cover this, and instead prefers to use the APP Wizard to create the app, and use the visual editor to change dialogs. So, my question is this. Does anyone have any links to tutorials where I can (a) create the GUI directly from my source code without using app Wizard and the visual editor, and (b) how to get nifty XP scrollbars, progress bars, etc., and make my own. Thanks, and I apologize for any Stupidity on my part.

##### Share on other sites
Quote:
 (a) create the GUI directly from my source code without using app Wizard and the visual editor, and

You can use the win32 api function CreateWindow(..) to create any gui component in code. Read the remarks section of that page to get the classnames for the various things you might want to make.

Quote:
 (b) how to get nifty XP scrollbars, progress bars, etc., and make my own. Thanks, and I apologize for any Stupidity on my part

In Visual Studio, click Project -> Add Resoruce, select Custom, enter the type as RT_MANIFEST. Paste the following into the file it gives you (its not a normal text entry file, but dont worry):

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly    xmlns="urn:schemas-microsoft-com:asm.v1"    manifestVersion="1.0"> <assemblyIdentity     processorArchitecture="x86"     version="5.1.0.0"    type="win32"    name="test.exe"/> <description>Test Application</description> <dependency>  <dependentAssembly>    <assemblyIdentity         type="win32"         name="Microsoft.Windows.Common-Controls"         version="6.0.0.0"         publicKeyToken="6595b64144ccf1df"         language="*"         processorArchitecture="x86"/>  </dependentAssembly> </dependency></assembly>

Save everything. Now open resoruce.h (if you didn't already have one, you will now). Find the line that says

#define IDR_RT_MANIFEST1                101

(or some other number on the end), and change that number to 1. Obviously WinXP styles only work on WinXP, but on other operating systems this stuff just gets ignored.

Alan

##### Share on other sites
Thanks! *Rated you up.*

1. 1
2. 2
3. 3
4. 4
Rutin
16
5. 5

• 12
• 9
• 12
• 37
• 12
• ### Forum Statistics

• Total Topics
631414
• Total Posts
2999964
×