Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CreateWindow;

CreateWindow;

Scheduled Pinned Locked Moved C / C++ / MFC
c++
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Bo Hunter
    wrote on last edited by
    #1

    I am tring to create a groupbox on the client window in a wtl project. I can not get it to work, it creates a window the right size but does not paint the text or the group outline. I have created buttons and checkboxes and all work fine painting and all. Here is the code for the groupbox I am tring to create.

    hWndGroup = ::CreateWindow(WC_STATIC, _T("Check Item(s) to Disable."),
    WS_CHILD | WS_VISIBLE | BS_GROUPBOX | BS_LEFTTEXT | BS_TEXT,
    70, 50, 200, 130, m_hWnd, (HMENU)ID_GROUPBOX,
    ((LPCREATESTRUCT)lParam)->hInstance, NULL);

    Thank You Bo Hunter

    B O 2 Replies Last reply
    0
    • B Bo Hunter

      I am tring to create a groupbox on the client window in a wtl project. I can not get it to work, it creates a window the right size but does not paint the text or the group outline. I have created buttons and checkboxes and all work fine painting and all. Here is the code for the groupbox I am tring to create.

      hWndGroup = ::CreateWindow(WC_STATIC, _T("Check Item(s) to Disable."),
      WS_CHILD | WS_VISIBLE | BS_GROUPBOX | BS_LEFTTEXT | BS_TEXT,
      70, 50, 200, 130, m_hWnd, (HMENU)ID_GROUPBOX,
      ((LPCREATESTRUCT)lParam)->hInstance, NULL);

      Thank You Bo Hunter

      B Offline
      B Offline
      BaldwinMartin
      wrote on last edited by
      #2

      hWnd = CreateWindow (WC_STATIC,_T("Check Item(s) to Disable."),WS_CHILD |..., 0, 0, width, 30+gHeight + WINDOWHEIGHT, NULL, NULL, ghInst, tData); Best Wishes, ez_way

      1 Reply Last reply
      0
      • B Bo Hunter

        I am tring to create a groupbox on the client window in a wtl project. I can not get it to work, it creates a window the right size but does not paint the text or the group outline. I have created buttons and checkboxes and all work fine painting and all. Here is the code for the groupbox I am tring to create.

        hWndGroup = ::CreateWindow(WC_STATIC, _T("Check Item(s) to Disable."),
        WS_CHILD | WS_VISIBLE | BS_GROUPBOX | BS_LEFTTEXT | BS_TEXT,
        70, 50, 200, 130, m_hWnd, (HMENU)ID_GROUPBOX,
        ((LPCREATESTRUCT)lParam)->hInstance, NULL);

        Thank You Bo Hunter

        O Offline
        O Offline
        Oliver Anhuth
        wrote on last edited by
        #3

        Try WC_BUTTON for the window class. Best regards Oliver

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups