Solved

MFC ActiveX Control on a VB form

Posted on 2002-07-26
2
315 Views
Last Modified: 2013-11-25
This question is pending deletion.

I have inherited a simple MFC activeX control that is used on a VB form.  To use the contol I have to double-click it -- it doesn't get any OnClick, LButtonDown or SetFocus messages until then.  When single-clicked it gets OnDraw and GetControlFlags messages.  I want it to activate when clicked the first time.  I created new MFC activeX controls thinking I could figure out from them how to fix the original control, but they behave the same way -- I have to double-click them.  I then created a new ATL activeX control and it behaves the way I want it to!  I tried adding the WS_EX_NOPARENTNOTIFY flag to the MFC control.  I also tried using the windowlessActivate and pointerInactive flags as well but they don't seem to change the behavior at all.  It does work as I want it to in the activeX control test container.  It's driving me nuts.  What do I need to do when or after creating an MFC activeX control to get it to get the focus on the first click?
0
Comment
Question by:jimwasson
2 Comments
 
LVL 7

Author Comment

by:jimwasson
Comment Utility
Aw nuts!  I found the problem.  Someone had removed the OLEMISC_ACTIVATEWHENVISIBLE flag.
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
Comment Utility
Points refunded and question closed, per request.

Netminder
CS Moderator
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
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 is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

771 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

10 Experts available now in Live!

Get 1:1 Help Now