Re: Win32lib question - can I tell the calling control?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Matthew Lewis wrote:

> Aha.  That would explain the use of push/popSelf
> [in WndProc/SubProc].  I've often wondered about that.

That was one fun weekend, getting that worked out. My initial cut just used
a single variable to keep track of self. I found out the hard way that a
callback (such as an onPaint) can trigger at any time, and when you return,
self has been mangled. Using a stack to keep track of the state takes care
of that problem.


> Also, getSelf isn't in the docs, which explains
> why I never found it.  3 lines of code in 17,000,
> sheesh. :)

*blush*

Yet another minor detail to add to the list...

-- David Cuny

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu