diff --git a/webshell/tests/imgtest/ImageTest.cpp b/webshell/tests/imgtest/ImageTest.cpp index ec3ae1df2d9..3d60bfb4436 100644 --- a/webshell/tests/imgtest/ImageTest.cpp +++ b/webshell/tests/imgtest/ImageTest.cpp @@ -47,7 +47,7 @@ static NS_DEFINE_IID(kCScrollbarIID, NS_VERTSCROLLBAR_CID); static char* class1Name = "ImageTest"; -static HANDLE gInstance, gPrevInstance; +static HINSTANCE gInstance, gPrevInstance; static nsIImageManager *gImageManager = nsnull; static nsIImageGroup *gImageGroup = nsnull; static nsIImageRequest *gImageReq = nsnull; @@ -353,7 +353,7 @@ static HWND CreateTopLevel(const char* clazz, const char* title, #define GFXWIN_DLL "raptorgfxwin.dll" int PASCAL -WinMain(HANDLE instance, HANDLE prevInstance, LPSTR cmdParam, int nCmdShow) +WinMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR cmdParam, int nCmdShow) { gInstance = instance; diff --git a/webshell/tests/viewer/JSConsole.cpp b/webshell/tests/viewer/JSConsole.cpp index a965b9f8def..d5e69985c5c 100644 --- a/webshell/tests/viewer/JSConsole.cpp +++ b/webshell/tests/viewer/JSConsole.cpp @@ -151,7 +151,13 @@ LRESULT CALLBACK JSConsole::WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPAR ::SetFocus(hWndEdit); } - return ::CallWindowProc((FARPROC)::DefWindowProc, hWnd, uMsg, wParam, lParam); +#if defined(STRICT) + return ::CallWindowProc((WNDPROC)::DefWindowProc, hWnd, uMsg, + wParam, lParam); +#else + return ::CallWindowProc((FARPROC)::DefWindowProc, hWnd, uMsg, + wParam, lParam); +#endif /* STRICT */ } switch(uMsg) { @@ -164,7 +170,13 @@ LRESULT CALLBACK JSConsole::WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPAR case WM_DESTROY: console->OnDestroy(); - return ::CallWindowProc((FARPROC)::DefWindowProc, hWnd, uMsg, wParam, lParam); +#if defined(STRICT) + return ::CallWindowProc((WNDPROC)::DefWindowProc, hWnd, uMsg, + wParam, lParam); +#else + return ::CallWindowProc((FARPROC)::DefWindowProc, hWnd, uMsg, + wParam, lParam); +#endif /* STRICT */ // enable/disable menu items case WM_INITMENUPOPUP: @@ -263,7 +275,13 @@ LRESULT CALLBACK JSConsole::WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPAR return console->OnSetFocus((HWND)wParam); default: - return ::CallWindowProc((FARPROC)::DefWindowProc, hWnd, uMsg, wParam, lParam); +#if defined(STRICT) + return ::CallWindowProc((WNDPROC)::DefWindowProc, hWnd, uMsg, + wParam, lParam); +#else + return ::CallWindowProc((FARPROC)::DefWindowProc, hWnd, uMsg, + wParam, lParam); +#endif /* STRICT */ } return 0; diff --git a/webshell/tests/viewer/nsViewerApp.cpp b/webshell/tests/viewer/nsViewerApp.cpp index 3c6a46a8c6b..fa8df52e73f 100644 --- a/webshell/tests/viewer/nsViewerApp.cpp +++ b/webshell/tests/viewer/nsViewerApp.cpp @@ -478,7 +478,7 @@ static char gVerifyDir[_MAX_PATH]; static BOOL gVisualDebug = TRUE; extern JSConsole *gConsole; -extern HANDLE gInstance, gPrevInstance; +extern HINSTANCE gInstance, gPrevInstance; extern "C" NS_EXPORT int DebugRobot( nsVoidArray * workList, nsIWebShell * ww, @@ -553,7 +553,7 @@ NS_IMETHODIMP nsViewerApp::CreateRobot(nsBrowserWindow* aWindow) { #if defined(XP_PC) && defined(NS_DEBUG) - if (CreateRobotDialog(aWindow->mWindow->GetNativeData(NS_NATIVE_WIDGET))) + if (CreateRobotDialog((HWND)aWindow->mWindow->GetNativeData(NS_NATIVE_WIDGET))) { nsIPresShell* shell = aWindow->GetPresShell(); if (nsnull != shell) { @@ -788,7 +788,7 @@ nsViewerApp::CreateSiteWalker(nsBrowserWindow* aWindow) if (nsnull == gWinData) { gWinData = aWindow; NS_ADDREF(aWindow); - CreateSiteWalkerDialog(aWindow->mWindow->GetNativeData(NS_NATIVE_WIDGET)); + CreateSiteWalkerDialog((HWND)aWindow->mWindow->GetNativeData(NS_NATIVE_WIDGET)); } #endif return NS_OK; @@ -812,7 +812,7 @@ static void DestroyConsole() static void ShowConsole(nsBrowserWindow* aWindow) { - HWND hWnd = aWindow->mWindow->GetNativeData(NS_NATIVE_WIDGET); + HWND hWnd = (HWND)aWindow->mWindow->GetNativeData(NS_NATIVE_WIDGET); if (!gConsole) { // load the accelerator table for the console diff --git a/webshell/tests/viewer/nsWinMain.cpp b/webshell/tests/viewer/nsWinMain.cpp index 90f37a30ac3..8cad23e271c 100644 --- a/webshell/tests/viewer/nsWinMain.cpp +++ b/webshell/tests/viewer/nsWinMain.cpp @@ -24,7 +24,7 @@ #include "plevent.h" JSConsole *gConsole; -HANDLE gInstance, gPrevInstance; +HINSTANCE gInstance, gPrevInstance; static nsITimer* gNetTimer; nsNativeViewerApp::nsNativeViewerApp() @@ -69,7 +69,7 @@ nsresult nsNativeBrowserWindow::CreateMenuBar(PRInt32 aWidth) { HMENU menu = ::LoadMenu(gInstance, "Viewer"); - HWND hwnd = mWindow->GetNativeData(NS_NATIVE_WIDGET); + HWND hwnd = (HWND)mWindow->GetNativeData(NS_NATIVE_WIDGET); ::SetMenu(hwnd, menu); return NS_OK; @@ -99,7 +99,8 @@ int main(int argc, char **argv) } int PASCAL -WinMain(HANDLE instance, HANDLE prevInstance, LPSTR cmdParam, int nCmdShow) +WinMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR cmdParam, + int nCmdShow) { gInstance = instance; gPrevInstance = prevInstance;