OSDN Git Service

2011/11/24 7:47:58
authorqwerty2501 <riot313@gmail.com>
Wed, 23 Nov 2011 22:47:58 +0000 (07:47 +0900)
committerqwerty2501 <riot313@gmail.com>
Wed, 23 Nov 2011 22:47:58 +0000 (07:47 +0900)
nlite/nlite.vcxproj
nlite/nlite_commentWrite.h [new file with mode: 0644]
nlite/nlite_include.h
nlite/nlite_mailframe.h
nlite/nlite_mainframe.cpp

index 55b848d..a4fc488 100644 (file)
   <ItemGroup>
     <ClInclude Include="nlite.h" />
     <ClInclude Include="nlite_commentview.h" />
+    <ClInclude Include="nlite_commentWrite.h" />
     <ClInclude Include="nlite_common.h" />
     <ClInclude Include="nlite_define.h" />
     <ClInclude Include="nlite_exception.h" />
diff --git a/nlite/nlite_commentWrite.h b/nlite/nlite_commentWrite.h
new file mode 100644 (file)
index 0000000..7889035
--- /dev/null
@@ -0,0 +1,69 @@
+#pragma once
+
+namespace nlite{
+
+       const static RECT SEPARATEFSIZE = {5,5,5,5};
+       const static SIZE commentPosBoxSize = {80,0};
+       
+       class CCommentWriteWindow:public CWindowImpl<CCommentWriteWindow>{
+
+               CComboBox commentPosBox;
+               CComboBox commentSizeBox;
+               CComboBox commentColorBox;
+               CButton anonymousButton;
+               CEdit comment;
+               CButton commentWriteButton;
+
+
+               //\83\81\83b\83Z\81[\83W\83}\83b\83v
+               BEGIN_MSG_MAP(tn)
+                       MSG_WM_CREATE(OnCreate)
+                       MSG_WM_DESTROY(OnDestroy)
+                       MSG_WM_SIZING(OnSizing)
+                       MSG_WM_SIZE(OnSize)
+               END_MSG_MAP()
+
+               LRESULT OnCreate(LPCREATESTRUCT lpReateStruct){
+
+                       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);
+                       commentWriteButton.Create(m_hWnd,0,WC_BUTTON,WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,0);
+
+                       return 0;
+               }
+
+               VOID OnDestroy(){
+                       commentPosBox.DestroyWindow();
+                       commentSizeBox.DestroyWindow();
+                       commentColorBox.DestroyWindow();
+                       anonymousButton.DestroyWindow();
+                       comment.DestroyWindow();
+                       commentWriteButton.DestroyWindow();
+
+               }
+
+               VOID OnSizing(UINT wParam,LPRECT lParam){
+
+                       RECT client;
+                       GetClientRect(&client);
+
+                       ChangeSize( _WTYPES_NS::CSize(client.right - client.left,client.bottom - client.top));
+                       return;
+               }
+
+               LRESULT OnSize(UINT wParam,SIZE lParam){
+                       ChangeSize(lParam);
+                       return 0;
+               }
+
+               VOID ChangeSize(SIZE &size){
+
+
+                       return;
+               }
+       };
+
+}
\ No newline at end of file
index 0d6006c..b756174 100644 (file)
@@ -10,6 +10,7 @@
 
 
 #include "nlite_exception.h"
+#include "nlite_commentWrite.h"
 #include "nlite_nlib.h"
 #include "nlite_define.h"
 #include "nlite_common.h"
index 9386304..5b6c6ba 100644 (file)
@@ -6,6 +6,7 @@ namespace nlite{
        
        const static LPCTSTR NLITE_MAINWINDOW = TEXT("nlite");
 
+       const static SIZE lowestFrameSize = {300,300};
 
        class CLiveUserData {
 
@@ -89,6 +90,7 @@ namespace nlite{
                CNicoVideoAuth nicoVideoAuth;
                CStatusBarCtrl statusBar;
                CLiveUserData userData;
+               CCommentWriteWindow commentWriteWindow;
                CTabCtrl tabctrl;
                Property nliteProperty;
                HFONT hTabFont;
@@ -151,7 +153,8 @@ namespace nlite{
                //\83T\83C\83Y\95Ï\8dX\92\86
                LRESULT OnSizing(UINT uMsg,WPARAM wParam,LPARAM lParam,BOOL& bHandled){
 
-                       
+                       ((LPRECT)lParam)->right = ((LPRECT)lParam)->right - ((LPRECT)lParam)->left < lowestFrameSize.cx ? lowestFrameSize.cx + ((LPRECT)lParam)->left : ((LPRECT)lParam)->right;
+                       ((LPRECT)lParam)->bottom = ((LPRECT)lParam)->bottom - ((LPRECT)lParam)->top < lowestFrameSize.cy ? lowestFrameSize.cy + ((LPRECT)lParam)->top : ((LPRECT)lParam)->bottom;
                        RECT client;
                        GetClientRect(&client);
 
index db85fb7..17ce3b9 100644 (file)
@@ -11,7 +11,7 @@ static const RECT commentViewSize = {5,0,5,0};
 VOID CNliteMainFrame::ChangeSize(const SIZE& client){
 
        
-       
+
        
        
        tabctrl.MoveWindow(0,toolBarHeight,client.cx,client.cy - (toolBarHeight + statusBarHeight));