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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CBrush::CreatePatternBrush limitations?

CBrush::CreatePatternBrush limitations?

Scheduled Pinned Locked Moved C / C++ / MFC
c++graphicsregexjsonquestion
3 Posts 2 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.
  • C Offline
    C Offline
    CodeBrain
    wrote on last edited by
    #1

    I want to create my own pattern brush, but I got a little bit confused by the MSDN documentaion. The documentation of the CBrush::CreatePatternBrush methods says there is a general limitation for the pattern bitmap of 8x8 Pixel. Ok so far, but the documentation of the corresponding API function CreatePatternBrush says that this limitation is only valid for Window 95 and that larger bitmaps will work for Win98, 2000 and XP: "Windows 95: Creating brushes from bitmaps or DIBs larger than 8 by 8 pixels is not supported. If a larger bitmap is specified, only a portion of the bitmap is used. Windows 98/Me and Windows NT/2000/XP: Brushes can be created from bitmaps or DIBs larger than 8 by 8 pixels." So what's true? Does the limitation exists if I use the MFC method, but not if I use the API function??? :confused: Thanks in advance for clarifying this confusion.

    M 1 Reply Last reply
    0
    • C CodeBrain

      I want to create my own pattern brush, but I got a little bit confused by the MSDN documentaion. The documentation of the CBrush::CreatePatternBrush methods says there is a general limitation for the pattern bitmap of 8x8 Pixel. Ok so far, but the documentation of the corresponding API function CreatePatternBrush says that this limitation is only valid for Window 95 and that larger bitmaps will work for Win98, 2000 and XP: "Windows 95: Creating brushes from bitmaps or DIBs larger than 8 by 8 pixels is not supported. If a larger bitmap is specified, only a portion of the bitmap is used. Windows 98/Me and Windows NT/2000/XP: Brushes can be created from bitmaps or DIBs larger than 8 by 8 pixels." So what's true? Does the limitation exists if I use the MFC method, but not if I use the API function??? :confused: Thanks in advance for clarifying this confusion.

      M Offline
      M Offline
      Mike Dimmick
      wrote on last edited by
      #2

      It's often educational to read the MFC source code ;) CBrush::CreatePatternBrush is a simple wrapper around the API function, and hence has the same limitations. The MFC documentation simply doesn't indicate that newer versions of Windows don't have this limitation.

      C 1 Reply Last reply
      0
      • M Mike Dimmick

        It's often educational to read the MFC source code ;) CBrush::CreatePatternBrush is a simple wrapper around the API function, and hence has the same limitations. The MFC documentation simply doesn't indicate that newer versions of Windows don't have this limitation.

        C Offline
        C Offline
        CodeBrain
        wrote on last edited by
        #3

        Thanks for the answer. Fortunately this confirms my knowledge about MFC :-D I also got this answer using trial-and-error.

        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