Does WM_DEACTIVATE exists? Application deactivated?

Post your questions regarding programming in C++ in here.
6 posts Page 1 of 1
Contributors
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

First of all this is in the C++ section, i do not want any VB or C# answers.
Im looking for the opposite of WM_ACTIVATE, because i want my program to stop updating some stuff that uses a lot of CPU when its deactivated. I have the WM_ACTIVATE to start updating, but i need a notification similar to WM_DEACTIVATE. Does that even exists? Or is there another way? I couldn't find any help on Google.
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
User avatar
Axel
Coding God
Coding God
Posts: 1928
Joined: Sun Jun 27, 2010 9:15 pm

What do you want to do ?
http://vagex.com/?ref=25000
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

In my WndProc, i want to see if the message is the message that is sent when a window is deactivated. The WM_ACTIVATE message is sent when you activate the window, i would like to know if there was a similar WM_DEACTIVATE that is sent when the window is deactivated
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
User avatar
Axel
Coding God
Coding God
Posts: 1928
Joined: Sun Jun 27, 2010 9:15 pm

If you mean hidden/shown with activated then you should take a look at WM_SHOWWINDOW Please don't talk in such a "wannabe pro" language I'm kinda gettin mad of it lol
http://vagex.com/?ref=25000
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

For such "wannabe pro" language you should be able to see that hiding windows is not what is being asked here.

When a window is deactivated, a WM_ACTIVATE message is actually sent to both windows indicating each windows' status and the target/source window handles.

Are you using managed or unmanaged C++ code?

Here is some more documentation: http://msdn.microsoft.com/en-us/library ... S.85).aspx
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

I'm using unmanaged C++. If I used managed it would probably be much easier, but it depends on the .NET Framework. Thx for the link, I first tried WM_KILLFOCUS but that only fired when it lost keyboard focus, now it works perfect :D
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
6 posts Page 1 of 1
Return to “General coding help”