Changes to allow building when STRICT is defined.

This commit is contained in:
rpotts%netscape.com 1998-08-29 06:30:49 +00:00
Родитель cd747c1726
Коммит 530e081f25
4 изменённых файлов: 31 добавлений и 12 удалений

Просмотреть файл

@ -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;

Просмотреть файл

@ -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;

Просмотреть файл

@ -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

Просмотреть файл

@ -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;