Solved

MFC ActiveX Control on a VB form

Posted on 2002-07-26
2
322 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

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 most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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…

733 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