Solved

More ActiveX control questions

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now