Click here to Skip to main content
13,557,860 members
Click here to Skip to main content
Add your own
alternative version


27 bookmarked
Posted 22 Mar 2002

Get the Start Button Handle

, 23 Mar 2002
Rate this:
Please Sign up or sign in to vote.
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.

<PRE lang=c++>CWnd* m_Window = CWnd::FindWindow("Shell_TrayWnd",""); m_Window->GetTopWindow()->SendMessage(WM_LBUTTONDOWN,MK_LBUTTON);


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)
No Biography provided

You may also be interested in...


Comments and Discussions

Questionimprovements Pin
lukas00728-Jun-07 5:27
memberlukas00728-Jun-07 5:27 
GeneralHe's one cool dude !! Pin
WREY25-Mar-02 3:48
memberWREY25-Mar-02 3:48 
GeneralDirect Current functions Pin
Ravi Bhavnani24-Mar-02 9:22
memberRavi Bhavnani24-Mar-02 9:22 
GeneralRe: Direct Current functions Pin
Nish [BusterBoy]24-Mar-02 12:40
memberNish [BusterBoy]24-Mar-02 12:40 
GeneralRe: Direct Current functions Pin
Philippe Lhoste26-Mar-02 2:38
memberPhilippe Lhoste26-Mar-02 2:38 
GeneralProblems Has Solved Pin
afs23-Mar-02 10:14
memberafs23-Mar-02 10:14 
GeneralRe: Problems Has Solved Pin
Nish [BusterBoy]23-Mar-02 18:08
memberNish [BusterBoy]23-Mar-02 18:08 
Questiondownload link: Invalid Archive? Pin
kilowatt23-Mar-02 6:57
memberkilowatt23-Mar-02 6:57 
AnswerRe: download link: Invalid Archive? Pin
Nish [BusterBoy]23-Mar-02 7:03
memberNish [BusterBoy]23-Mar-02 7:03 
GeneralRe: download link: Invalid Archive? Pin
Matt Newman23-Mar-02 9:33
memberMatt Newman23-Mar-02 9:33 
GeneralRe: download link: Invalid Archive? Pin
Nish [BusterBoy]23-Mar-02 17:14
memberNish [BusterBoy]23-Mar-02 17:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    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 | Terms of Use | Mobile
Web03-2016 | 2.8.180515.1 | Last Updated 24 Mar 2002
Article Copyright 2002 by AFShin Dehghani
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid