Jim Park's Unicode NSIS merging - Step 1 : switch to TCHARs where relevant.

Compiler output is identical before & after this step

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/branches/wizou@6036 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
wizou 2010-03-24 17:22:56 +00:00
parent 4e48722b63
commit 752d7d239a
209 changed files with 9698 additions and 7658 deletions

View file

@ -1,14 +1,16 @@
// ui.cpp : Defines the entry point for the application.
//
// Unicode support by Jim Park -- 08/10/2007
#include <windows.h>
#include <commctrl.h>
#include "../ExDLL/nsis_tchar.h"
#include "resource.h"
HINSTANCE g_hInstance;
HWND m_curwnd;
char* windows[] = {
TCHAR* windows[] = {
MAKEINTRESOURCE(IDD_LICENSE),
MAKEINTRESOURCE(IDD_SELCOM),
MAKEINTRESOURCE(IDD_DIR),
@ -34,11 +36,11 @@ BOOL CALLBACK DialogProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam) {
static int i = -1;
switch (uMsg) {
case WM_INITDIALOG:
SetWindowText(hwndDlg, "NSIS User Interface - Testing");
SetWindowText(GetDlgItem(hwndDlg, IDC_VERSTR), "NSIS version");
SetWindowText(GetDlgItem(hwndDlg, IDC_BACK), "< Back");
SetWindowText(GetDlgItem(hwndDlg, IDOK), "Next >");
SetWindowText(GetDlgItem(hwndDlg, IDCANCEL), "Cancel");
SetWindowText(hwndDlg, _T("NSIS User Interface - Testing"));
SetWindowText(GetDlgItem(hwndDlg, IDC_VERSTR), _T("NSIS version"));
SetWindowText(GetDlgItem(hwndDlg, IDC_BACK), _T("< Back"));
SetWindowText(GetDlgItem(hwndDlg, IDOK), _T("Next >"));
SetWindowText(GetDlgItem(hwndDlg, IDCANCEL), _T("Cancel"));
ShowWindow(GetDlgItem(hwndDlg, IDC_BACK), SW_SHOW);
ShowWindow(GetDlgItem(hwndDlg, IDC_CHILDRECT), SW_SHOW);
SendMessage(hwndDlg, WM_COMMAND, MAKEWORD(IDOK, 0), 0);
@ -53,7 +55,7 @@ BOOL CALLBACK DialogProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam) {
i++;
break;
}
if (i >= (int)sizeof(windows)/sizeof(char*)) {
if (i >= (int)sizeof(windows)/sizeof(TCHAR*)) {
i--;
break;
}
@ -78,14 +80,14 @@ BOOL CALLBACK DialogProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam) {
return 0;
}
int APIENTRY WinMain(HINSTANCE hInstance,
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
LPTSTR lpCmdLine,
int nCmdShow)
{
InitCommonControls();
LoadLibrary("RichEd32.dll");
LoadLibrary(_T("RichEd32.dll"));
g_hInstance = GetModuleHandle(0);