Repainting Dialogs

This is a discussion on Repainting Dialogs within the Windows Programming forums, part of the Platform Specific Boards category; I have written an application which I use to measure equipment status overnight. When I am using the application during ...

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    9

    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
    Bazz

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,859
    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
    SelectObject()
    CreatePen, Brush, CompatibleBitmap() ect
    GetDC()

    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, 03:36 PM
  2. I need to use dialogs as tabs?
    By BenPage in forum C++ Programming
    Replies: 1
    Last Post: 08-03-2005, 09:59 AM
  3. Modeless Dialogs in Multiple threads
    By MrGrieves in forum Windows Programming
    Replies: 0
    Last Post: 06-22-2004, 02: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21