Click here to Skip to main content
13,051,502 members (55,722 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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">
<description>iOS Development Tool</description>

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 8:58am

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 1 Dec 2012
Copyright © CodeProject, 1999-2017
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