Advertisement

Man do I feel Sheepish... GDI?

Started by February 25, 2000 02:03 PM
3 comments, last by BeanDog 24 years, 6 months ago
This is probably the most stupid question I could possibly ask, but... Does anybody have a list of basic GDI commands? Like circle, polygon, etc. etc. etc.? Simple Versioning System: Source code control for the common man. [Edited by - BeanDog on January 15, 2006 12:49:50 PM]
For that question you have better look in the MSDN Library.

Tip: Look for HDC
Advertisement
Check out WinGDI.h in your include directory....
Then if the prototypes aren''t enough to help you
type in the function name at msdn.microsoft.com for the full help and examples online.

Check out my project @ www.exitearth.com

OK I tried it but I ran into a problem. Here''s my code:
void DirectX::DrawCircle(int x, int y, int xr, int yr, COLORREF c)
{
HRESULT hret;
HDC hdc;
hret = Back->GetDC(&hdc);

Ellipse(hdc,x-xr/2,y-yr/2,x+xr/2,y+yr/2);


Back->ReleaseDC(hdc);
};
Where DirectX is a homemade wrapper for directx, and Back is my LPDIRECTDRAWSURFACE7 thingy stored within DirectX. When I run the program and run this sub, it kicks me out without an explanation. Perhaps you guys could give me one.
On which call do you get kicked out? GetDC(), Ellipse() or ReleaseDC()?

Always check for errors. For example Ellipse() returns zero if it fails.

You can also use OutputDebugString(SomeString) to track progress of your application.

Edited by - Spellbound on 2/25/00 6:45:36 PM

This topic is closed to new replies.

Advertisement