OSDN Git Service

2011/11/24 22:45:37
authorqwerty2501 <riot313@gmail.com>
Thu, 24 Nov 2011 13:45:37 +0000 (22:45 +0900)
committerqwerty2501 <riot313@gmail.com>
Thu, 24 Nov 2011 13:45:37 +0000 (22:45 +0900)
nlite/nlite_commentWrite.h
nlite/nlite_mailframe.h
nlite/nlite_mainframe.cpp

index 7889035..a9f6426 100644 (file)
@@ -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<CCommentWriteWindow>{
 
+       private:
                CComboBox commentPosBox;
                CComboBox commentSizeBox;
                CComboBox commentColorBox;
@@ -15,8 +23,12 @@ namespace nlite{
                CButton commentWriteButton;
 
 
+       public:
+               
+               DECLARE_WND_CLASS(COMMENTWRITEWINDOW)
+
                //\83\81\83b\83Z\81[\83W\83}\83b\83v
-               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("\8f\91\82«\8d\9e\82Ý"));
                        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;
                }
index 5b6c6ba..63d6edd 100644 (file)
@@ -8,6 +8,8 @@ namespace nlite{
 
        const static SIZE lowestFrameSize = {300,300};
 
+       
+
        class CLiveUserData {
 
        public:
index 17ce3b9..2a25497 100644 (file)
@@ -7,6 +7,8 @@ using namespace nlite;
 static const RECT commentViewSize = {5,0,5,0};
 
 
+
+
 //\83T\83C\83Y\95Ï\8dX\8f\88\97\9d
 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("\95ú\91\97URL"));
        SizeSimpleReBarBands();
        
+       
 
        tabctrl.SetFont(hTabFont);      
        tabctrl.SetWindowPos(HWND_BOTTOM,0,0,0,0,SWP_SHOWWINDOW);
        tabctrl.AddItem(TCIF_TEXT | TCIF_PARAM, _T("\83R\83\81\83\93\83g\88ê\97\97"), 0, (DWORD)commentView.m_hWnd);
+
+       
                
        // \83\81\83b\83Z\81[\83W\83\8b\81[\83v\82É\83\81\83b\83Z\81[\83W\83t\83B\83\8b\83^\82Æ\83A\83C\83h\83\8b\83n\83\93\83h\83\89\82ð\92Ç\89Á
        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);