Thread: Buttons

  1. #1
    Registered User
    Join Date
    Sep 2004


    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
    Try a windows tutorial -

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

    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
    near a computer
    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, 01:21 PM
  5. Grouping radio buttons
    By Bazz in forum Windows Programming
    Replies: 1
    Last Post: 08-28-2001, 07:15 AM