When pNewWind (pointer passed to OnKillFoucus handler) will be NULL?
On May 21, 9:25=A0am, rahul <hyrahu...@gmail.com> wrote:
> When pNewWind (pointer passed to OnKillFoucus handler) will be NULL?
On my machine, when I set focus on any other program's window.
Why do you care (IOW, you have a bad question here)? MSDN says that it
can be NULL. It means that you are not supposed to know the next
window at any given time WM_KILLFOCUS is sent. And indeed, it is
possible, especially in Vista+, that random program can't receive a
HWND of another program (e.g. that other ...OnSetFocus(), OnKillFocus()
I have a standard MDI app. My view class is CFormView based. I have a
microsoft chart activex control placed on top of the form.
In the CFormView class I have a handler for OnSetFocus() and
I have this strange behaviour where if I click on another view in my
app, the previous view that had focus first gets a kill focus message,
then gets a set focus message somehow! It should just get a kill focus
and that is it when losing focus.
I have no idea why this is happening, but without the control present,
the focus problem goes away and the set/kill focus messages are
I've created a set of controls derived from CEdit in order to do
in-place validation (i.e when you tab out of the field rather than when
you complete the form). Mostly (at least 99%), they're working fine,
but I've had a couple of problems with one particular form and, sadly,
Basically, I've over-ridden OnKillFocus() and do my validation there,
saving the validated data for later use. When the "save" button is
clicked, UpdateData(TRUE) is called which (I believe) then calls
DoDataExchange(), where the data is taken from my controls into a set
...OnSetFocus called twice?
Hi, MDI app using CRichEditDoc/View derived classes.
I'm using OnSetFocus() to toggle the state of a BOOL member variable
but when I call OnFileNew() it seems to call OnSetFocus() twice thus
the BOOL seems to stay the same.
When I switch between view it seems to work fine though as
OnSetFocus() is only called once.
Is OnSetFocus() supposed to be called twice?
email@example.com (Adrian Gibbons) wrote in message news:<firstname.lastname@example.org>...
> Hi, MDI app using CRichEditDoc/View derived classes.
> I'm using OnSetFocus() t...OnKillfocus event eats OnClick event
An application I am trying to debug has several edit boxes and a Save
button. One of the edit boxes displays a name retrieved from a
database. That edit box has an OnKillfocus event that checks to see
if the user has changed the box's contents. If so, then the other
edit boxes are initialized from the database. If not, the user is
asked if he wants to create a new object.
If the user wants to create a new object with the same properties as
the current object, he would enter a new name and then click Save.
The OnKillfocus event of the edit box fires, correctly asking the us...WM_KILLFOCUS or OnKillFocus
I have created a modeless window. When I click on the parent window, I want
it to close, something like a context menu that closes.
In the modeless window, I tried OnKillFocus, and also trapping WM_KILLFOCUS
but none works.
How to auto close the modeless window?
Problem fixed. I change the parent window from Dialog type to FormView type.
In the FormView's OnSetFocus function will destroy the modeless window.
"Allan" <email@example.com> wrote in message
>I have created a modeless win...OnKillFocus, not working with topmost window
I have a Dlg, and i used SetWindowpos(...) to ensure that it is the top most
But, i also want to ensure that i never looses the focus for that window.
If i click on another window and want the focus to return to my window until
the user has finished with it.
How could that be done?
"Sims" <firstname.lastname@example.org> wrote in message news:<bv84bd$p469v$1@ID-162430.news.uni-berlin.de>...
> I have a Dlg, and i used SetWindowpos(...) to ensure that it is the top most
> But, i also want to ensure that i never...