GetClassInfo problem solved
Igor Korot
ikorot at earthlink.net
Wed Mar 5 09:36:34 PST 2008
Hi, ALL,
IIRC (I am at work now), at least 2.8 says in comments:
"Not all compilers support dynamic_cast, so here is a little
hack to get this implemented"
I would be very interested what compilers it's talking about.
Thank you.
-----Original Message-----
>From: Riccardo Cohen <rcohen at articque.com>
>Sent: Mar 4, 2008 11:48 PM
>To: wx-users at lists.wxwidgets.org
>Subject: GetClassInfo problem solved
>
>For those who use win->GetClassInfo(); on wxWindow subclasses, be very
>carefull on MS windows
>
>I had a wxPanel subclass whose win->GetClassInfo(); returned wxPanel's
>one instead of my subclass one. There was no compilation problem, and it
>worked perfecly with GCC, but microsoft didn't seem to call the good
>virtual function. I couldn't reproduce on a little sample, it did that
>only in my big projet...
>
>I finally found (by chance) that adding this :
>
>#undef GetClassInfo
>
>after all includes, 1) in the header, and 2) in the cpp, did change
>something : wx macros DECLARE_CLASS & IMPLEMENT_CLASS are building a new
>function in your class : GetClassInfo(), but because of Microsoft macro
>#define GetClassInfo GetClassInfoA !!! it changes its name ...
>
>undef it and it works.
>
>(maybe a little word in the doc of rtti overview would be nice ?)
>
>Thank you for your attention :)
>
>
>--
>Très cordialement,
>
>Riccardo Cohen
>-------------------------------------------
>Articque
>http://www.articque.com
>149 av Général de Gaulle
>37230 Fondettes - France
>tel : 02-47-49-90-49
>fax : 02-47-49-91-49
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
>For additional commands, e-mail: wx-users-help at lists.wxwidgets.org
>
More information about the wx-users
mailing list