Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

OLE Container

Posted on 1999-07-20
13
Medium Priority
?
376 Views
Last Modified: 2013-11-25
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
Comment
Question by:Aggarwal
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
13 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 800 total points
ID: 1310751
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
 
LVL 1

Author Comment

by:Aggarwal
ID: 1310752
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
 
LVL 23

Expert Comment

by:chensu
ID: 1310753
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Author Comment

by:Aggarwal
ID: 1310754
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
 
LVL 23

Expert Comment

by:chensu
ID: 1310755
Sorry, I have no idea.
0
 
LVL 1

Author Comment

by:Aggarwal
ID: 1310756
really thanks for quick response !!!!

would you mind some discussion with me ritenow !

regards
0
 
LVL 1

Author Comment

by:Aggarwal
ID: 1310757
really thanks for quick response !!!!

would you mind some discussion with me ritenow !

regards
0
 
LVL 23

Expert Comment

by:chensu
ID: 1310758
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
 
LVL 1

Author Comment

by:Aggarwal
ID: 1310759
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
 
LVL 23

Expert Comment

by:chensu
ID: 1310760
>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
 
LVL 1

Author Comment

by:Aggarwal
ID: 1310761
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
 
LVL 23

Expert Comment

by:chensu
ID: 1310762
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
 
LVL 1

Author Comment

by:Aggarwal
ID: 1310763

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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question