Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

windows GDI

windows GDI

windows GDI

Can anybody tell me how to get the graphics drivers working in Windows?


RE: windows GDI

Could you clairify this a little? ie: Is this a programming question? Any particular version of driver? Any particular method of accessing these drivers that you are have problems with. Etc.....

Home Page

RE: windows GDI

I'm trying to write a program which uses windows graphich driver interface.How can I get the handle of the driver to which the help file refers to?

RE: windows GDI

If you are thinking of Windows GDI function calls, ie API calls, then all you have to do is get the device context of the client area. Select a pen into the device context while preserving the handle of the original pen. Use one of the GDI drawing functions like Ellipse(). Then select the pen out of the device context and delete it. Something like below:

   zhdc = GetDC(hwnd); // Get device context of our Window

   NewPen = CreatePen(PS_SOLID, 6, RGB(255, 0, 0));     // Create a Red pen
   OldPen = SelectObject(zhdc, NewPen); // Get handle of original pen & set New pen
   Ellipse(zhdc, 20, 40, 40, 60);
   SelectObject(zhdc, OldPen);  // Put the old pen back so we can
   DeleteObject(NewPen);        // safely delete the Red one

   ReleaseDC(hwnd, zhdc);

Home Page

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close