Thread: Repainting Dialogs

  1. #1
    Registered User
    Join Date
    Aug 2001

    Repainting Dialogs

    I have written an application which I use to measure equipment status overnight.
    When I am using the application during the day, all is well. However, sometimes when I return in the morning, the application seems to have changed the resolution in windows to some extent.
    My dialog application is the same size but, the selection down-arrows on my combo boxes change to a number 6, my combo boxes do not work correctly.
    When I minimise my application and look in Windows Explorer, the resolution and size of fonts have changed.
    When I close my application and reopen it, all is well again.
    Can anyone advise what the problem might be?

    Many thanks

  2. #2
    train spotter
    Join Date
    Aug 2001
    near a computer
    Sounds like a GDI resource leak. Or you are selecting a font over the default windows font.(but that should show up all the time) As things get better after closing, allowing Windows to free the resources, sounds like a mem leak.

    Are you using
    CreatePen, Brush, CompatibleBitmap() ect

    without the Release or DeleteObject() or DeleteDC()

    You must ensure all HDC's are returned to the original state and deleted / released. All Created objects are deleted before the function ends. One pen / font / brush not deleted will do this given time.
    "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. Ok..Tabbed dialogs...XP style
    By Joelito in forum Windows Programming
    Replies: 5
    Last Post: 05-14-2006, 02:36 PM
  2. I need to use dialogs as tabs?
    By BenPage in forum C++ Programming
    Replies: 1
    Last Post: 08-03-2005, 08:59 AM
  3. Modeless Dialogs in Multiple threads
    By MrGrieves in forum Windows Programming
    Replies: 0
    Last Post: 06-22-2004, 01:33 PM
  4. dialogs are easier, but what about the main window?
    By stallion in forum Windows Programming
    Replies: 4
    Last Post: 01-21-2003, 01:42 PM
  5. dialogs vs windows
    By cppdude in forum Windows Programming
    Replies: 3
    Last Post: 03-20-2002, 02:30 PM