Solved

ActiveX Focus Problem

Posted on 2003-12-05
9
501 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
  • 6
  • 3
9 Comments
 
LVL 23

Accepted Solution

by:
Roshan Davis earned 250 total points
Comment Utility
Give some more idea, for what purpose you are using the SetCapture....
0
 

Author Comment

by:DAE
Comment Utility
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
Comment Utility
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
 

Author Comment

by:DAE
Comment Utility
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
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!

 
LVL 23

Expert Comment

by:Roshan Davis
Comment Utility
Hi DAE,
I was not here.

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

Rosh :)
0
 

Author Comment

by:DAE
Comment Utility
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
Comment Utility
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
Comment Utility
Use WindowFromPoint, and post a mouse click to that window if needed.
0
 

Author Comment

by:DAE
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

772 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