|
[求助]关于程序标题
有几个小东东可以直接修改程序标题、界面和图标,不需要脱壳。有EXESCOPE( 不过程序 UPX or ASPACK 压缩了的话要先解压才可以用)、
ResHacker(不光标题、图标,界面都可以改)
如果只想改图标,用我的Ani.cur.ico Editor,呵呵
也可以在Delphi这样改:
使用API函数 setWIndowtext
The SetWindowText function changes the text of the specified window';s title bar (if it has one). If the specified window is a control, the text of the control is changed. However, SetWindowText cannot change the text of a control in another application.
Syntax
BOOL SetWindowText( HWND hWnd,
LPCTSTR lpString
);
Parameters
hWnd
[in] Handle to the window or control whose text is to be changed.
lpString
[in] Pointer to a null-terminated string to be used as the new title or control text.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Remarks
If the target window is owned by the current process, SetWindowText causes a WM_SETTEXT message to be sent to the specified window or control. If the control is a list box control created with the WS_CAPTION style, however, SetWindowText sets the text for the control, not for the list box entries.
To set the text of a control in another process, send the WM_SETTEXT message directly instead of calling SetWindowText.
The SetWindowText function does not expand tab characters (ASCII code 0x09). Tab characters are displayed as vertical bar (|) characters.
Windows 95/98/Me: SetWindowTextW is supported by the Microsoft® Layer for Unicode (MSLU). To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems.
Example:
HWND hwndCombo;
int cTxtLen;
PSTR pszMem;
switch (uMsg)
{
case WM_COMMAND:
switch (LOWORD(wParam))
{
case IDD_ADDCBITEM:
// Get the handle of the combo box and the
// length of the string in the edit control
// of the combo box.
hwndCombo = GetDlgItem(hwndDlg, IDD_COMBO);
cTxtLen = GetWindowTextLength(hwndCombo);
// Allocate memory for the string and copy
// the string into the memory.
pszMem = (PSTR) VirtualAlloc((LPVOID) NULL,
(DWORD) (cTxtLen + 1), MEM_COMMIT,
PAGE_READWRITE);
GetWindowText(hwndCombo, pszMem,
cTxtLen + 1);
// Add the string to the list box of the
// combo box and remove the string from the
// edit control of the combo box.
if (pszMem != NULL)
{
SendDlgItemMessage(hwndDlg, IDD_COMBO,
CB_ADDSTRING, 0,
(DWORD) ((LPSTR) pszMem));
SetWindowText(hwndCombo, (LPSTR) NULL);
}
// Free the memory and return.
VirtualFree(pszMem, 0, MEM_RELEASE);
return TRUE;
//
// Process other dialog box commands.
//
}
//
// Process other dialog box messages.
//
}
Function Information
Header Declared in Winuser.h, include Windows.h
Import library User32.lib
Minimum operating systems Windows 95, Windows NT 3.1
Unicode Implemented as Unicode and ANSI versions on Windows NT, Windows 2000, Windows XP
(From http://zhidao.baidu.com/question/14866983.html)
Example 2:
动态修改外部应用程序标题与图标
关键字:不详
以修改计算器为例,注意是要它WINUPD.ICO在你的程序目录下
var
form_hw:HWND;
rcw : Word;
cnchar;
ic:TICON;
begin
rcw := WinExec(';calc.exe';, SW_SHOWNORMAL);//启动计算器
if rcw<=32 then //无法启动计算器
begin
Application.Terminate;
end ;
while true do//确保计算器启动
begin
form_hw:=FindWindow(nil,';计算器';);//计算器启动后标题为计算器,你一定要注意。
if boolean(form_hw) then break;
end;
cn:=';大家的计算器';;//修改后的标题
ic:=TICON.create;
ic.LoadFromFile(';WINUPD.ICO';);//修改后的图标
SendMessage(form_hw,WM_SETTEXT,0,Integer(cn));//修改标题
Sendmessage(form_hw,WM_SETICON,ICON_SMALL,ic.handle);//修改图标
freeandnil(ic); //释放ic
end;
(From http://www.codesky.net/article/doc/200308/2003080783452138.htm)
|
|