15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Focus problem

Raja Mohan Katikareddy -- rajamohan@msn.com
Friday, August 16, 1996

Environment : VC++ 4.2, Windows 95

	In MFC, is there anyway that I can find out that the control is about to lose 
the
focus. I tried with PreTranslateMessage(). It traps the key and mouse button 
messages
but it doesn't get the focus messages.

Thankx in advance,
-Reddy



Lev Gloukhenki -- lev@shira.co.il
Sunday, August 18, 1996

[Mini-digest: 2 responses]

At 07:11 AM 8/16/96 UT, you wrote:
>Environment : VC++ 4.2, Windows 95
>
>	In MFC, is there anyway that I can find out that the control is about to lose 
>the
>focus. I tried with PreTranslateMessage(). It traps the key and mouse button 
>messages
>but it doesn't get the focus messages.
>
>Thankx in advance,
>-Reddy
>
>

Hi ! Try this ( it is Cut-and-Paste from MSVC++ on-line help ) :

 afx_msg void CWnd::OnKillFocus( CWnd* pNewWnd );  
 The framework calls this member function immediately before losing the
input focus. 

Gloukhenki Lev
lev@shira.co.il

  

-----From: "Rommel Songco" 

When a window is about to lose focus, it receives the WM_KILLFOCUS message.
 The window receiving the focus receives the WM_SETFOCUS message.

Regards,
Rommel
rsongco@spectrasoft.com




| Вернуться в корень Архива |