Results 1 to 8 of 8

Thread: Windows Start Button Text Editor

Threaded View

  1. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2006
    Posts
    343

    Re: Windows Start Button Text Editor

    Quote 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width