高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】how to cast an oddbdatabase objec
how to cast an oddbdatabase object
how to cast an oddbdatabase object
dear all,
i want to create a class of my own which derives from oddbdatabase and then cast an oddbdatabase object to it, just like what odamfcapp does. how can i achieve this?
suppose my class is mydoc. i have add a macro odrx_declare_members(mydoc) to its declaration, applied the macro odrx_cons_define_members(mydoc, oddbdatabase, docreate), called mydoc::rxinit at the beginning of the program and then use mydoc::cast() to cast an oddbdatabaseptr to a odsmartptr<mydoc>.
all of above was just to get a odsmartptr<mydoc> of null object. can anyone tell me what else i have missed?
last edited by song_sd; 23rd march 2005 at 09:43 amfff">.
|