GDI program scrambles without Aero
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: GDI program scrambles without Aero

  1. #1
    Join Date
    Apr 2009
    Posts
    7

    GDI program scrambles without Aero

    My program is written entirely in C++ using GDI. The goal being it would have full backwards compatibility from Windows 7 all the way down to Windows XP. The problem I'm having is when a computer is using Windows XP or a Vista machine without Aero activated, the program doesn't refresh properly.

    When it has to occlude with other programs, my window will display artifacts and other bizarre graphical refresh problems.

    Any known issues or ideas to get me moving in the right direction?

  2. #2
    Join Date
    Nov 2006
    Posts
    1,611

    Re: GDI program scrambles without Aero

    Without context, a view of code that you suspect, there's little to offer.

    Many here have written a considerable body of applications that don't generally exhibit the behavior you've noticed, though I've not targeted Windows 7.

    I have been through many transitions of operations systems, and I've come to the conclusion, years ago, that portability isn't just about code that runs on Linux, Mac and Windows - it's also about being portable within any one of these in it's various versions, which is what you're asking.

    Portable code is important even when targeting a single operating system.

    If only the large vendors had thought to make portable applications, we might be as dependent on Windows as we are today.

    Now, since I don't know what your application does, how it draws, I can't offer much but guesses.

    One educated guess, though, is that you have problems even in the environment in which it seems to work, it's just that it falls within the quirks of that one environment to seem to function ok. The fact that it's not working outside that one environment makes it clear that you have implementation specific behavior where it shouldn't be.

    You're going to have to sleuth around a bit, so as to create a reproducible test case that demonstrates what is going wrong so you can understand it.

    It's what we'd have to do 'out here' to help you, if we had your entire codebase and a reason to work as hard as you're about to.
    If my post was interesting or helpful, perhaps you would consider clicking the 'rate this post' to let me know (middle icon of the group in the upper right of the post).

  3. #3
    Join Date
    Apr 2009
    Posts
    7

    Re: GDI program scrambles without Aero

    The problem was I had 'EXSTYLE WS_EX_TRANSPARENT' in the dialog. This was causing the graphical artifacts with XP.

    Thanks for the response, I know my initial post was very cryptic since I couldn't post any of the source code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center