From 0958af0fc70d1ed0eb2de1fbea43e87874c3741c Mon Sep 17 00:00:00 2001 From: qwerty2501 Date: Thu, 24 Nov 2011 22:45:37 +0900 Subject: [PATCH] 2011/11/24 22:45:37 --- nlite/nlite_commentWrite.h | 28 ++++++++++++++++++++++++---- nlite/nlite_mailframe.h | 2 ++ nlite/nlite_mainframe.cpp | 15 +++++++++++++-- 3 files changed, 39 insertions(+), 6 deletions(-) diff --git a/nlite/nlite_commentWrite.h b/nlite/nlite_commentWrite.h index 7889035..a9f6426 100644 --- a/nlite/nlite_commentWrite.h +++ b/nlite/nlite_commentWrite.h @@ -3,10 +3,18 @@ namespace nlite{ const static RECT SEPARATEFSIZE = {5,5,5,5}; - const static SIZE commentPosBoxSize = {80,0}; + const static SIZE commentPosBoxSize = {40,0}; + const static SIZE commentSizeBoxSize = {40,0}; + const static SIZE commentColorBoxSize = {40,0}; + const static SIZE commentWriteButtonSize = {40,0}; + const static SIZE commentAnonymousButtonSize = {50,0}; + const static SIZE commentWriteWindowSize = {0,40}; + + const LPCTSTR COMMENTWRITEWINDOW = TEXT("commentWriteWindow"); class CCommentWriteWindow:public CWindowImpl{ + private: CComboBox commentPosBox; CComboBox commentSizeBox; CComboBox commentColorBox; @@ -15,8 +23,12 @@ namespace nlite{ CButton commentWriteButton; + public: + + DECLARE_WND_CLASS(COMMENTWRITEWINDOW) + //ƒƒbƒZ[ƒWƒ}ƒbƒv - BEGIN_MSG_MAP(tn) + BEGIN_MSG_MAP(CCommentWriteWindow) MSG_WM_CREATE(OnCreate) MSG_WM_DESTROY(OnDestroy) MSG_WM_SIZING(OnSizing) @@ -28,10 +40,12 @@ namespace nlite{ commentPosBox.Create(m_hWnd,0,WC_COMBOBOX,WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST,0); commentSizeBox.Create(m_hWnd,0,WC_COMBOBOX,WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST,0); commentColorBox.Create(m_hWnd,0,WC_COMBOBOX,WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST,0); - anonymousButton.Create(m_hWnd,0,WC_BUTTON,WS_CHILD | WS_VISIBLE | BS_RADIOBUTTON,0); - comment.Create(m_hWnd,0,WC_EDIT,WS_CHILD | WS_VISIBLE,0); + anonymousButton.Create(m_hWnd,0,WC_BUTTON,WS_CHILD | WS_VISIBLE | BS_CHECKBOX,0); + comment.Create(m_hWnd,0,WC_EDIT,WS_CHILD | WS_VISIBLE | WS_BORDER,0); commentWriteButton.Create(m_hWnd,0,WC_BUTTON,WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,0); + anonymousButton.SetWindowTextW(TEXT("184")); + commentWriteButton.SetWindowTextW(TEXT("‘‚«ž‚Ý")); return 0; } @@ -61,6 +75,12 @@ namespace nlite{ VOID ChangeSize(SIZE &size){ + commentPosBox.MoveWindow(SEPARATEFSIZE.left,SEPARATEFSIZE.top, commentPosBoxSize.cx,commentWriteWindowSize.cy - (SEPARATEFSIZE.top + SEPARATEFSIZE.bottom),TRUE); + commentSizeBox.MoveWindow((SEPARATEFSIZE.left * 2) + SEPARATEFSIZE.right + commentPosBoxSize.cx, SEPARATEFSIZE.top, commentSizeBoxSize.cx,commentWriteWindowSize.cy - (SEPARATEFSIZE.top + SEPARATEFSIZE.bottom),TRUE); + commentColorBox.MoveWindow((SEPARATEFSIZE.left * 3) + (SEPARATEFSIZE.right * 2) + commentPosBoxSize.cx + commentSizeBoxSize.cx,SEPARATEFSIZE.top,commentColorBoxSize.cx,commentWriteWindowSize.cy - (SEPARATEFSIZE.top + SEPARATEFSIZE.bottom),TRUE); + anonymousButton.MoveWindow((SEPARATEFSIZE.left * 4) + (SEPARATEFSIZE.right * 3) + commentPosBoxSize.cx + commentSizeBoxSize.cx + commentColorBoxSize.cx ,SEPARATEFSIZE.top,commentAnonymousButtonSize.cx,commentWriteWindowSize.cy - (SEPARATEFSIZE.top + SEPARATEFSIZE.bottom),TRUE); + comment.MoveWindow((SEPARATEFSIZE.left * 5) + (SEPARATEFSIZE.right * 4) + commentPosBoxSize.cx + commentSizeBoxSize.cx + commentColorBoxSize.cx + commentAnonymousButtonSize.cx,SEPARATEFSIZE.top,size.cx - (SEPARATEFSIZE.left + (SEPARATEFSIZE.right * 2) + commentWriteButtonSize.cx + ((SEPARATEFSIZE.left * 5) + (SEPARATEFSIZE.right * 4) + commentPosBoxSize.cx + commentSizeBoxSize.cx + commentColorBoxSize.cx + commentAnonymousButtonSize.cx)),commentWriteWindowSize.cy - (SEPARATEFSIZE.top + SEPARATEFSIZE.bottom),TRUE); + commentWriteButton.MoveWindow(size.cx - (SEPARATEFSIZE.left + SEPARATEFSIZE.right + commentWriteButtonSize.cx),SEPARATEFSIZE.top,commentWriteButtonSize.cx - SEPARATEFSIZE.right,commentWriteWindowSize.cy - (SEPARATEFSIZE.top + SEPARATEFSIZE.bottom),TRUE); return; } diff --git a/nlite/nlite_mailframe.h b/nlite/nlite_mailframe.h index 5b6c6ba..63d6edd 100644 --- a/nlite/nlite_mailframe.h +++ b/nlite/nlite_mailframe.h @@ -8,6 +8,8 @@ namespace nlite{ const static SIZE lowestFrameSize = {300,300}; + + class CLiveUserData { public: diff --git a/nlite/nlite_mainframe.cpp b/nlite/nlite_mainframe.cpp index 17ce3b9..2a25497 100644 --- a/nlite/nlite_mainframe.cpp +++ b/nlite/nlite_mainframe.cpp @@ -7,6 +7,8 @@ using namespace nlite; static const RECT commentViewSize = {5,0,5,0}; + + //ƒTƒCƒY•ÏXˆ— VOID CNliteMainFrame::ChangeSize(const SIZE& client){ @@ -14,7 +16,7 @@ VOID CNliteMainFrame::ChangeSize(const SIZE& client){ - tabctrl.MoveWindow(0,toolBarHeight,client.cx,client.cy - (toolBarHeight + statusBarHeight)); + tabctrl.MoveWindow(0,toolBarHeight,client.cx,client.cy - (toolBarHeight + statusBarHeight + commentWriteWindowSize.cy)); RECT tabClientRect; @@ -26,7 +28,7 @@ VOID CNliteMainFrame::ChangeSize(const SIZE& client){ commentView.MoveWindow(tabClientRect.left, tabClientRect.top,tabClientRect.right - tabClientRect.left, tabClientRect.bottom - tabClientRect.top); - + commentWriteWindow.MoveWindow(0,client.cy - (commentWriteWindowSize.cy + statusBarHeight),client.cx,client.cy); @@ -42,20 +44,26 @@ LRESULT CNliteMainFrame::OnCreate(LPCREATESTRUCT lpcs){ tabctrl.Create(m_hWnd,0,NULL,WS_CHILD | WS_CLIPCHILDREN | WS_DLGFRAME); commentView.Create(tabctrl.m_hWnd); + commentWriteWindow.Create(m_hWnd,0,NULL,WS_CHILD | WS_VISIBLE); CreateSimpleReBar(); HWND hWndToolBar = CreateSimpleToolBarCtrl(m_hWnd,IDC_NLITE, FALSE, ATL_SIMPLE_TOOLBAR_PANE_STYLE); lvNoCombo.Create(m_hWnd, CRect(0, 0, 100, 100), NULL,WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWN , 0, IDC_COMBO_REBAR); lvNoCombo.SetFont(AtlGetDefaultGuiFont()); + + AddSimpleReBarBand(hWndToolBar); AddSimpleReBarBand(lvNoCombo,TEXT("•ú‘—URL")); SizeSimpleReBarBands(); + tabctrl.SetFont(hTabFont); tabctrl.SetWindowPos(HWND_BOTTOM,0,0,0,0,SWP_SHOWWINDOW); tabctrl.AddItem(TCIF_TEXT | TCIF_PARAM, _T("ƒRƒƒ“ƒgˆê——"), 0, (DWORD)commentView.m_hWnd); + + // ƒƒbƒZ[ƒWƒ‹[ƒv‚ɃƒbƒZ[ƒWƒtƒBƒ‹ƒ^‚ƃAƒCƒhƒ‹ƒnƒ“ƒhƒ‰‚ð’ljÁ CMessageLoop* pLoop = _Module.GetMessageLoop(); @@ -69,12 +77,15 @@ LRESULT CNliteMainFrame::OnCreate(LPCREATESTRUCT lpcs){ wndRect.bottom = nliteProperty.mfp.windowSize.cy != 0 ? nliteProperty.mfp.windowSize.cy : (LONG)cyMaxImized / 2; wndRect.right = nliteProperty.mfp.windowSize.cx != 0 ? nliteProperty.mfp.windowSize.cx : commentViewSize.left + commentViewSize.right + 20 + commentView.GetColumnHolSizeSum(); + RECT statusbarRect; ::GetClientRect(m_hWndStatusBar,&statusbarRect); statusBarHeight = statusbarRect.bottom - statusbarRect.top; + + this->MoveWindow(wndRect.left,wndRect.top,wndRect.right,wndRect.bottom); -- 2.11.0