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]