• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 423
  • Last Modified:

ActiveX Focus

I am looking for sometype of ActiveX OnFocusChange type of event.  I want to know when my activex is not in focus basically.  how do i do this?

Thanks!
0
cophi
Asked:
cophi
  • 3
  • 2
1 Solution
 
jkrCommented:
>>I want to know when my activex is not in focus basically.

Override 'CWnd::OnKillFocus()' to get notified when your control is loosing the focus, e.g.

void CMyActiveXWnd::OnKillFocus( CWnd* pNewWnd ) {

  m_bHasFocus = FALSE;

  CWnd::OnKillFocus( pNewWnd );
}

for MFC or

LRESULT CMyActiveXWnd::OnKillFocus( UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled ) {

  m_bHasFocus = FALSE;

  CComControl::OnKillFocus( nMsg, wParam, lParam, bHandled );
}

if you are using ATL base classes

0
 
cophiAuthor Commented:
That works, but I guess its not exactly what I'm looking for.  When you go to Debug a ActiveX control, inside the debugger you can press ESC and the ActiveX Control will 'Freeze' I thought it was losing focus but apparantly not.  I'm trying to find out when that event occurs.
0
 
cophiAuthor Commented:
The problem is I have this activeX control on powerpoint and when its not on the slide with the activex control, its in sometype of freeze, or paused state.  I just need to know when this state is happening.
0
 
jkrCommented:
That probably can't be detected, since PPT just will not call any methods of your control during that phase.
0
 
cophiAuthor Commented:
I understand that, but some event has to have been called, because on the slide I have a text box with values that are being constantly updated.  When its on the slide with the textbox stuff will be updated, when it moves to the next slide it won't update anymore, when it gets back to the slide with the textbox again, it starts updating again.  Something has to be happening would you agree?
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!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now