Buttons

This is a discussion on Buttons within the Windows Programming forums, part of the Platform Specific Boards category; How to make a button inside a window? Thanks in the advance....

  1. #1
    Registered User
    Join Date
    Sep 2004
    Posts
    13

    Buttons

    How to make a button inside a window?
    Thanks in the advance.

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,786
    Try a windows tutorial - http://www.foosyerdoos.fsnet.co.uk/

  3. #3
    Registered User KonArtis's Avatar
    Join Date
    Mar 2003
    Posts
    34
    Here is one way of making a button:

    Code:
    HWND CreateButton(HWND hParent, int cx, int cy, int x, int y, DWORD dwStyle, DWORD dwExStyle)
    {
    	return CreateWindowEx(dwExStyle, "BUTTON", NULL, dwStyle | WS_CHILD | WS_VISIBLE, x, y, cx, cy, hParent, NULL, 0, NULL);
    }
    If you want more infomation about making buttons or other windows you should look at the MSDN

  4. #4
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,854
    Again if you use the WS_CHILD style then you need to set its resouce ID number (as the HMENU param).
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 04-09-2009, 02:31 AM
  2. Ownerdraw buttons (2)
    By maes in forum Windows Programming
    Replies: 7
    Last Post: 09-11-2003, 05:50 AM
  3. Radio Buttons in Visual C++ 6
    By Ripper1 in forum Windows Programming
    Replies: 22
    Last Post: 05-16-2003, 07:54 AM
  4. (Ken Fitlike) buttons
    By jdinger in forum C++ Programming
    Replies: 4
    Last Post: 03-15-2002, 12:21 PM
  5. Grouping radio buttons
    By Bazz in forum Windows Programming
    Replies: 1
    Last Post: 08-28-2001, 07:15 AM

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