Thread: WIN API simple programs

  1. #1
    Linux Forever
    Join Date
    Oct 2002
    Posts
    373

    WIN API simple programs

    Is there any simple programs to get me into windows programming. I don't understand half the stuff on the premade window maker.

    Is there an easy way of making a window with text on it?

    Im using Dev C++ with Mingw GNU, but i have CYGWIN as well.
    This war, like the next war, is a war to end war.

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    You might want to ask on the Windows forum... I'll move the thread over there.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    >>Is there an easy way of making a window with text on it?<<
    Code:
    #include <windows.h>
    int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
    {
    MessageBox(0, "Hello World", "Messagebox", MB_OK);
    return 0;
    }
    Is about as simple as it gets. There's a more 'standard' example of window creation by Adrianxw in this thread. Other examples can be found by searching this board.

  4. #4
    Linux Forever
    Join Date
    Oct 2002
    Posts
    373
    I can do message boxes. Ill check the other forum. Thanks
    This war, like the next war, is a war to end war.

  5. #5
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    Here's a really simple one...
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C# vs. Win API
    By golfinguy4 in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 01-27-2002, 03:29 AM
  2. Where to learn Win API?
    By Kirsis in forum Windows Programming
    Replies: 9
    Last Post: 11-27-2001, 04:01 AM
  3. Win API wildcard function??
    By Echidna in forum Windows Programming
    Replies: 5
    Last Post: 11-19-2001, 12:16 AM
  4. Win API
    By Marky_Mark in forum Windows Programming
    Replies: 4
    Last Post: 10-23-2001, 12:57 PM
  5. Rich edit control example Win API
    By Echidna in forum Windows Programming
    Replies: 1
    Last Post: 09-17-2001, 02:12 AM