private:
const UINT menuOrID;
CCommentList commentlist;
- UINT_PTR headerHol[5];
+ CCommentViewProperty viewproperty;
UINT_PTR columnHolSizeSum;
:menuOrID(256),
columnHolSizeSum(0)
{
- ZeroMemory(headerHol,sizeof(headerHol));
+
}
+ VOID SetProperty(CCommentViewProperty &setProperty){
+
+ viewproperty = setProperty;
+ }
+ /*
VOID SetHeaderSize(UINT_PTR first,UINT_PTR second,UINT_PTR third,UINT_PTR forth,UINT_PTR fifth){
headerHol[0] = first;
headerHol[3] = forth;
headerHol[4] = fifth;
}
+ */
HWND Create(HWND hWndParent){
GetTextExtentPoint32(hdc , columns[index] , _tcslen(columns[index]) , &size);
UINT_PTR holsize = holizenSize[index] + size.cx + 15;
- holizenSize[index] = headerHol[index] > 0 ? headerHol[index] : holsize;
+ holizenSize[index] = viewproperty.headerholSize[index] >= 0 ? viewproperty.headerholSize[index] : holsize;
columnHolSizeSum += holsize > holizenSize[index] ? holsize : holizenSize[index];
}
}HEADERSINFO,*LPHEADERSINFO;
- class Property{
+
+
+ class CCommentViewProperty{
+
+
+ public:
+ INT_PTR headerholSize[5];
+
+ CCommentViewProperty(){
+
+ this->Initialize();
+ }
+
+ VOID Initialize(){
+ memset(headerholSize,-1,sizeof(headerholSize));
+ }
+
+
+ };
+
+ class CMainFrameProperty{
+
+ public:
+
+ SIZE windowSize;
+ BOOL windowFrontFlag;
+
+ CMainFrameProperty(){
+
+ Initialize();
+
+ }
+
+
+ VOID Initialize(){
+
+ ZeroMemory(&windowSize,sizeof(windowSize));
+ windowFrontFlag = TRUE;
+ }
+
+
+ };
+
+ class CProperty{
+
+ public:
+ CCommentViewProperty cvp;
+ CMainFrameProperty mfp;
+
+ CProperty(){
+
+ this->Initialize();
+ }
+
+ VOID Initialize(){
+
+ cvp.Initialize();
+ }
};
private:
NicoLiveStream_P nicoLiveStream;
- CLiveUserData &userData;
- CNicoVideoAuth &nicoVideoAuth;
+
public:
- CNicoLiveStream(CLiveUserData &ud,CNicoVideoAuth &nva)
- :nicoLiveStream(NicoLiveStream_new()),
- userData(ud),
- nicoVideoAuth(nva)
+ CNicoLiveStream()
+ :nicoLiveStream(NicoLiveStream_new())
+
{}
~CNicoLiveStream(){
- VOID Connect(LPCTSTR url){
+ VOID Connect(CLiveUserData &userData,CNicoVideoAuth &nicoVideoAuth,LPCTSTR url){
NLIB_RESULT rslt;
CStatusBarCtrl statusBar;
CLiveUserData userData;
CTabCtrl tabctrl;
+ CProperty nliteProperty;
HFONT hTabFont;
CComboBox lvNoCombo;
+ INT_PTR statusBarHeight;
+ INT_PTR toolBarHeight;
private:
// \83\81\83b\83Z\81[\83W\83t\83B\83\8b\83^\8f\88\97\9d
CNliteMainFrame()
:userData(commentView),
- nicoLiveStream(userData,nicoVideoAuth)
+ nicoLiveStream()
{
LOGFONT lf = {0};
//\83c\81[\83\8b\83o\81[\8d\82\82³\95Ï\8dX
LRESULT OnRbnHeightChange(INT_PTR wParam,LPNMHDR lParam,BOOL &bHandled){
+ RECT toolbarRect;
+ ::GetClientRect(m_hWndToolBar,&toolbarRect);
+ toolBarHeight = toolbarRect.bottom - toolbarRect.top;
RECT client;
GetClientRect(&client);
ChangeSize( _WTYPES_NS::CSize(client.right - client.left,client.bottom - client.top));
+
return 0;
}
//\83T\83C\83Y\95Ï\8dX\8f\88\97\9d
VOID CNliteMainFrame::ChangeSize(const SIZE& client){
- RECT toolbarRect;
- ::GetClientRect(m_hWndToolBar,&toolbarRect);
- tabctrl.MoveWindow(toolbarRect.left,toolbarRect.bottom,client.cx - toolbarRect.left,client.cy - toolbarRect.bottom);
+
+
+
+ tabctrl.MoveWindow(0,toolBarHeight,client.cx,client.cy - (toolBarHeight + statusBarHeight));
RECT tabClientRect;
- commentView.MoveWindow(tabClientRect.left, tabClientRect.top,tabClientRect.right - tabClientRect.left, tabClientRect.bottom - (tabClientRect.top + toolbarRect.bottom));
+ commentView.MoveWindow(tabClientRect.left, tabClientRect.top,tabClientRect.right - tabClientRect.left, tabClientRect.bottom - tabClientRect.top);
this->GetWindowRect(&wndRect);
LONG cyMaxImized = GetSystemMetrics (SM_CYMAXIMIZED);
- wndRect.bottom = (LONG)cyMaxImized / 2;
- wndRect.right = commentViewSize.left + commentViewSize.right + 20 + commentView.GetColumnHolSizeSum();
+ 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);