Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ActiveX Focus Problem

Posted on 2003-12-05
9
Medium Priority
?
522 Views
Last Modified: 2013-11-20
When my ActiveX Control gain the focus with the TAB key it work fine but when it gain the focus with the mouse have draw problems and SetCapture() function stop working.

It have to be some thing with the Control Activation but my control have the ACTIVATEWHENVISIBLE on.
0
Comment
Question by:DAE
[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
  • 6
  • 3
9 Comments
 
LVL 23

Accepted Solution

by:
Roshan Davis earned 1000 total points
ID: 9881309
Give some more idea, for what purpose you are using the SetCapture....
0
 

Author Comment

by:DAE
ID: 9883581
The ActiveX Control have a custom popup menu (child window), I use SetCapture to know when the user make a click outside the popup menu.

I release the mouse when the popup menu is closed.
0
 

Author Comment

by:DAE
ID: 9889540
Rosh, I fix the problem with:

int CxxxxCtrl::OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message)
{
      if (AmbientUserMode()){
            if (!m_bUIActive) OnActivateInPlace (TRUE, NULL);
      }

      return COleControl::OnMouseActivate(pDesktopWnd, nHitTest, message);
}
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:DAE
ID: 9889585
Can I ask you another question right here????

Is related to the SetCapture:

My control release the mouse in the mouse down message, but because the setcapture I loose this message for the rest of the windows. For example when the user make click on the minimize button on the container window, this click don´t respond the first time because the setcapture.

There is a way to after the ReleaseCapture, to send a MouseDown message to the windows clicked.

Thanks.
0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9894400
Hi DAE,
I was not here.

>> Can I ask you another question right here????
Yes, you can.

Rosh :)
0
 

Author Comment

by:DAE
ID: 9894451
Is related to the SetCapture:

My control release the mouse in the mouse down message, but because the setcapture I loose this message for the rest of the windows. For example when the user make click on the minimize button on the container window, this click don´t respond the first time because the setcapture.

There is a way to after the ReleaseCapture, to send a MouseDown message to the windows clicked.

Thanks.
0
 

Author Comment

by:DAE
ID: 9894453
Sorry for the last one :)

Is related to the SetCapture:

My control release the mouse in the mouse down message, but because the setcapture I loose this message for the rest of the windows. For example when the user make click on the minimize button on the container window, this click don´t respond the first time because the setcapture.

This is the question:
There is a way to after the ReleaseCapture, to send a MouseDown message to the windows clicked ???????????

Thanks.
0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9894458
Use WindowFromPoint, and post a mouse click to that window if needed.
0
 

Author Comment

by:DAE
ID: 9894527
Ok I'm goind to try that.

Do you know where I can find information about license protection (other than Microsoft) for my control????

Thanks
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
In this post we will learn different types of Android Layout and some basics of an Android App.
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 tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

722 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