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. Remove WS_THICKFRAME style

Remove WS_THICKFRAME style

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
4 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
    bugDanny
    wrote on last edited by
    #1

    I've read a lot that to make your window non-resizable that you need to remove the WS_THICKFRAME style, but I can't find here on Code Project, or MSDN, really how to do that. Can someone help me out? Danny The stupidity of others amazes me!

    J D 2 Replies Last reply
    0
    • B bugDanny

      I've read a lot that to make your window non-resizable that you need to remove the WS_THICKFRAME style, but I can't find here on Code Project, or MSDN, really how to do that. Can someone help me out? Danny The stupidity of others amazes me!

      J Offline
      J Offline
      Jim Crafton
      wrote on last edited by
      #2

      CAll GetWindowStyle() to retreive the style for the window. Then mask out the WS_THICKFRAME ( style = style & ~WS_THICKFRAME ); Then set the windows style with the new style mask using SetWindowStyle(). THen call SetWindowPos(hwnd_, NULL,0,0,0,0, SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOSIZE); This will cause the window to be updated properly so that the style change is reflected visually. ¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF!

      1 Reply Last reply
      0
      • B bugDanny

        I've read a lot that to make your window non-resizable that you need to remove the WS_THICKFRAME style, but I can't find here on Code Project, or MSDN, really how to do that. Can someone help me out? Danny The stupidity of others amazes me!

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        bugDanny wrote:

        Can someone help me out?

        Try:

        BOOL CMainFrame::PreCreateWindow( CREATESTRUCT &cs )
        {
        if (! CFrameWnd::PreCreateWindow(cs))
        return FALSE;

        cs.style &= ~WS\_THICKFRAME;
        return TRUE;
        

        }


        "Take only what you need and leave the land as you found it." - Native American Proverb

        B 1 Reply Last reply
        0
        • D David Crow

          bugDanny wrote:

          Can someone help me out?

          Try:

          BOOL CMainFrame::PreCreateWindow( CREATESTRUCT &cs )
          {
          if (! CFrameWnd::PreCreateWindow(cs))
          return FALSE;

          cs.style &= ~WS\_THICKFRAME;
          return TRUE;
          

          }


          "Take only what you need and leave the land as you found it." - Native American Proverb

          B Offline
          B Offline
          bugDanny
          wrote on last edited by
          #4

          Thank you both. The other answers I've read were much more complicated, so much thanks. Danny The stupidity of others amazes me!

          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