• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 380
  • Last Modified:

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

0
Aggarwal
Asked:
Aggarwal
  • 7
  • 6
1 Solution
 
chensuCommented:
It looks like that you are talking about Active Document Servers. Look into the Visual C++ documentation and samples.

http://msdn.microsoft.com/library/devprods/vs6/vc++/vccore/_core_activex.3a_.overview.htm
0
 
AggarwalAuthor Commented:
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
0
 
chensuCommented:
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...).
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
AggarwalAuthor Commented:
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
0
 
chensuCommented:
Sorry, I have no idea.
0
 
AggarwalAuthor Commented:
really thanks for quick response !!!!

would you mind some discussion with me ritenow !

regards
0
 
AggarwalAuthor Commented:
really thanks for quick response !!!!

would you mind some discussion with me ritenow !

regards
0
 
chensuCommented:
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?
0
 
AggarwalAuthor Commented:
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
0
 
chensuCommented:
>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.
0
 
AggarwalAuthor Commented:
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


0
 
chensuCommented:
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.
0
 
AggarwalAuthor Commented:

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
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 7
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now