Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

More ActiveX control questions

Posted on 1998-03-25
3
Medium Priority
?
335 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

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.

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…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

596 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