realbasic-games
[Top] [All Lists]

Re: [Ann] Making a Card Game with Cards.dll

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: [Ann] Making a Card Game with Cards.dll
From: Aaron Ballman <aaron at realsoftware dot com>
Date: Tue, 15 Nov 2005 22:51:44 -0600
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <4379669E dot 3070301 at realsoftware dot com> <437AB283 dot 2040805 at ix dot netcom dot com>
I'm not sure which "Draw" method to use, but whichever one it is, it will involve passing a value for hdc. I've figured out that I need to use Hacks.HDCFromGraphics(g) to get a value for hdc, but I don't know what to do about the "g." How do I get a value for "g"??

g is a Graphics object; usually it's the one passed into the Paint event for a Canvas or Window object.

In the program, I note that it always seems to come into a Sub as a passed parameter, but I can't seem to see anything on the outside of the Sub that is passing anything in. Example: the Paint event handler. The Paint event isn't called by code; it "just happens."

Correct, Paint is an event that is called by the framework when it's time to repaint an item. It gets passed a Graphics handle that all the drawing should happen on. So you can take that Graphics object and use it when calling one of the Draw methods.

HTH!

~Aaron
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>