Link to home
Start Free TrialLog in
Avatar of Aggarwal
Aggarwal

asked on

OLE Container

hello ,

actually i'm trying to implement an OLE container so that main frame window is child to some other apllication's main window ...

well . assume some word ap. is running . now i want an OLE container to be created so that it attches its main window to word application as child window and is transparent ..

i dun know its feasible or not ..

a sample app. will be appreciated ..
its urgent !!!

regards ,.
aggarwal

ASKER CERTIFIED SOLUTION
Avatar of chensu
chensu
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Aggarwal
Aggarwal

ASKER

well , first thanx for ur response .i'll first explain the current status of what i'm doing ..

i have created an OLE container which is transparent and child window of some running window application . for instance say word is opened . now i put my container on that window .. and i'm able to draw free-hand drawing on that window ..

from end user it seems as if u r drawing on word app. now i want to sync. the two windows ..i mean whenever the parent window document is updated modify the container veiw ...

hope u got what i'm doing ..i need suggestions regarding design of the situation .

pl. give ur valuable suggestions ..

thanx and rgds ,
aggarwal
I don't think what you described can be achieved. The most similiar design is what I said in the answer. For an example of Active Document, try opening a Word document (*.doc) from within Internet Explorer (Menu File/Open...).
hello ,

i agree with what u r saying. but i need something very different.

first i'll update the status of what i have done ...

a transparent container successfully created and attched to some active window as child window with the size equal to rect area of that window minus scrollbar size .

now i'm able to insert ole items on that container successfully . when i scroll the window ..then actualy window is scrolled ..i want this contaier window to scroll and update itself with that !!!!!!!!!

can u please help me ...

regards ,
aggarwal
Sorry, I have no idea.
really thanks for quick response !!!!

would you mind some discussion with me ritenow !

regards
really thanks for quick response !!!!

would you mind some discussion with me ritenow !

regards
Hi,

I didn't get the notifications until this morning.

>a transparent container successfully created and attched to some active window as child window

Does the active window belong to a seperate process (.exe)? Is it an OLE server or Automation server?

>i want this contaier window to scroll and update itself with that

What does the container display?
no probs !!!

>a transparent container successfully created and attched to some active window as child window

>>      Does the active window belong to a seperate process (.exe)? Is it an OLE server or Automation
      server?

yes active window belongs to some other process .we dun have any info the the client(Active) window .but the container i'm attaching is OLE Server as well .


      >i want this contaier window to scroll and update itself with that

>>>      What does the container display?
container displays any thing ..basically in most of  the cases some embedded controls ..

regards
>yes active window belongs to some other process .we dun have any info the the client(Active) window

This is where the problem is. How can you update your window if you can't get any info from the active window? I don't see any ways.
hello ,

lets now take the problem like ..

i want to sync. the scroll bars of two applications . one already running app.
one written by me .

i'm thinking ..in all probability i might be wrong ...

Logic : whenever the other window is scrolled . its re-painted rite .it has to modify the display details ..i mean how much to scroll ( probably in pixels ..not relative to the size of the document ) .at the point from my app. i can use

PeekMessage() ..to get if that app. got the msg. WM_VSCROLL ..okey ..
then i can read the hDC of the window ..by calling GetWindowDC() ;

can i use that DC to make changes to my app. *i dun know i'm rite or not * ..

or something of that sort !!!

please see to it ..i'm really thankful to you for ur response .

P.S. i'm not worried abt. the points or something of that sort , in case u need more points ..even if my problem is not sorted out u ask for the points i'll give that ..

the only thing i want some way to solve this problem ..

thanks once again .

great regards ,
aggarwal


PeekMessage does not retrieve messages for windows that belong to other threads. In order to get the messages, you have to install a hook by using SetWindowsHookEx. This will slow down the system. To capture the content of the window, see

HOWTO: Capture and Print an Entire Window
http://support.microsoft.com/support/kb/articles/q186/7/36.asp

WINCAP Captures Screens Using DIB API
http://support.microsoft.com/support/kb/articles/q97/1/93.asp

But I still think this way is not so elegant. The better way is to use OLE/Automation if possible.

P.S. Don't expect too much from me. I can provide limited help only due to my knowledge and time and the lack of your context.

thanks once again . i'm closing the question by accepting ur ans. but i didn't get solution to my problem . in case , U get some idea please mail me at neeraj_aggarwal@rocketmail.com .

regards