Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Windows MinGW
Okay, this is my first questions here. I have a simple code for a program I'm creating in C++ WinAPI (no MFC or anything, just plain windows.h), and don't exactly get a few things:
 
1. Text Output or "Labels" - Which way is best? I've seen four different way of text output or so called "Labels", and none work for me.
 
2. Images in Buttons - Is this even possible? If so, how? I've tried two approaches: creating the button in my RC file, and then SendDlgItemMessage() and creating the button in the main CPP file, then SendMessage the image to the button. Neither were successful.
 
3. Dimensions & Locations - I have VS2012 Express and hate the way the IDE works, so I use Code::Blocks with MinGW. I also hate how you have to trial and error when trying to get a control in the right place in the window, so I took the dimensions and locations of my controls in VS2012 Express and used them in Code::Blocks, which didn't work. Is there a more efficient way to get controls in the right place with Code::Blocks?
 
4. Image Boxes - How the heck do these things work? I've tried to use an example, and it compiled fine in Code::Blocks & MinGW, but the image doesn't even show up in the window. What?!
 
5. Other controls - Progressbars, trackbars, etc. How do these work? Apparently I need extended control libraries to do these. Is this true?
 
6. Fonts - I've seen three ways to change fonts in a WinAPI window. Which is the best way?
 
7. Manifest - I've included my "main.xml" file in
1 24 "main.xml"
, yet my window doesn't show modern XP styles. Suggestions? Here's the code for "main.xml":
 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
    version="1.0.0.0"
    processorArchitecture="*"
    name="MobileCracks.BlueN0te.Main"
    type="win32"
/>
<description>iOS Development Tool</description>
<dependency>
    <dependentAssembly>
        <assemblyIdentity
            type="win32"
            name="Microsoft.Windows.Common-Controls"
            version="6.0.0.0"
            processorArchitecture="*"
            publicKeyToken="6595b64144ccf1df"
            language="*"
        />
    </dependentAssembly>
</dependency>
</assembly>
 
I will have more questions coming. I hope I reach my ultimate goal: creating a WinAPI window with all controls with XP/Vista styles applied. Thanks in advance, and thanks for reading.
 
~ Mike
Posted 1-Dec-12 9:58am
lmsmi1105

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 195
1 Afzaal Ahmad Zeeshan 132
2 ProgramFOX 130
3 Maciej Los 105
4 Sergey Alexandrovich Kryukov 75
0 OriginalGriff 6,564
1 Sergey Alexandrovich Kryukov 6,048
2 DamithSL 5,228
3 Manas Bhardwaj 4,657
4 Maciej Los 4,150


Advertise | Privacy | Mobile
Web02 | 2.8.1411022.1 | Last Updated 1 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100