Welcome to Dream.In.Code
Become a C++ Expert!

Join 137,420 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,969 people online right now. Registration is fast and FREE... Join Now!




Vista and GDI?

 
Reply to this topicStart new topic

Vista and GDI?

taure
21 Jan, 2008 - 03:11 AM
Post #1

New D.I.C Head
*

Joined: 9 Sep, 2007
Posts: 14


My Contributions
Hi,

I've recently bought a notebook with pre-installed Vista Bussiness system. At first I felt quite happy with it (once I disabled Aero stuff). But then I moved my code from my previous computer and was terribly dissapointed.

Until now, I have been compiling my c/winapi code in Dev-C++ (gcc I mean). Since I didn't manage to make it work on Vista, I downloaded official SDK from msdn. I quickly found that the .exe files generated with VC++ were about 20-40 kb heavier than those made with gcc. But that was not the worst thing.

None of my apps that used GDI for displaying graphics does work on Vista. Code that worked perfectly under XP either behaves strangely, e.g trivial:

CODE
for(i=0;i<windowwidth;i++)
  for(j=0;j<windowheight;j++)
    SetPixel(hdc, i, j, RGB(128, 255, 0));


- leaves vertical rectangles untouched,
or refuses to run at all, as an app that ploted Mandelbrot Set in the window.

On MSDN I read that some video cards may not implement various GDI functions, but damn - how can they not support such a primitive api as SetPixel ?!

I begin to wonder if I did right learning win32 api as it seems MS treats it only as backward-compatibility dinosaur compared with .NET platform confused.gif
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/5/08 04:22AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month