Changeset 34636
- Timestamp:
- 07/26/09 21:43:19 (4 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/objective-cplusplus/i3/trunk/src/gui-windows/InputWindowPlatform.cpp
r34635 r34636 226 226 layout.width = layout.width + cx - layout.nc_width; 227 227 layout.nc_width = cx; 228 int x = layout.margin_left + layout.edit_left;229 int y = (layout.nc_height - layout.edit_height) / 2;230 228 int w = layout.nc_width - layout.edit_left - layout.margin_right - layout.margin_left; 231 229 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); 233 231 SetMsgHandled(false); 234 232 } … … 502 500 503 501 // ------------------------------------------------------------- 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 NULL521 );522 523 // -------------------------------------------------------------524 502 // �t�H���g�ݒ� // 525 503 HFONT font = NULL; … … 533 511 font = (HFONT)GetStockObject(DEFAULT_GUI_FONT); 534 512 } 535 SendMessage(hEdit, WM_SETFONT, (WPARAM)font, (LPARAM)FALSE); 513 536 514 #else 537 515 font = (HFONT)SendMessage(hEdit, WM_GETFONT, NULL, NULL); … … 551 529 int result = ReleaseDC(hWnd, dc); 552 530 } 553 554 #ifndef _WIN32_WCE555 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 #endif559 531 560 532 // ------------------------------------------------------------- … … 593 565 SetWindowPos(hWnd, 0, 0, 0, layout.width, layout.height, SWP_NOACTIVATE | SWP_NOREDRAW | SWP_NOOWNERZORDER | SWP_NOZORDER | SWP_NOMOVE); 594 566 } 595 OnSize(hWnd, SIZE_RESTORED, layout.nc_width, layout.nc_height);596 567 } 597 568 … … 648 619 } 649 620 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); 661 651 662 652 // ------------------------------------------------------------- … … 671 661 _tcscpy_s(connectingIcon.szTip, _T("")); 672 662 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 }
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)