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

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


Kill focus problem

Maurits Rijk 7 84941 -- rijkm@ehv.tass.philips.com
Wednesday, February 21, 1996

Folks,

I have a view with some edit controls on it. For some of these edit controls
I have created an entry in the message map of the view in order to react on
a kill focus event for these controls. But for some strange reason the 
OnKillFocus routine I have defined never gets called.

The message map entry looks something like:

	ON_EN_KILLFOCUS(IDC_RGx, OnKillFocus)

Things I have checked so far:

- the view inheritance tree is about three levels deep. I have carefully checked
that this inheritance is reflected in the declaration of the message map.

- I have checked the resource id (IDC_RGx). Data exchange routines and other
routines that need this id seem to work fine.

- I checked whether the incoming message isn't caught at a higher level.

We are using MSVC 1.52C and Windows 3.1

Thanks for any help,

Maurits Rijk
Philips TASS
e-mail: rijkm@ehv.tass.philips.com



Veeraraghavan -- veera@hiso.honeywell.soft.net
Friday, February 23, 1996

[Mini-digest: 2 responses]

Hi,

	KillFocus message (EN_KILLFOCUS) is sent to the parent window 
.Did you specify Mainframe window as parent window or view as parent 
window in the call to pEdit->Create(). Anyway, you can trap EN_KILLFOCUS 
in the OnCommand handler.

Hope this helps
veera

-----From: Niels Ull Jacobsen 

1. Check with Spy++ that the message is actually send. And to whom. 
2. Turn on main message pump tracing.
3. Set a breakpoint in AfxWndProc and step through the code.

 
KieHave 

--
Niels Ull Jacobsen, Kruger A/S

Everything stated herein is THE OFFICIAL POLICY of the entire Kruger
group and should be taken as legally binding in every respect. Pigs
will grow wings and fly.








Tim Hagemann -- 100063.323@compuserve.com
Monday, February 26, 1996

Maurits,

>> I have a view with some edit controls on it. For some of these edit controls
>> I have created an entry in the message map of the view in order to react on
>> a kill focus event for these controls. But for some strange reason the 
>> OnKillFocus routine I have defined never gets called.

>> The message map entry looks something like:

>> 	ON_EN_KILLFOCUS(IDC_RGx, OnKillFocus)

[snip]

Try the WM_KILLFOCUS message. It should work.

Tim Hagemann






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