Home > Software engineering >  How to judge a WM_NCACTIVATE message window to accept
How to judge a WM_NCACTIVATE message window to accept

Time:09-27

WM_NCACTIVATE SendMessage (HWND, True, 0)
WM_NCACTIVATE SendMessage (HWND, False, 0)

Like IsWindowVisible determine whether display window can directly determine rather than the GetActiveWindow, judging GetForegroundWindow

CodePudding user response:

Personal opinion:
Whether to accept the message window is a false proposition,
On receiving any message window, the difference only, after then receive discarded after processing, processing to the default process again after processing,...
Welcome the great god clap brick downstairs,

CodePudding user response:

reference 1st floor zhao4zhong1 response:
personal opinion:
Whether to accept the message window is a false proposition,
On receiving any message window, the difference only, after then receive discarded after processing, processing to the default process again after processing,...
Welcome the great god clap brick downstairs,


You don't understand what I mean what I need is judge state of window after receive the news, isn't he will not to accept the message

It is the two state
WM_NCACTIVATE SendMessage (HWND, True, 0)
SendMessage (HWND WM_NCACTIVATE, False, 0)

CodePudding user response:

Is compared with the GetActiveWindow judgments,
If a window is active window has nothing to do with whether its response to the two messages,

CodePudding user response:

reference Tiger_Zhao reply: 3/f
is compared with the GetActiveWindow judgments,
If a window is active window has nothing to do with whether its response to the two messages,


I don't want to judge whether the window response or activity of what I asked questions I feel already very clear ah, why can't save me

CodePudding user response:

It can see if there are a great god to solve

CodePudding user response:

You send a (phone) short message to others, others see didn't see you don't know,
WM_NCACTIVATE is also same,
I really don't know what are you thinking about?

CodePudding user response:

refer to 6th floor Tiger_Zhao response:
you send a (phone) short message to others, others didn't look at you don't know,
WM_NCACTIVATE is also same,
I really don't know what are you thinking about?


Just said Windows 7 system I don't know what else to accept SendMessage (HWND WM_NCACTIVATE, True, 0) message window closes the window will get red fork fork
I think it will be your technology is not enough, not really can't judge, may be I am a novice, but you yourself think is the way it is, this so, asked many also tired, no one know I have to study the yourself,

CodePudding user response:

Sendmessage returns a value, and understand the meaning of the return value


The WM_NCACTIVATE message is sent to a window when its nonclient area needs to be changed to indicate an active or inactive state.

WM_NCACTIVATE
WParam fActive=(BOOL);//the new state of the title bar or icon


The Parameters

FActive

Value of wParam. Specifies the when a title bar or icon needs to be changed to indicate an active or inactive state. If an active title bar or icon is to be drawn, cable the fActive parameter is TRUE, It is FALSE for the an inactive title bar or icon.



The Return Values

Cable When the fActive parameter is FALSE, an application should return TRUE to indicate that Windows should proceed with the default processing, or it should return FALSE to prevent the title bar or icon from being deactivated. The cable When fActive is TRUE, the return value is ignored.

The Default Action

The DefWindowProc function draws The title bar or icon title in its active colors when cable The fActive parameter is TRUE, and in its inactive colors cable when fActive is FALSE.
  •  Tags:  
  • API
  • Related