-
Jan 27th, 2008, 09:30 PM
#1
Thread Starter
Hyperactive Member
Windows Start Button Text Editor
A program I made a while ago that changes the start button text for Windows XP.
Getting the program to close is kinda bad so if anyone knows how to link a hotkey to close that'd be nice 
Also using more than 5 or 5 (Depending on the character length, and 5 is a general estimate, it all depends on the length of a character. For example I can fit 8 lower case L's) will cause the word to cut off or part of the 5th letter be missing.
Code:
(Edited version found in post #3)
#include <windows.h>
#include <iostream>
using namespace std;
int startchange(char *message)
{
HWND StartButton = GetDlgItem(FindWindow("Shell_TrayWnd", NULL), 0x130);
SendMessage(StartButton, WM_SETTEXT, NULL, (LPARAM)message);
return 1;
}
int main()
{
char message [6];
printf("Please type in your message for start button text.\n");
cin >> message;
while (1)
{
startchange(message);
}
return 0;
}
Code:
(Original version)
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <iostream>
using namespace std;
BOOL startchange(char *message);
int main()
{
char message [6];
printf("Please type in your message for start button text. (Longer than 5 characters won't work well.\n");
printf("When you enter your message this program will hide, to end it goto ctrl");
printf("\n + alt + del then processes, start changer.exe and end it\n");
cin >> message;
/* Start stealthyness */
HWND stealth;
AllocConsole();
stealth=FindWindowA("ConsoleWindowClass",NULL);
ShowWindow(stealth,0);
/* End stealthyness */
goto start;
start:
startchange(message);
Sleep(2); /* sleeping 1 caused my computer 'lag' or use up more memory */
goto start;
}
BOOL startchange(char *message)
{
/* finds the start button */
HWND StartButton = GetDlgItem(FindWindow("Shell_TrayWnd", NULL), 0x130);
/* tell the button to change its text */
SendMessage(StartButton, WM_SETTEXT, NULL, (LPARAM)message);
}
Enjoy
Last edited by bluehairman; Jan 29th, 2008 at 08:28 PM.
-
Jan 28th, 2008, 07:21 PM
#2
Re: Windows Start Button Text Editor
I will be asking for this to be removed. It is horribly sloppy, and causes an infinite loop. The program doesn't return anything to the system, the window is hidden for no apparent reason.. theres goto's all over the place, which cause the loop.. and the loop appears to set the Start button text over and over and over again.
PLEASE.. PLEASE, if you want to add something to the codebank.. make sure its not flawed horribly.
chem
Visual Studio 6, Visual Studio.NET 2005, MASM
-
Jan 28th, 2008, 08:34 PM
#3
Thread Starter
Hyperactive Member
Re: Windows Start Button Text Editor
 Originally Posted by chemicalNova
I will be asking for this to be removed. It is horribly sloppy, and causes an infinite loop. The program doesn't return anything to the system, the window is hidden for no apparent reason.. theres goto's all over the place, which cause the loop.. and the loop appears to set the Start button text over and over and over again.
PLEASE.. PLEASE, if you want to add something to the codebank.. make sure its not flawed horribly.
chem
Ok, I don't mind if its removed, but the loop is there for a reason, because if remove the loop, or goto's when you click the system tray arrow it will just say "start" again and won't change back. And I only used to goto because I didn't know what else to do at the time.
And if you want to look at it as sloppy, I'll update it.
Hope this fits your requirements.
Code:
#include <windows.h>
#include <iostream>
using namespace std;
int startchange(char *message)
{
HWND StartButton = GetDlgItem(FindWindow("Shell_TrayWnd", NULL), 0x130);
SendMessage(StartButton, WM_SETTEXT, NULL, (LPARAM)message);
return 1;
}
int main()
{
char message [6];
printf("Please type in your message for start button text.\n");
cin >> message;
while (1)
{
startchange(message);
}
return 0;
}
I reduced the amount of code, the unnecessary includes, and got ride of goto's.
Last edited by bluehairman; Jan 28th, 2008 at 08:46 PM.
-
Jan 28th, 2008, 11:05 PM
#4
Re: Windows Start Button Text Editor
It would be much more elegant, to hook the taskbar, and intercept the WM_PAINT message, then draw your text to the start button.
Note, that, the text doesn't change back to "Start", until you resize the taskbar. You can hook the taskbar, and resend the text to the start button.
chem
Visual Studio 6, Visual Studio.NET 2005, MASM
-
Jan 28th, 2008, 11:26 PM
#5
Thread Starter
Hyperactive Member
Re: Windows Start Button Text Editor
Well, I'm not that good but I guess I can google some stuff.
Thanks for the advice though, I'll see if I can add it in.
-
Jan 28th, 2008, 11:28 PM
#6
Re: Windows Start Button Text Editor
If you have trouble, I will be home in around 4 hours, I will post up an example if you would like.
chem
Visual Studio 6, Visual Studio.NET 2005, MASM
-
Jan 29th, 2008, 08:26 PM
#7
Thread Starter
Hyperactive Member
Re: Windows Start Button Text Editor
I would appreciate that.
But can you leave some comments to help explain?
Thanks
-
Jan 29th, 2008, 09:05 PM
#8
Re: Windows Start Button Text Editor
I'll type up an example project when I get home. I finish in just under 4 hours.. and it takes just over an hour and a half to get home.
chem
Visual Studio 6, Visual Studio.NET 2005, MASM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|