Thread: Win32 Help

  1. #1
    Registered User mikeman118's Avatar
    Join Date
    Aug 2007
    Posts
    183

    Win32 Help

    Hi,

    I am learning Win32 through some of the tutorials on the Internet, and I feel stupid asking this question, but I have so far not found an answer to it. All that I want to know is how to output text to the window - I've been able to make buttons and do a lot of other things but I just can't find how to output text! I just want to be able to write instructions or something next to a button. Thanks in advance.

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Probably the simplest way is creating a static control and setting its text. For labels and such, it's also the best way. The control takes care of line breaking and such.

    More complex ways involve APIs like TextOut or DrawText.


    Moving this to Windows Programming.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    [quote=CornedBee;666817]
    More complex ways involve APIs like TextOut or DrawText.
    [\quote]

    More complex??? Drawtext is nearly as simple as printf

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Well, yeah, it does a lot of text formatting. But it wants complicated parameters.

    Compared to static controls (when working with dialog resources) that's very complicated.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Console program to Win32
    By Ducky in forum Windows Programming
    Replies: 3
    Last Post: 02-25-2008, 12:46 PM
  2. Win32 API or Win32 SDK?
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 07-20-2005, 03:26 PM
  3. Win32 Thread Object Model Revisted
    By Codeplug in forum Windows Programming
    Replies: 5
    Last Post: 12-15-2004, 08:50 AM
  4. OLE Clipboard :: Win32 API vs. MFC
    By kuphryn in forum Windows Programming
    Replies: 3
    Last Post: 08-11-2002, 05:57 PM
  5. Win32 API Tutorials?
    By c++_n00b in forum C++ Programming
    Replies: 9
    Last Post: 05-09-2002, 03:51 PM