Results 1 to 6 of 6
  1. #1
    VvITylerIvV's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Location
    The streets
    Posts
    668
    Reputation
    5
    Thanks
    61
    My Mood
    In Love

    question about message boxes

    [php]
    #include <windows.h> // include the basic windows header file

    // the entry point for any Windows program
    int WINAPI WinMain(HINSTANCE hInstance,
    HINSTANCE hPrevInstance,
    LPSTR lpCmdLine,
    int nShowCmd)
    {
    // create a "Hello World" message box using MessageBox()
    MessageBox(NULL,
    L"Hello World!",
    L"Just another Hello World program!",
    MB_ICONEXCLAMATION | MB_CANCELTRYCONTINUE);

    return 0;
    }
    [/php]

    How do I make stuff happen when yes, no, cancel is pushed?

    I know it would have to do with the if statement but where would I use it? just getting into windows programming now. (skipped void, classes and all that stuff for now, going to get back to it tomorow)
    Favourite quotes:

    Code:
    I don't need easy, I just need possible. ~ Me 
    
    There are three birds on a fence. Two decide to fly away, how many are left? Three, just because you decide to do something doesn't mean you've done it. ~ Don't know who said this
    
    Do not go where the path may lead, go instead where there is no path and leave a trail. ~ Ralph Waldo Emerson
    Quote Originally Posted by VirtualSia View Post
    You both have a very weird and awkward view on Computer science.
    Computer science is about computing, which is programming.
    Definition of computing: The use or operation of computers.
    Turning on my computer = computing = programming
    LAWLFAIL

  2. #2
    Kallisti's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    深い碧の果てに
    Posts
    4,019
    Reputation
    52
    Thanks
    376
    My Mood
    In Love
    I think you should finish C++ before going into APIs

    未来が見えなくて怖いから
    未来が見えてしまって悲しいから
    目を閉じて優しい思い出に浸ってしまう




  3. #3
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    MSDN is your god: https://msdn.microsof*****m/en-us/libr...8VS.85%29.aspx

    If a message box has a Cancel button, the function returns the IDCANCEL value if either the ESC key is pressed or the Cancel button is selected. If the message box has no Cancel button, pressing ESC has no effect.

    If the function fails, the return value is zero. To get extended error information, call GetLastError.

    If the function succeeds, the return value is one of the following menu-item values.
    Return code/value Description

    IDABORT
    3



    The Abort button was selected.

    IDCANCEL
    2



    The Cancel button was selected.

    IDCONTINUE
    11



    The Continue button was selected.

    IDIGNORE
    5



    The Ignore button was selected.

    IDNO
    7



    The No button was selected.

    IDOK
    1



    The OK button was selected.

    IDRETRY
    4



    The Retry button was selected.

    IDTRYAGAIN
    10



    The Try Again button was selected.

    IDYES
    6



    The Yes button was selected.
    Ah we-a blaze the fyah, make it bun dem!

  4. The Following User Says Thank You to Hell_Demon For This Useful Post:

    VvITylerIvV (08-07-2010)

  5. #4
    VvITylerIvV's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Location
    The streets
    Posts
    668
    Reputation
    5
    Thanks
    61
    My Mood
    In Love
    Quote Originally Posted by Kallisti View Post
    I think you should finish C++ before going into APIs
    And I know that... I already know how to create a simple window I was curious and went ahead and read that. But my current c++ TBQ isn't all that great. I want it to be slightly better, with a message box rather then the console. I'm going to implement all the stuff I missed into the message box game. It's just a learning process.

    Quote Originally Posted by Hell_Demon View Post
    MSDN is your god: MessageBox Function (Windows)

    If a message box has a Cancel button, the function returns the IDCANCEL value if either the ESC key is pressed or the Cancel button is selected. If the message box has no Cancel button, pressing ESC has no effect.

    If the function fails, the return value is zero. To get extended error information, call GetLastError.

    If the function succeeds, the return value is one of the following menu-item values.
    Return code/value Description

    IDABORT
    3



    The Abort button was selected.

    IDCANCEL
    2



    The Cancel button was selected.

    IDCONTINUE
    11



    The Continue button was selected.

    IDIGNORE
    5



    The Ignore button was selected.

    IDNO
    7



    The No button was selected.

    IDOK
    1



    The OK button was selected.

    IDRETRY
    4



    The Retry button was selected.

    IDTRYAGAIN
    10



    The Try Again button was selected.

    IDYES
    6



    The Yes button was selected.
    Thank you very much ) that msdn website really helped as did your explanation.
    Favourite quotes:

    Code:
    I don't need easy, I just need possible. ~ Me 
    
    There are three birds on a fence. Two decide to fly away, how many are left? Three, just because you decide to do something doesn't mean you've done it. ~ Don't know who said this
    
    Do not go where the path may lead, go instead where there is no path and leave a trail. ~ Ralph Waldo Emerson
    Quote Originally Posted by VirtualSia View Post
    You both have a very weird and awkward view on Computer science.
    Computer science is about computing, which is programming.
    Definition of computing: The use or operation of computers.
    Turning on my computer = computing = programming
    LAWLFAIL

  6. #5
    Auxilium's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    深い碧の果てに
    Posts
    4,518
    Reputation
    445
    Thanks
    609
    My Mood
    Happy
    Whats the "message box game"

  7. #6
    VvITylerIvV's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Location
    The streets
    Posts
    668
    Reputation
    5
    Thanks
    61
    My Mood
    In Love
    Quote Originally Posted by Koreans View Post
    Whats the "message box game"
    Just basically a game where answer yes or no to questions... the same as my console application, but in message boxes instead
    Favourite quotes:

    Code:
    I don't need easy, I just need possible. ~ Me 
    
    There are three birds on a fence. Two decide to fly away, how many are left? Three, just because you decide to do something doesn't mean you've done it. ~ Don't know who said this
    
    Do not go where the path may lead, go instead where there is no path and leave a trail. ~ Ralph Waldo Emerson
    Quote Originally Posted by VirtualSia View Post
    You both have a very weird and awkward view on Computer science.
    Computer science is about computing, which is programming.
    Definition of computing: The use or operation of computers.
    Turning on my computer = computing = programming
    LAWLFAIL

Similar Threads

  1. Question about the box Trick ( mutation mode )
    By TheLeader2 in forum CrossFire Glitches
    Replies: 4
    Last Post: 08-06-2010, 04:48 PM
  2. Question About Invisible Hack
    By wafflele in forum WarRock - International Hacks
    Replies: 14
    Last Post: 08-06-2006, 12:40 AM
  3. A question about NFV2
    By vomer in forum WarRock - International Hacks
    Replies: 19
    Last Post: 08-02-2006, 06:02 PM
  4. Questions about making colored models
    By zelda803 in forum WarRock - International Hacks
    Replies: 2
    Last Post: 02-04-2006, 06:36 PM
  5. question about zoom
    By yocinfluence in forum WarRock - International Hacks
    Replies: 4
    Last Post: 01-26-2006, 10:12 PM