GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 01-Sep-2006, 04:05
sarguna sarguna is offline
New Member
 
Join Date: Sep 2006
Posts: 3
sarguna is on a distinguished road

Show Desktop Problem which minmizes all the window


hello Everybody

when we press the Show Desktop symbol in the quick lauch bar it minimizes the application
but i don't want to do so

So i m able to get the message of the first Show Desktop Click or (WindowsLogo + D)
and i do my processing accordingly i.e. minimize it in the system tray

i get the message in WM_SIZE IN THAT
CPP / C++ / C Code:
void CProDlg::OnSize(UINT nType, int cx, int cy) 
{
			
	 if(nType==SIZE_MINIMIZED)
			{
				//minimzed it in the system tray
			}
}
this is wrong as such we are handling the msg after the dialog is minimzed

but when we press it for the second time i.e.Show Desktop Click or (WindowsLogo + D) i m not able to
do the same as it was in the previouly i.e.i don't know how but my application gets popup and is displayed in an unwanted manner.

I am not able to find out which message is send to the dialogbox when the Show Desktop or Keyboard shortcut i.e. (Windows Logo+ D) for the second time.

One thing is clear that the process Shell_TrayWnd program sends message to all the application to minimze
val
/*MinAll*/ 415,
/*MaxAll*/ 416,

accordingly
CPP / C++ / C Code:
static HWND hShellWnd = ::FindWindow(_T("Shell_TrayWnd"), NULL);
if(hShellWnd != NULL)
::PostMessage(hShellWnd, WM_COMMAND, MAKELONG(415, 0), NULL);//for minimizing
::PostMessage(hShellWnd, WM_COMMAND, MAKELONG(416, 0), NULL);//for maximizing
This stuff will minimize all the window

Could u please find out the message so that i could remove the flaw.
Last edited by LuciWiz : 01-Sep-2006 at 05:40. Reason: Please insert your C/C++ code between [cpp] & [/cpp] tags
  #2  
Old 01-Sep-2006, 05:04
sarguna sarguna is offline
New Member
 
Join Date: Sep 2006
Posts: 3
sarguna is on a distinguished road

Re: Show Desktop Problem which minmizes all the window


Clarification

there are two dialog here one is the main and the other is the floating over the main i.e. for good look only

the floating dialog is modelless dialog

So wat happens is that when we press (Show Desktop ) for the first time

i have written the code in

the message WM_SIZE wParam ==WM_MINIMIZED

to hide the application throught

theapp.HideApplication() and the other i.e. the floating dialog throught ShowWindow(sw_hide)

but when i press the (Show Desktop ) for the second time the thing happens is that only the floating dailog is visible and not the main dialog



Wat i want is

1) either display both the dialog when we press show desktop the second time or hide both of them
  #3  
Old 05-Sep-2006, 00:28
aie0 aie0 is offline
Member
 
Join Date: Dec 2004
Posts: 246
aie0 is a jewel in the roughaie0 is a jewel in the rough

Re: Show Desktop Problem which minmizes all the window


Use spy++ to look at all the messages that window gets:
the first time you press show Desktop your window gets:

wm_size fwsizetype:SIZE_MINIMIZED nWidth:0 nHight:0

the second time you press you get:

wm_size fwsizetype:SIZE_MAXIMIZED nWidth:1024 nHight:721
numeric values might differ
  #4  
Old 05-Sep-2006, 01:09
sarguna sarguna is offline
New Member
 
Join Date: Sep 2006
Posts: 3
sarguna is on a distinguished road

Re: Show Desktop Problem which minmizes all the window


Thank you for replying the question

I did the same way with the spy++
But did not know about the maximized one i think i tried it before


Any way i will Try it again

Thank you for very much
 
 

Recent GIDBlogProblems with the Navy (Enlisted) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
need help with a console menu system BullBuchanan C++ Forum 6 20-Aug-2006 14:46
problem with system() and win32 shell lordfuoco C++ Forum 0 27-Jun-2006 03:09
Problem starting appliaction in cmd window with ShellExecute jubbjubb MS Visual C++ / MFC Forum 4 29-Jan-2006 14:31
Win32 Window Shading behavior (like linux) WillyumYum C++ Forum 3 18-Apr-2005 14:36
#including resource file causing window procedure to be undeclared??? ubergeek C++ Forum 3 07-Feb-2005 14:39

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 06:32.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.