Thread: Variables in Message Box

  1. #1
    Registered User
    Join Date
    Nov 2001

    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
    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, 02: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, 10:35 AM