Freed 104 bytes for more dll imports, at the cost of 78 bytes of code
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1869 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
fa330ae04d
commit
3bfb7393d6
5 changed files with 29 additions and 11 deletions
|
@ -69,7 +69,7 @@ BOOL CALLBACK verProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
static char bt[64];
|
||||
wsprintf(bt,msg,MulDiv(m_pos,100,m_length));
|
||||
|
||||
SetWindowText(hwndDlg,bt);
|
||||
my_SetWindowText(hwndDlg,bt);
|
||||
my_SetDialogItemText(hwndDlg,IDC_STR,bt);
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -118,7 +118,7 @@ static BOOL NSISCALL SetDlgItemTextFromLang_(HWND dlg, int id, int lid) {
|
|||
|
||||
#define SetUITextFromLang(it,la) SetDlgItemTextFromLang_(hwndDlg,(it)-1000,la)
|
||||
#define SetUITextNT(it,text) my_SetDialogItemText(hwndDlg,it,text)
|
||||
#define GetUIText(it,s,ss) GetDlgItemText(hwndDlg,it,s,ss)
|
||||
#define GetUIText(it,s,ss) my_GetDialogItemText(hwndDlg,it,s,ss)
|
||||
#define GetUIItem(it) GetDlgItem(hwndDlg,it)
|
||||
|
||||
#ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
|
||||
|
@ -279,7 +279,7 @@ lang_again:
|
|||
|
||||
myitoa(state_language, *(LANGID*)language_table);
|
||||
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
|
||||
SetWindowText(m_bgwnd,process_string_fromtab(g_caption,LANG_CAPTION));
|
||||
my_SetWindowText(m_bgwnd,process_string_fromtab(g_caption,LANG_CAPTION));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -454,7 +454,7 @@ static int CALLBACK WINAPI BrowseCallbackProc( HWND hwnd, UINT uMsg, LPARAM lPar
|
|||
{
|
||||
if (uMsg==BFFM_INITIALIZED)
|
||||
{
|
||||
GetDlgItemText((HWND)lpData,IDC_DIR,g_tmp,sizeof(g_tmp));
|
||||
my_GetDialogItemText((HWND)lpData,IDC_DIR,g_tmp,sizeof(g_tmp));
|
||||
SendMessage(hwnd,BFFM_SETSELECTION,(WPARAM)1,(LPARAM)g_tmp);
|
||||
}
|
||||
return 0;
|
||||
|
@ -543,7 +543,7 @@ nextPage:
|
|||
|
||||
mystrcpy(g_tmp,g_caption);
|
||||
process_string_fromtab(g_tmp+mystrlen(g_tmp),this_page->caption);
|
||||
SetWindowText(hwndDlg,g_tmp);
|
||||
my_SetWindowText(hwndDlg,g_tmp);
|
||||
|
||||
if (this_page->id!=NSIS_PAGE_COMPLETED) DestroyWindow(m_curwnd);
|
||||
else {
|
||||
|
@ -749,7 +749,7 @@ static BOOL CALLBACK DirProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
|
|||
if (GetAsyncKeyState(VK_SHIFT)&0x8000)
|
||||
{
|
||||
HWND h=GetUIItem(IDC_CHECK1);
|
||||
SetWindowText(h,"Log install process");
|
||||
my_SetWindowText(h,"Log install process");
|
||||
ShowWindow(h,SW_SHOWNA);
|
||||
}
|
||||
#endif
|
||||
|
@ -1275,7 +1275,7 @@ void NSISCALL update_status_text(const char *text1, const char *text2)
|
|||
ListView_InsertItem(insthwnd, &new_item);
|
||||
ListView_EnsureVisible(insthwnd, new_item.iItem, 0);
|
||||
}
|
||||
if ((ui_st_updateflag&2)) SetWindowText(insthwnd2,tmp);
|
||||
if ((ui_st_updateflag&2)) my_SetWindowText(insthwnd2,tmp);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1359,7 +1359,7 @@ static BOOL CALLBACK InstProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
|
|||
if (lb_fg >= 0) {
|
||||
ListView_SetTextColor(insthwnd, lb_fg);
|
||||
}
|
||||
SetWindowText(insthwndbutton,LANG_STR(LANG_BTN_DETAILS));
|
||||
my_SetWindowText(insthwndbutton,LANG_STR(LANG_BTN_DETAILS));
|
||||
if (g_inst_cmnheader->show_details)
|
||||
{
|
||||
ShowWindow(insthwndbutton,SW_HIDE);
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "fileform.h"
|
||||
#include "state.h"
|
||||
#include "ui.h"
|
||||
#include "util.h"
|
||||
|
||||
#ifdef NSIS_SUPPORT_BGBG
|
||||
|
||||
|
@ -52,7 +53,7 @@ LRESULT CALLBACK BG_WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
static char buf[256];
|
||||
r.left+=16;
|
||||
r.top+=8;
|
||||
GetWindowText(hwnd,buf,sizeof(buf));
|
||||
my_GetWindowText(hwnd,buf,sizeof(buf));
|
||||
SetBkMode(hdc,TRANSPARENT);
|
||||
SetTextColor(hdc,bg_textcolor);
|
||||
oldFont = SelectObject(hdc,newFont);
|
||||
|
|
|
@ -41,9 +41,24 @@ HANDLE NSISCALL myCreateProcess(char *cmd, char *dir)
|
|||
return ProcInfo.hProcess;
|
||||
}
|
||||
|
||||
BOOL NSISCALL my_SetWindowText(HWND hWnd, const char *val)
|
||||
{
|
||||
return SendMessage(hWnd,WM_SETTEXT,0,(LPARAM)val);
|
||||
}
|
||||
|
||||
BOOL NSISCALL my_SetDialogItemText(HWND dlg, UINT idx, const char *val)
|
||||
{
|
||||
return SetDlgItemText(dlg,idx,val);
|
||||
return my_SetWindowText(GetDlgItem(dlg,idx),val);
|
||||
}
|
||||
|
||||
int NSISCALL my_GetWindowText(HWND hWnd, char *val, int size)
|
||||
{
|
||||
return SendMessage(hWnd,WM_GETTEXT,size,(LPARAM)val);
|
||||
}
|
||||
|
||||
int NSISCALL my_GetDialogItemText(HWND dlg, UINT idx, char *val, int size)
|
||||
{
|
||||
return my_GetWindowText(GetDlgItem(dlg,idx),val,size);
|
||||
}
|
||||
|
||||
int NSISCALL my_MessageBox(const char *text, UINT type) {
|
||||
|
|
|
@ -8,8 +8,10 @@ int NSISCALL myatoi(char *s);
|
|||
void NSISCALL myitoa(char *s, int d);
|
||||
char * NSISCALL mystrcpy(char *out, const char *in);
|
||||
int NSISCALL mystrlen(const char *in);
|
||||
BOOL NSISCALL my_SetWindowText(HWND hWnd, const char *val);
|
||||
BOOL NSISCALL my_SetDialogItemText(HWND dlg, UINT idx, const char *val);
|
||||
|
||||
int NSISCALL my_GetWindowText(HWND hWnd, char *val, int size);
|
||||
int NSISCALL my_GetDialogItemText(HWND dlg, UINT idx, char *val, int size);
|
||||
|
||||
#ifdef NSIS_CONFIG_LOG
|
||||
extern char log_text[NSIS_MAX_STRLEN*4];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue