Ignore:
Timestamp:
Nov 14, 2011, 11:03:47 PM (14 years ago)
Author:
dmik
Message:

Port USER32.DLL (continued).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gcc-kmk/src/user32/win32wbase.cpp

    r21720 r21808  
    6464#include <wprocess.h>
    6565#include <win/hook.h>
    66 #include <menu.h>
     66#include "menu.h"
    6767#define INCL_TIMERWIN32
    6868#include "timer.h"
     
    7979void PrintWindowStyle(DWORD dwStyle, DWORD dwExStyle);
    8080
    81 static fDestroyAll = FALSE;
     81static BOOL fDestroyAll = FALSE;
    8282//For quick lookup of current process id
    8383static ULONG currentProcessId = -1;
     
    308308{
    309309    dprintf2(("IsWindowUnicode %x %d", getWindowHandle(), WINPROC_GetProcType(getWindowProc()) == WIN_PROC_32W));
    310     return (WINPROC_GetProcType(getWindowProc()) == WIN_PROC_32W);
     310    return (WINPROC_GetProcType((HWINDOWPROC)getWindowProc()) == WIN_PROC_32W);
    311311}
    312312//******************************************************************************
     
    461461    }
    462462
    463     WINPROC_SetProc((HWINDOWPROC *)&win32wndproc, windowClass->getWindowProc((isUnicode) ? WNDPROC_UNICODE : WNDPROC_ASCII), WINPROC_GetProcType(windowClass->getWindowProc((isUnicode) ? WNDPROC_UNICODE : WNDPROC_ASCII)), WIN_PROC_WINDOW);
     463    WINPROC_SetProc((HWINDOWPROC *)&win32wndproc,
     464                    windowClass->getWindowProc((isUnicode) ? WNDPROC_UNICODE : WNDPROC_ASCII),
     465                    WINPROC_GetProcType((HWINDOWPROC)windowClass->getWindowProc((isUnicode) ? WNDPROC_UNICODE : WNDPROC_ASCII)),
     466                    WIN_PROC_WINDOW);
    464467    hInstance  = cs->hInstance;
    465468    dwStyle    = cs->style & ~WS_VISIBLE;
     
    38603863                    type = (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A;
    38613864                }
    3862                 oldval = (LONG)WINPROC_GetProc(win32wndproc, (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A);
     3865                oldval = (LONG)WINPROC_GetProc((HWINDOWPROC)win32wndproc, (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A);
    38633866                dprintf(("SetWindowLong%c GWL_WNDPROC %x old %x new wndproc %x", (fUnicode) ? 'W' : 'A', getWindowHandle(), oldval, value));
    38643867                WINPROC_SetProc((HWINDOWPROC *)&win32wndproc, (WNDPROC)value, type, WIN_PROC_WINDOW);
     
    39163919        break;
    39173920    case GWL_WNDPROC:
    3918         value = (LONG)WINPROC_GetProc(win32wndproc, (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A);
     3921        value = (LONG)WINPROC_GetProc((HWINDOWPROC)win32wndproc, (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A);
    39193922        break;
    39203923    case GWL_HINSTANCE:
     
    41154118{
    41164119    lock(&critsect);
    4117     for(int i=0;i<MAX_OPENDCS;i++) {
     4120    int i;
     4121    for(i=0;i<MAX_OPENDCS;i++) {
    41184122        if(hdcWindow[i] == 0) {
    41194123            hdcWindow[i] = hdc;
     
    41544158    }
    41554159    lock(&critsect);
    4156     for(int i=0;i<MAX_OPENDCS;i++) {
     4160    int i;
     4161    for(i=0;i<MAX_OPENDCS;i++) {
    41574162        if(hdcWindow[i] == hdc) {
    41584163            hdcWindow[i] = 0;
Note: See TracChangeset for help on using the changeset viewer.