?
Solved

MFC ActiveX Control on a VB form

Posted on 2002-07-26
2
Medium Priority
?
327 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
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…

621 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