Click here to Skip to main content
Click here to Skip to main content

Get the Start Button Handle

By , 23 Mar 2002
 

The code

First you must get the handle of the Windows Taskbar, then you can capture the Start button that is a child of the taskbar window. You can change the style of it or send message you wish! You can use EnableWindow() function for disabling or enabling the start button, or GetDC() and other Device Context Functions to draw on the button, plus many more things.

The code CWnd* m_Window = CWnd::FindWindow("Shell_TrayWnd","") gets the taskbar window handle and GetTopWindow() returns start button as CWnd pointer.

CWnd* m_Window = CWnd::FindWindow("Shell_TrayWnd","");
m_Window->GetTopWindow()->SendMessage(WM_LBUTTONDOWN,MK_LBUTTON);

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

AFShin Dehghani
Web Developer
Iran (Islamic Republic Of) Iran (Islamic Republic Of)
Member
No Biography provided

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
Questionimprovementsmemberlukas00728 Jun '07 - 5:27 
GeneralHe's one cool dude !!memberWREY25 Mar '02 - 3:48 
GeneralDirect Current functionsmemberRavi Bhavnani24 Mar '02 - 9:22 
GeneralRe: Direct Current functionsmemberNish [BusterBoy]24 Mar '02 - 12:40 
GeneralRe: Direct Current functionsmemberPhilippe Lhoste26 Mar '02 - 2:38 
GeneralProblems Has Solvedmemberafs23 Mar '02 - 10:14 
GeneralRe: Problems Has SolvedmemberNish [BusterBoy]23 Mar '02 - 18:08 
Questiondownload link: Invalid Archive?memberkilowatt23 Mar '02 - 6:57 
AnswerRe: download link: Invalid Archive?memberNish [BusterBoy]23 Mar '02 - 7:03 
GeneralRe: download link: Invalid Archive?memberMatt Newman23 Mar '02 - 9:33 
GeneralRe: download link: Invalid Archive?memberNish [BusterBoy]23 Mar '02 - 17:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 24 Mar 2002
Article Copyright 2002 by AFShin Dehghani
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid