Changeset 34636

Show
Ignore:
Timestamp:
07/26/09 21:43:19 (4 years ago)
Author:
saturday06
Message:

もうだめぽもうだめぽもうだめぽもうだめぽもうだめぽ

Files:
1 modified

Legend:

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

    r34635 r34636  
    226226    layout.width = layout.width + cx - layout.nc_width; 
    227227    layout.nc_width = cx; 
    228     int x = layout.margin_left + layout.edit_left; 
    229     int y = (layout.nc_height - layout.edit_height) / 2; 
    230228    int w = layout.nc_width - layout.edit_left - layout.margin_right - layout.margin_left; 
    231229    int h = layout.edit_height; 
    232     SetWindowPos(hEdit, 0, x, y, w, h, SWP_NOACTIVATE | SWP_NOREDRAW | SWP_NOOWNERZORDER | SWP_NOZORDER); 
     230    SetWindowPos(hEdit, 0, 0, 0, w, h, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOREDRAW | SWP_NOOWNERZORDER | SWP_NOZORDER); 
    233231    SetMsgHandled(false); 
    234232} 
     
    502500 
    503501    // ------------------------------------------------------------- 
    504     // �G�f�B�b�g�R���g���[���쐬 
    505     // 
    506     hEdit = CreateWindowEx( 
    507                 0, 
    508                 name, 
    509                 //_T("RICHEDIT"), 
    510                 //_T("EDIT"), 
    511                 _T(""), 
    512                 richedit_style, 
    513                 0, 
    514                 0, 
    515                 100, 
    516                 100, 
    517                 hWnd, 
    518                 NULL,//reinterpret_cast<HMENU>(IDC_EDIT), 
    519                 i3::hInstance, 
    520                 NULL 
    521             ); 
    522  
    523     // ------------------------------------------------------------- 
    524502    // �t�H���g�ݒ�    // 
    525503    HFONT font = NULL; 
     
    533511        font = (HFONT)GetStockObject(DEFAULT_GUI_FONT); 
    534512    } 
    535     SendMessage(hEdit, WM_SETFONT, (WPARAM)font, (LPARAM)FALSE); 
     513 
    536514#else 
    537515    font = (HFONT)SendMessage(hEdit, WM_GETFONT, NULL, NULL); 
     
    551529        int result = ReleaseDC(hWnd, dc); 
    552530    } 
    553  
    554 #ifndef _WIN32_WCE 
    555     LRESULT dwEvent = SendMessage(hEdit, EM_GETEVENTMASK, 0, 0); 
    556     dwEvent |= ENM_MOUSEEVENTS | ENM_KEYEVENTS | ENM_CHANGE; 
    557     SendMessage(hEdit, EM_SETEVENTMASK, 0, (LPARAM)dwEvent); 
    558 #endif 
    559531 
    560532    // ------------------------------------------------------------- 
     
    593565            SetWindowPos(hWnd, 0, 0, 0, layout.width, layout.height, SWP_NOACTIVATE | SWP_NOREDRAW | SWP_NOOWNERZORDER | SWP_NOZORDER | SWP_NOMOVE); 
    594566        } 
    595         OnSize(hWnd, SIZE_RESTORED, layout.nc_width, layout.nc_height); 
    596567    } 
    597568 
     
    648619    } 
    649620 
    650     // ------------------------------------------------------------- 
    651     // �E�B���h�E����ƗL��    // 
    652  
    653     //UpdateWindow(hEdit); 
    654     SetFocus(hEdit); 
    655     setWindow(hWnd); 
    656     hSharedEdit.store(hEdit); 
    657     //InvalidateRect(hWnd, NULL, FALSE); 
    658     UpdateWindow(hWnd); 
    659     //ShowWindow(hEdit, SW_HIDE); 
    660     ShowWindow(hWnd, nCmdShow); 
     621 
     622    // ------------------------------------------------------------- 
     623    // �G�f�B�b�g�R���g���[���쐬 
     624    // 
     625    int x = layout.margin_left + layout.edit_left; 
     626    int y = (layout.nc_height - layout.edit_height) / 2; 
     627    hEdit = CreateWindowEx( 
     628                0, 
     629                name, 
     630                //_T("RICHEDIT"), 
     631                //_T("EDIT"), 
     632                _T(""), 
     633                richedit_style, 
     634                x, 
     635                y, 
     636                100, 
     637                100, 
     638                hWnd, 
     639                NULL,//reinterpret_cast<HMENU>(IDC_EDIT), 
     640                i3::hInstance, 
     641                NULL 
     642            ); 
     643    SendMessage(hEdit, WM_SETFONT, (WPARAM)font, (LPARAM)FALSE); 
     644#ifndef _WIN32_WCE 
     645    LRESULT dwEvent = SendMessage(hEdit, EM_GETEVENTMASK, 0, 0); 
     646    dwEvent |= ENM_MOUSEEVENTS | ENM_KEYEVENTS | ENM_CHANGE; 
     647    SendMessage(hEdit, EM_SETEVENTMASK, 0, (LPARAM)dwEvent); 
     648#endif 
     649 
     650    OnSize(hWnd, SIZE_RESTORED, layout.nc_width, layout.nc_height); 
    661651 
    662652    // ------------------------------------------------------------- 
     
    671661    _tcscpy_s(connectingIcon.szTip, _T("")); 
    672662    Shell_NotifyIcon(NIM_ADD, &connectingIcon); 
    673 } 
    674  
    675 } 
     663 
     664    // ------------------------------------------------------------- 
     665    // �E�B���h�E����ƗL��    // 
     666    //UpdateWindow(hEdit); 
     667    SetFocus(hEdit); 
     668    setWindow(hWnd); 
     669    hSharedEdit.store(hEdit); 
     670    //InvalidateRect(hWnd, NULL, FALSE); 
     671    UpdateWindow(hWnd); 
     672    //ShowWindow(hEdit, SW_HIDE); 
     673    ShowWindow(hWnd, nCmdShow); 
     674} 
     675 
     676}