Solved

More ActiveX control questions

Posted on 1998-03-25
3
304 Views
Last Modified: 2013-11-20
Hi,
I'm working on my first ActiveX control. It's a windowless control and paints directly to container's HDC. I have a simple question:

When I want my control to be invisible, I basicly just do nothing in OnDraw or OnDrawAdvanced handlers, right ?
If so, when it goes from visible to invisible, I want to  invalidate the control RECT in the control container window, so that it can repaint this region. Do I have to use IConnectionPoint and IAdviceSink for this ? I think the easiest way is to get the container's HWND and call InvalidateRect(). How do I get this HWND ?
0
Comment
Question by:byang
  • 2
3 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 20 total points
ID: 1317238
Call COleControl::InvalidateControl().
0
 
LVL 3

Author Comment

by:byang
ID: 1317239
I'm using ATL, and COleControl is an MFC thing.
0
 
LVL 23

Expert Comment

by:chensu
ID: 1317240
You should have indicated you are using ATL.

For ATL, call CComControl::FireViewChange().
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from 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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
if loop in java 3 140
string initialization in java 11 113
only14 challenge 19 76
ShiftLeft challenge 21 80
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

776 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