高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】odgicontextfordbdatabase mfc cview
odgicontextfordbdatabase & mfc cview
odgicontextfordbdatabase & mfc cview
hi,
i have a question that i cannot resolve:
how can i associate odgicontextfordbdatabase and cview, without inheriting a new class from both?
i explain better: i need to render on mfc view using wingdi.gs.
all examples create a new class view inheriting from cview & odgicontextfordbdatabase and associate device to view using
code:
m_pdevice = oddbgsmanager::setupactivelayoutviews(m_pdevice, this);
my problem is that i cannot make a new class inheriting from odgicontextfordbdatabase, and then i need a way to associate cview to odgicontextfordbdatabase.......
i'm becoming mad
thank you a lot,
walter
myzhar
==============
ing. walter lucetti
geomind srl
pisa - italy
==============
myzhar
# 9th february 2006, 03:36 am
softdev join date: jun 2002
location: st'petersburg, russia
posts: 522
no need in association at all.
you can just write like this (code from odvectorizeex sample):
code:
// begin vectorization.
// create the vectorization context.
odgicontextfordbdatabaseptr pdwgcontext = odgicontextfordbdatabase::createobject();
// create the custom rendering device and set the output stream for the device.
odgsdeviceptr pdevice = exgssimpledevice::createobject(output, exgssimpledevice::k3ddevice);
// set the database to be vectorized.
pdwgcontext->setdatabase(pdb);
// prepare the device to render the active layout in this database.
pdevice = oddbgsmanager::setupactivelayoutviews(pdevice, pdwgcontext);
if you need to override some methods of odgicontextfordatabase, you can make your inheritant and pass pointer to it to setupactivelayoutviews.
sincerely yours,
george udov
george udov
# 9th february 2006, 03:42 am
registered user join date: feb 2006
location: pisa
posts: 69
i solved the problem...
the code i wrote yesterday works well ( i used odrxobjectimpl<odgicontextfordbdatabase> mgicontext; to have a context variable).
the only problem was that i was initializing the db before the loading.
when i tried then to render, there was no association db<->device and the program crashed
the problem is that when you are working with something new and you have a problem, you search always in hard things and don't think to simpliest
thank you
walter
myzhar
==============
ing. walter lucetti
geomind srl
pisa - italy
==============
myzhar
none
? | ?
thread tools
display modes
linear mode
search this thread
rate this thread
excellent
good
average
bad
terrible
posting rules
you may post new threads
you may post replies
you may post attachments
you may edit your posts
is on
are on
code is off
html code is off
forum jump
user control panel private messages subscriptions who's online search forums forums home general topics news questions and remarks business issues industry commentary general software issues documentation issues future directions dwg libraries dwgdirect.net dwgdirect, c++ version dwgdirectx, activex version adtdirect/c3ddirect opendwg toolkit/viewkit dgn libraries dgndirect, c++ version (2.x+) dgndirect libraries (legacy 0.99xx)
all times are gmt -7. the time now is 11:35 pmfff">.
- - -
copyright ?2000 - 2009, jelsoft enterprises ltd.
copyright 1998-2008 open design alliance inc.
no need in association at all.
you can just write like this (code from odvectorizeex sample):
code:
// begin vectorization.
// create the vectorization context.
odgicontextfordbdatabaseptr pdwgcontext = odgicontextfordbdatabase::createobject();
// create the custom rendering device and set the output stream for the device.
odgsdeviceptr pdevice = exgssimpledevice::createobject(output, exgssimpledevice::k3ddevice);
// set the database to be vectorized.
pdwgcontext->setdatabase(pdb);
// prepare the device to render the active layout in this database.
pdevice = oddbgsmanager::setupactivelayoutviews(pdevice, pdwgcontext);
if you need to override some methods of odgicontextfordatabase, you can make your inheritant and pass pointer to it to setupactivelayoutviews.
sincerely yours,
george udov
i solved the problem...
the code i wrote yesterday works well ( i used odrxobjectimpl<odgicontextfordbdatabase> mgicontext; to have a context variable).
the only problem was that i was initializing the db before the loading.
when i tried then to render, there was no association db<->device and the program crashed
the problem is that when you are working with something new and you have a problem, you search always in hard things and don't think to simpliest
thank you
walter
myzhar
==============
ing. walter lucetti
geomind srl
pisa - italy
==============
|