Show
Ignore:
Timestamp:
01/10/10 02:33:27 (3 years ago)
Author:
saturday06
Message:

高付加時にがめんがちじゃいk

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/objective-cplusplus/i3/trunk/src/gui-windows/InputWindowPlatform.cpp

    r36377 r36380  
    1616 
    1717static WNDPROC EditDefaultWndProc = NULL; 
    18 static LRESULT CALLBACK EditWndProc2(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { 
     18#if defined(UNICODE) && defined(_UNICODE) 
     19LRESULT MyCallWindowProc(WNDPROC WndProc, HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { 
     20        return WndProc(hWnd, message, wParam, lParam); 
     21} 
     22#else 
     23LRESULT MyCallWindowProc(WNDPROC WndProc, HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { 
     24        return CallWindowProc(WndProc, hWnd, message, wParam, lParam); 
     25} 
     26#endif 
     27static LRESULT CALLBACK BlurEditWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { 
    1928    static bool captured = false; 
    2029    static bool focused = false; 
     
    6675        PAINTSTRUCT ps; 
    6776        HDC hdc = BeginPaint(hWnd, &ps); 
    68         FillRect(ps.hdc, &ps.rcPaint, (HBRUSH)GetStockObject(BLACK_BRUSH)); // XXX 
     77//        FillRect(ps.hdc, &ps.rcPaint, (HBRUSH)GetStockObject(BLACK_BRUSH)); // XXX 
    6978                BLENDFUNCTION bf = {}; 
    7079                bf.BlendOp = AC_SRC_OVER; 
     
    91100                if (paint_buffer == 0) { 
    92101                    EndPaint(hWnd, &ps); 
    93                         return CallWindowProc(EditDefaultWndProc, hWnd, message, wParam, lParam); // XXX 
     102                        return MyCallWindowProc(EditDefaultWndProc, hWnd, message, wParam, lParam); // XXX 
    94103                } 
    95         FillRect(mem_dc, &ps.rcPaint, (HBRUSH)GetStockObject(BLACK_BRUSH)); 
    96  
    97                 CallWindowProc(EditDefaultWndProc, hWnd, WM_PRINTCLIENT, (WPARAM)mem_dc, PRF_CLIENT); // XXX 
     104        //FillRect(mem_dc, &ps.rcPaint, (HBRUSH)GetStockObject(BLACK_BRUSH)); 
     105 
     106                MyCallWindowProc(EditDefaultWndProc, hWnd, WM_PRINTCLIENT, (WPARAM)mem_dc, PRF_CLIENT); // XXX 
    98107 
    99108        dll.dll_BufferedPaintSetAlpha(paint_buffer, 0, 255); 
     109 
     110        FillRect(ps.hdc, &ps.rcPaint, (HBRUSH)GetStockObject(BLACK_BRUSH)); // XXX 
    100111        dll.dll_EndBufferedPaint(paint_buffer, TRUE); 
    101112                EndPaint(hWnd, &ps); 
     
    104115    } 
    105116 
    106     return CallWindowProc(EditDefaultWndProc, hWnd, message, wParam, lParam); // XXX 
     117    return MyCallWindowProc(EditDefaultWndProc, hWnd, message, wParam, lParam); // XXX 
    107118} 
    108119 
     
    852863                NULL 
    853864            ); 
    854     EditDefaultWndProc = (WNDPROC)GetWindowLongPtr(edit, GWLP_WNDPROC); 
    855     SetWindowLongPtr(edit, GWLP_WNDPROC, (LONG_PTR)EditWndProc2); 
     865 
     866    if (is_dwm_extend_frame_into_client_area) { 
     867            EditDefaultWndProc = (WNDPROC)GetWindowLongPtr(edit, GWLP_WNDPROC); 
     868                SetWindowLongPtr(edit, GWLP_WNDPROC, (LONG_PTR)BlurEditWndProc); 
     869        } 
    856870 
    857871    SendMessage(edit, WM_SETFONT, (WPARAM)font, (LPARAM)FALSE);