From 09d243c6b401c49614bdc19e9921af33ac5e08e1 Mon Sep 17 00:00:00 2001 From: walbourn_cp Date: Tue, 11 Jun 2013 17:17:25 -0700 Subject: [PATCH] ddsview: Added filepath name to window title - Cleaned up /analyze issues --- DDSView/ddsview.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/DDSView/ddsview.cpp b/DDSView/ddsview.cpp index 3c3feef..e49f6c0 100644 --- a/DDSView/ddsview.cpp +++ b/DDSView/ddsview.cpp @@ -98,7 +98,8 @@ LRESULT CALLBACK WndProc( HWND, UINT, WPARAM, LPARAM ); void Render(); //-------------------------------------------------------------------------------------- -int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow ) +#pragma warning( suppress : 6262 ) +int WINAPI wWinMain( _In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPWSTR lpCmdLine, _In_ int nCmdShow ) { UNREFERENCED_PARAMETER( hPrevInstance ); UNREFERENCED_PARAMETER( lpCmdLine ); @@ -122,6 +123,8 @@ int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdL if( FAILED( InitWindow( hInstance, nCmdShow, mdata ) ) ) return 0; + SetWindowTextW( g_hWnd, lpCmdLine ); + if( FAILED( InitDevice( mdata ) ) ) { CleanupDevice(); @@ -133,7 +136,7 @@ int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdL if ( mdata.arraySize > 1 ) { WCHAR buff[2048]; - swprintf_s( buff, L"Arrays of volume textures are not supported\n\nFilename = %s\nArray size %d", lpCmdLine, mdata.arraySize ); + swprintf_s( buff, L"Arrays of volume textures are not supported\n\nFilename = %s\nArray size %Iu", lpCmdLine, mdata.arraySize ); MessageBox( NULL, buff, L"DDSView", MB_OK | MB_ICONEXCLAMATION ); return 0; }