Variables in Message Box

This is a discussion on Variables in Message Box within the Windows Programming forums, part of the Platform Specific Boards category; How can I print a variable in a Message Box?...

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    202

    Variables in Message Box

    How can I print a variable in a Message Box?

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    From MSDN


    int MessageBox(
    HWND hWnd, // handle of owner window
    LPCTSTR lpText, // address of text in message box
    LPCTSTR lpCaption, // address of title of message box
    UINT uType // style of message box
    );
    If the variable is a pointer to a string, then put it into the second param.....


    If its say an int, you could use sprintf() to put it into a string....

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Desperate Over Ecs!
    By cookie in forum C Programming
    Replies: 17
    Last Post: 07-16-2008, 01:25 PM
  2. Making a script language?
    By Blackroot in forum Game Programming
    Replies: 10
    Last Post: 02-16-2006, 01:22 AM
  3. Message Box in C++
    By Yuri in forum C++ Programming
    Replies: 11
    Last Post: 08-19-2005, 11:43 AM
  4. Capture Enter key press in EDIT Box
    By richiev in forum Windows Programming
    Replies: 4
    Last Post: 07-14-2005, 12:03 AM
  5. Dialog In Message Box
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 03-23-2002, 09:35 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21