Rename the Start button in Windows

24 views
Skip to first unread message

Pravin Paratey

unread,
Sep 10, 2007, 1:55:13 PM9/10/07
to Win32 Programming
/* Program to rename the Start Button
* By Pravin Paratey (September 17, 2003)
* Illustrates the use of FindWindow, FindWindowEx and SendMessage
functions
**/
#include <windows.h>

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
HWND hTray, hButton;

// Get handle of the Taskbar
hTray = FindWindow("Shell_TrayWnd","");

// Get handle of the start button
if (hTray)
hButton = FindWindowEx(hTray, NULL, "BUTTON",NULL);
if (hButton)
{
// Rename it to "Begin"
SendMessage(hButton, WM_SETTEXT, 0, (LPARAM)"Begin");
MessageBox (NULL,"Rename Successful", "Start Menu", MB_OK);
}
return 0;
}

[Moving snippets to group]

Reply all
Reply to author
Forward
0 new messages