?
Solved

MFC ActiveX Control on a VB form

Posted on 2002-07-26
2
Medium Priority
?
325 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
[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 Comments
 
LVL 7

Author Comment

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

Accepted Solution

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

Netminder
CS Moderator
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
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.
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…

777 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