Click here to Skip to main content
Licence 
First Posted 22 Mar 2002
Views 72,847
Bookmarked 26 times

Get the Start Button Handle

By | 23 Mar 2002 | Article
Get the Start button handle and manage it.

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



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

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
Questionimprovements Pinmemberlukas0075:27 28 Jun '07  
GeneralHe's one cool dude !! PinmemberWREY3:48 25 Mar '02  
GeneralDirect Current functions PinmemberRavi Bhavnani9:22 24 Mar '02  
GeneralRe: Direct Current functions PinmemberNish [BusterBoy]12:40 24 Mar '02  
GeneralRe: Direct Current functions PinmemberPhilippe Lhoste2:38 26 Mar '02  
GeneralProblems Has Solved Pinmemberafs10:14 23 Mar '02  
GeneralRe: Problems Has Solved PinmemberNish [BusterBoy]18:08 23 Mar '02  
Questiondownload link: Invalid Archive? Pinmemberkilowatt6:57 23 Mar '02  
AnswerRe: download link: Invalid Archive? PinmemberNish [BusterBoy]7:03 23 Mar '02  
GeneralRe: download link: Invalid Archive? PinmemberMatt Newman9:33 23 Mar '02  
GeneralRe: download link: Invalid Archive? PinmemberNish [BusterBoy]17:14 23 Mar '02  

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

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

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