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. The Lounge
  3. New Windows bug causes GDI leaks in MFC apps

New Windows bug causes GDI leaks in MFC apps

Scheduled Pinned Locked Moved The Lounge
helpc++comgraphicsjson
23 Posts 14 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.
  • L Lost User

    They may well of patched this via a Windows Update - there is no way of telling. And yes, I had to go through MS tech support for the hot-fix, so I am not meant to give it to you. :( Oh, and MS support sent me the KB319740 link 12 months ago too. I did find a workaround though - make a call to SetWindowTheme(hWnd, L"", L"") in OnCreate. This means your MDI child windows won't get the XP theme look to their captions, but you'll still get themed controls, etc.


    The Rob Blog
    Google Talk: robert.caldecott

    J Offline
    J Offline
    Joshua Quick
    wrote on last edited by
    #21

    That's good to know. Thanks for the tip Robert.

    1 Reply Last reply
    0
    • C Chris Maunder

      I mean that you were strictly limited in the number of GDI objects you could create (without releasing) before the system started refusing to grant you more. You quickly learned to check the return values of system calls :) cheers, Chris Maunder

      CodeProject.com : C++ MVP

      J Offline
      J Offline
      Jorgen Sigvardsson
      wrote on last edited by
      #22

      I painfully remember. :sigh: -- Look straight into the light!

      1 Reply Last reply
      0
      • L Lost User

        They may well of patched this via a Windows Update - there is no way of telling. And yes, I had to go through MS tech support for the hot-fix, so I am not meant to give it to you. :( Oh, and MS support sent me the KB319740 link 12 months ago too. I did find a workaround though - make a call to SetWindowTheme(hWnd, L"", L"") in OnCreate. This means your MDI child windows won't get the XP theme look to their captions, but you'll still get themed controls, etc.


        The Rob Blog
        Google Talk: robert.caldecott

        G Offline
        G Offline
        Gary R Wheeler
        wrote on last edited by
        #23

        Robert Edward Caldecott wrote:

        They may well of patched this via a Windows Update - there is no way of telling.

        They haven't :suss:. I spot-checked the XP/SP2 machines I'm responsible for (which I keep Windows Update'd), and none of them included the fix.


        Software Zen: delete this;

        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