Solved

ActiveX Focus Problem

Posted on 2003-12-05
9
511 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 250 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
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!

 

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

Industry Leaders: 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

Title # Comments Views Activity
Get filename and folder into excel 7 89
Process filename extension 3 218
Trying to run powershell  in a batch file. How do I do this? 8 124
I could not set window to top 4 63
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.

739 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