+ chg: Change application entry point from WinMain to wWinMain. (See MSDN article "WinMain: The Application Entry Point" at https://msdn.microsoft.com/en-us/library/windows/desktop/ff381406.)

This commit is contained in:
Rainer Kottenhoff 2018-08-17 19:58:32 +02:00
parent 63b09def6a
commit 0ee77e7d2f
4 changed files with 9 additions and 13 deletions

View File

@ -279,7 +279,7 @@ static HMODULE __fastcall _LoadLanguageResources(LANGID const langID)
// WinMain()
//
//
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInst,LPSTR lpCmdLine,int nCmdShow)
int WINAPI wWinMain(HINSTANCE hInstance,HINSTANCE hPrevInst,LPWSTR lpCmdLine,int nCmdShow)
{
UNUSED(hPrevInst);
@ -407,8 +407,9 @@ BOOL InitApplication(HINSTANCE hInstance)
// InitInstance()
//
//
HWND InitInstance(HINSTANCE hInstance,LPSTR pszCmdLine,int nCmdShow)
HWND InitInstance(HINSTANCE hInstance,LPWSTR pszCmdLine,int nCmdShow)
{
UNUSED(pszCmdLine);
RECT rc;
rc.left = wi.x; rc.top = wi.y; rc.right = wi.x + wi.cx; rc.bottom = wi.y + wi.cy;
@ -521,11 +522,7 @@ HWND InitInstance(HINSTANCE hInstance,LPSTR pszCmdLine,int nCmdShow)
if (!ListView_GetItemCount(hwndDirList))
PostMessage(hwndMain,WM_COMMAND,MAKELONG(IDM_VIEW_UPDATE,1),0);
UNUSED(pszCmdLine);
return(hwndMain);
}

View File

@ -83,7 +83,7 @@
//==== Function Declarations ==================================================
BOOL InitApplication(HINSTANCE);
HWND InitInstance(HINSTANCE,LPSTR,int);
HWND InitInstance(HINSTANCE,LPWSTR,int);
BOOL ActivatePrevInst();
void ShowNotifyIcon(HWND,BOOL);

View File

@ -604,7 +604,7 @@ static void __fastcall _SetDocumentModified(bool bModified)
//
//
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInst,LPSTR lpCmdLine,int nCmdShow)
int WINAPI wWinMain(HINSTANCE hInstance,HINSTANCE hPrevInst,LPWSTR lpCmdLine,int nCmdShow)
{
UNUSED(hPrevInst);
@ -1097,8 +1097,10 @@ static void __fastcall _InitWindowPosition(HWND hwnd)
// InitInstance()
//
//
HWND InitInstance(HINSTANCE hInstance,LPSTR pszCmdLine,int nCmdShow)
HWND InitInstance(HINSTANCE hInstance,LPWSTR pszCmdLine,int nCmdShow)
{
UNUSED(pszCmdLine);
g_hwndMain = NULL;
_InitWindowPosition(g_hwndMain);
@ -1353,9 +1355,6 @@ HWND InitInstance(HINSTANCE hInstance,LPSTR pszCmdLine,int nCmdShow)
PostMessage(g_hwndMain, WM_CLOSE, 0, 0);
}
UNUSED(pszCmdLine);
return(g_hwndMain);
}

View File

@ -110,7 +110,7 @@ typedef enum {
//==== Function Declarations ==================================================
bool InitApplication(HINSTANCE);
HWND InitInstance(HINSTANCE,LPSTR,int);
HWND InitInstance(HINSTANCE,LPWSTR,int);
void BeginWaitCursor(LPCWSTR text);
void EndWaitCursor();
bool ActivatePrevInst();