How to 'show' an application through another application (visual c++) -
i don't know if title makes sense guys , i'm not english i'll explain problem through images (i don't have enough rep sorry that)
so in solution have 2 projects:
what i'm trying 'show' second 1 through first, this:
i sound total noob... possible? if is, how can achieve this?
both written in c++
thank help.
this complicated question answer in reasonable amount of space. can provide first, assurance has been done possible, , second, broad outline of how proceed.
there 2 approaches possible depending on desired level of integration: windows screensavers standalone exe files. despite can render windows 'preview' dialog. accomplished screensaver.exe being launched preview dialog - passes hwnd on command line.
so - need 3 things
- convince managed app (cocoshelper) give hwnd form, , launch cocos app command line containing number.
- in cocos project go appdelegate applicationdidfinishlaunching implementation, , retrieve hwnd command line.
- you create subclass of windows glviewimpl class, - upon creating opengl view, set parent provided window - applicationdidfinishlaunching method create subclassed glviewimpl rather base cocos version.
the next approach builds on put cocos project same process space host app - assuming host app win32 desktop app.
- create 3rd "cocosdllproject" clone of "cocosproject" project. change "dynamic library" rather "application" , remove "main.cpp" file.
- add new "cocosdllmain.cpp" file , add entrypoint function it. "runcocos" or something. make sure method exported dll, , have contents of previous "main" method, should take, parameter, hwnd parameter pass (a modified) appdelegate. parent window.
- add dll dependency other project, , invoke "runcocos" @ appropriate time.
Comments
Post a Comment