Solved

More ActiveX control questions

Posted on 1998-03-25
3
315 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
[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
  • 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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…
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 video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…

707 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