Solved

More ActiveX control questions

Posted on 1998-03-25
3
312 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

740 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