🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.c
Article #309036

Re: Jak sprawdzić jakiej klasy jest obiekt (wskaźnik) ?

#309036
From: bartekltg
Date: Sun, 23 Apr 2017 12:10
29 lines
2038 bytes
On 06.02.2017 11:53, Borneq wrote:
> W Pascalu to było "is".
> Uczę się teraz wxWidgets. Lista z kolumnami to wxListView:wxListCtrl a
> niestandardowa z checkboxami to wxCheckedListCtrl:wxListCtrl.
> Mam jedną funkcję do wypełniania obu typów wołając InsertItem. Ale samo
> wypełnienie nawet dobrze działa, tylko potem dla listy z checkboxami
> jest źle gdy są eventy klikania na niej. Dlatego że prawdopodobnie
> InsertItem nie jest wirtualna.
> Więc chciałbym sprawdzić obiekt list, czy jest wxListView czy
> wxCheckedListCtrl i specjalnie wywołać InsertItem.


A przeczytaj sobie, jakie metody daje wx_object, wszytko jest gotowe.
http://docs.wxwidgets.org/trunk/classwx_object.html
Chyba wszytko jhest tam pochodna tego.



virtual wxClassInfo * 	GetClassInfo () const
  	This virtual function is redefined for every class that requires 
run-time type information, when using the wxDECLARE_CLASS macro (or similar)


bool 	IsKindOf (const wxClassInfo *info) const
  	Determines whether this class is a subclass of (or the same class as) 
the given class

pzdr
bartekltg
Technical Details
Message-ID: <odi5jg$9v6$1@node2.news.atman.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
References: <o79kim$psa$1@node1.news.atman.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
From: bartekltg <bartekltg@gmail.com>
Newsgroups: pl.comp.lang.c
Subject: Re: Jak sprawdzić jakiej klasy jest obiekt
 (wskaźnik) ?
Date: Sun, 23 Apr 2017 14:10:23 +0200
Organization: ATMAN - ATM S.A.
Lines: 30
Message-ID: <odi5jg$9v6$1@node2.news.atman.pl>
References: <o79kim$psa$1@node1.news.atman.pl>
NNTP-Posting-Host: 89-70-119-159.dynamic.chello.pl
Mime-Version: 1.0
X-Trace: node2.news.atman.pl 1492949424 10214 89.70.119.159 (23 Apr 2017 12:10:24 GMT)
X-Complaints-To: usenet@atman.pl
NNTP-Posting-Date: Sun, 23 Apr 2017 12:10:24 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
In-Reply-To: <o79kim$psa$1@node1.news.atman.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit