[Ttssh2-commit] [7220] メッセージを全て実装した

scmno****@osdn***** scmno****@osdn*****
2018年 9月 3日 (月) 19:51:46 JST


Revision: 7220
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/7220
Author:   zmatsuo
Date:     2018-09-03 19:51:46 +0900 (Mon, 03 Sep 2018)
Log Message:
-----------
メッセージを全て実装した

Modified Paths:
--------------
    branches/cmake/teraterm/teraterm/vtwin.cpp
    branches/cmake/teraterm/teraterm/vtwin.h

-------------- next part --------------
Modified: branches/cmake/teraterm/teraterm/vtwin.cpp
===================================================================
--- branches/cmake/teraterm/teraterm/vtwin.cpp	2018-09-03 10:51:43 UTC (rev 7219)
+++ branches/cmake/teraterm/teraterm/vtwin.cpp	2018-09-03 10:51:46 UTC (rev 7220)
@@ -2029,7 +2029,7 @@
 
 	FreeBuffer();
 
-	CFrameWnd::OnDestroy();
+//	CFrameWnd::OnDestroy();		// TODO
 	TTXEnd(); /* TTPLUG */
 
 	DeleteNotifyIcon(&cv);
@@ -2381,9 +2381,9 @@
 	DispHScroll(Func,nPos);
 }
 
-void CVTWindow::OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu)
+void CVTWindow::OnInitMenuPopup(HMENU hPopupMenu, UINT nIndex, BOOL bSysMenu)
 {
-	InitMenuPopup(pPopupMenu->m_hMenu);
+	InitMenuPopup(hPopupMenu);
 }
 
 void CVTWindow::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
@@ -2429,7 +2429,7 @@
 {
 	DispDestroyCaret();
 	FocusReport(FALSE);
-	CFrameWnd::OnKillFocus(hNewWnd);
+//	CFrameWnd::OnKillFocus(hNewWnd);		// TODO
 
 	if (IsCaretOn()) {
 		CaretKillFocus(TRUE);
@@ -2436,7 +2436,7 @@
 	}
 }
 
-void CVTWindow::OnLButtonDblClk(UINT nFlags, CPoint point)
+void CVTWindow::OnLButtonDblClk(UINT nFlags, POINTS point)
 {
 	if (LButton || MButton || RButton) {
 		return;
@@ -2465,7 +2465,7 @@
 	::SetTimer(HVTWin, IdScrollTimer, 100, NULL);
 }
 
-void CVTWindow::OnLButtonDown(UINT nFlags, CPoint point)
+void CVTWindow::OnLButtonDown(UINT nFlags, POINTS point)
 {
 	POINT p;
 
@@ -2474,7 +2474,7 @@
 	ButtonDown(p,IdLeftButton);
 }
 
-void CVTWindow::OnLButtonUp(UINT nFlags, CPoint point)
+void CVTWindow::OnLButtonUp(UINT nFlags, POINTS point)
 {
 	if (IgnoreRelease)
 		IgnoreRelease = FALSE;
@@ -2489,7 +2489,7 @@
 	ButtonUp(FALSE);
 }
 
-void CVTWindow::OnMButtonDown(UINT nFlags, CPoint point)
+void CVTWindow::OnMButtonDown(UINT nFlags, POINTS point)
 {
 	POINT p;
 
@@ -2498,7 +2498,7 @@
 	ButtonDown(p,IdMiddleButton);
 }
 
-void CVTWindow::OnMButtonUp(UINT nFlags, CPoint point)
+void CVTWindow::OnMButtonUp(UINT nFlags, POINTS point)
 {
 	if (IgnoreRelease)
 		IgnoreRelease = FALSE;
@@ -2519,7 +2519,7 @@
 	}
 }
 
-int CVTWindow::OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message)
+int CVTWindow::OnMouseActivate(HWND pDesktopWnd, UINT nHitTest, UINT message)
 {
 	if ((ts.SelOnActive==0) && (nHitTest==HTCLIENT)) { //disable mouse event for text selection
 		IgnoreRelease = TRUE;
@@ -2530,7 +2530,7 @@
 	}
 }
 
-void CVTWindow::OnMouseMove(UINT nFlags, CPoint point)
+void CVTWindow::OnMouseMove(UINT nFlags, POINTS point)
 {
 	int i;
 	BOOL mousereport;
@@ -2573,18 +2573,12 @@
 }
 
 // \x83}\x83E\x83X\x83z\x83C\x81[\x83\x8B\x82̉\xF1\x93]
-LRESULT CVTWindow::OnMouseWheel(WPARAM wParam, LPARAM lParam)
-#if 0
 BOOL CVTWindow::OnMouseWheel(
 	UINT nFlags,   // \x89\xBC\x91z\x83L\x81[
 	short zDelta,  // \x89\xF1\x93]\x8B\x97\x97\xA3
-	CPoint pt      // \x83J\x81[\x83\\x83\x8B\x88ʒu
+	POINTS pts    // \x83J\x81[\x83\\x83\x8B\x88ʒu
 )
-#endif
 {
-	UINT nFlags = GET_KEYSTATE_WPARAM(wParam);		// \x89\xBC\x91z\x83L\x81[
-	short zDelta = GET_WHEEL_DELTA_WPARAM(wParam);	// \x89\xF1\x93]\x8B\x97\x97\xA3
-	POINTS pts = MAKEPOINTS(lParam);				// \x83J\x81[\x83\\x83\x8B\x88ʒu
 	POINT pt;
 	pt.x = pts.x;
 	pt.y = pts.y;
@@ -2625,6 +2619,7 @@
 }
 
 #if 0
+// \x89\xBD\x82\xE0\x82\xB5\x82Ă\xA2\x82Ȃ\xA2
 void CVTWindow::OnNcCalcSize(BOOL valid, NCCALCSIZE_PARAMS *sizeinfo)
 {
 	CWnd::OnNcCalcSize(valid, sizeinfo);
@@ -2632,17 +2627,14 @@
 }
 #endif
 
-void CVTWindow::OnNcLButtonDblClk(UINT nHitTest, CPoint point)
+void CVTWindow::OnNcLButtonDblClk(UINT nHitTest, POINTS point)
 {
 	if (! Minimized && !ts.TermIsWin && (nHitTest == HTCAPTION)) {
 		DispRestoreWinSize();
 	}
-	else {
-//TODO		CFrameWnd::OnNcLButtonDblClk(nHitTest,point);
-	}
 }
 
-void CVTWindow::OnNcRButtonDown(UINT nHitTest, CPoint point)
+void CVTWindow::OnNcRButtonDown(UINT nHitTest, POINTS point)
 {
 	if ((nHitTest==HTCAPTION) &&
 	    (ts.HideTitle>0) &&
@@ -2683,7 +2675,7 @@
 	}
 }
 
-void CVTWindow::OnRButtonDown(UINT nFlags, CPoint point)
+void CVTWindow::OnRButtonDown(UINT nFlags, POINTS point)
 {
 	POINT p;
 
@@ -2692,7 +2684,7 @@
 	ButtonDown(p,IdRightButton);
 }
 
-void CVTWindow::OnRButtonUp(UINT nFlags, CPoint point)
+void CVTWindow::OnRButtonUp(UINT nFlags, POINTS point)
 {
 	if (IgnoreRelease)
 		IgnoreRelease = FALSE;
@@ -2721,7 +2713,6 @@
 {
 	ChangeCaret();
 	FocusReport(TRUE);
-	CFrameWnd::OnSetFocus(hOldWnd);
 }
 
 void CVTWindow::OnSize(UINT nType, int cx, int cy)
@@ -2930,6 +2921,7 @@
 //	CFrameWnd::OnSysChar(nChar, nRepCnt, nFlags);
 }
 
+// \x89\xBD\x82\xE0\x82\xB5\x82Ă\xA2\x82Ȃ\xA2\x81A\x95s\x97v
 #if 0
 void CVTWindow::OnSysColorChange()
 {
@@ -2948,9 +2940,11 @@
 		// now getting host address (see CommOpen() in commlib.c)
 		::PostMessage(HVTWin,WM_SYSCOMMAND,nID,lParam);
 	}
+#if 0
 	else {
 		CFrameWnd::OnSysCommand(nID,lParam);
 	}
+#endif
 }
 
 void CVTWindow::OnSysKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
@@ -3172,7 +3166,6 @@
 		break;
 	}
 	return TRUE;
-//TODO	return CFrameWnd::OnDeviceChange(nEventType, dwData);
 }
 
 //<!--by AKASI
@@ -6155,11 +6148,9 @@
 	case WM_HSCROLL:
 		OnHScroll((UINT)wp, 0, (HWND)lp);
 		break;
-#if 0
 	case WM_INITMENUPOPUP:
-		InitMenuPopup((HMENU)wp);
+		OnInitMenuPopup((HMENU)wp, LOWORD(lp), HIWORD(lp));
 		break;
-#endif
 	case WM_KEYDOWN:
 		OnKeyDown(wp, LOWORD(lp), HIWORD(lp));
 		break;
@@ -6170,67 +6161,41 @@
 		OnKillFocus((HWND)wp);
 		break;
 	case WM_LBUTTONDBLCLK:
-	{
-		CPoint pt;
-		pt.x = LOWORD(lp);
-		pt.y = HIWORD(lp);
-		OnLButtonDblClk(wp, pt);
+		OnLButtonDblClk(wp, MAKEPOINTS(lp));
 		break;
-	}
 	case WM_LBUTTONDOWN:
-	{
-		CPoint pt;
-		pt.x = LOWORD(lp);
-		pt.y = HIWORD(lp);
-		OnLButtonDown(wp, pt);
+		OnLButtonDown(wp, MAKEPOINTS(lp));
 		break;
-	}
 	case WM_LBUTTONUP:
-	{
-		CPoint pt;
-		pt.x = LOWORD(lp);
-		pt.y = HIWORD(lp);
-		OnLButtonUp(wp, pt);
+		OnLButtonUp(wp, MAKEPOINTS(lp));
 		break;
-	}
 	case WM_MBUTTONDOWN:
-	{
-		CPoint pt;
-		pt.x = LOWORD(lp);
-		pt.y = HIWORD(lp);
-		OnMButtonDown(wp, pt);
+		OnMButtonDown(wp, MAKEPOINTS(lp));
 		break;
-	}
 	case WM_MBUTTONUP:
-	{
-		CPoint pt;
-		pt.x = LOWORD(lp);
-		pt.y = HIWORD(lp);
-		OnMButtonUp(wp, pt);
+		OnMButtonUp(wp, MAKEPOINTS(lp));
 		break;
-	}
-#if 0
 	case WM_MOUSEACTIVATE:
+		OnMouseActivate((HWND)wp, LOWORD(lp), HIWORD(lp));
 		break;
-#endif
 	case WM_MOUSEMOVE:
-	{
-		CPoint pt;
-		pt.x = LOWORD(lp);
-		pt.y = HIWORD(lp);
-		OnMouseMove(wp, pt);
+		OnMouseMove(wp, MAKEPOINTS(lp));
 		break;
-	}
-#if 0
 	case WM_MOUSEWHEEL:
+		OnMouseWheel(GET_KEYSTATE_WPARAM(wp), GET_WHEEL_DELTA_WPARAM(wp), MAKEPOINTS(lp));
 		break;
 	case WM_MOVE:
 		OnMove(LOWORD(lp), HIWORD(lp));
 		break;
 	case WM_NCLBUTTONDBLCLK:
+		OnNcLButtonDblClk((UINT)wp, MAKEPOINTS(lp));
+		TTCFrameWnd::Proc(msg, wp, lp);
 		break;
 	case WM_NCRBUTTONDOWN:
+		OnNcRButtonDown((UINT)wp, MAKEPOINTS(lp));
 		break;
+#if 0
+		// \x89\xBD\x82\xE0\x82\xB5\x82Ă\xA2\x82Ȃ\xA2
 	case WM_NCCALCSIZE:
 		break;
 #endif
@@ -6238,23 +6203,14 @@
 		OnPaint();
 		break;
 	case WM_RBUTTONDOWN:
-	{
-		CPoint pt;
-		pt.x = LOWORD(lp);
-		pt.y = HIWORD(lp);
-		OnRButtonDown(wp, pt);
+		OnRButtonDown((UINT)wp, MAKEPOINTS(lp));
 		break;
-	}
 	case WM_RBUTTONUP:
-	{
-		CPoint pt;
-		pt.x = LOWORD(lp);
-		pt.y = HIWORD(lp);
-		OnRButtonUp(wp, pt);
+		OnRButtonUp((UINT)wp, MAKEPOINTS(lp));
 		break;
-	}
 	case WM_SETFOCUS:
 		OnSetFocus((HWND)wp);
+		TTCFrameWnd::Proc(msg, wp, lp);
 		break;
 	case WM_SIZE:
 		OnSize(wp, LOWORD(lp), HIWORD(lp));
@@ -6262,14 +6218,16 @@
 	case WM_SIZING:
 		OnSizing(wp, (LPRECT)lp);
 		break;
-#if 0
 	case WM_SYSCHAR:
 		OnSysChar(wp, LOWORD(lp), HIWORD(lp));
 		break;
+#if 0	// \x89\xBD\x82\xE0\x82\xB5\x82Ă\xA2\x82Ȃ\xA2\x81A\x95s\x97v
 	case WM_SYSCOLORCHANGE:
 		break;
+#endif
 	case WM_SYSCOMMAND:
 		OnSysCommand((wp & 0xFFF0), lp);
+		TTCFrameWnd::Proc(msg, wp, lp);
 		break;
 	case WM_SYSKEYDOWN:
 		OnSysKeyDown(wp, LOWORD(lp), HIWORD(lp));
@@ -6284,8 +6242,9 @@
 		OnVScroll((UINT)wp, 0, (HWND)lp);
 		break;
 	case WM_DEVICECHANGE:
+		OnDeviceChange((UINT)wp, (DWORD_PTR)lp);
+		TTCFrameWnd::Proc(msg, wp, lp);
 		break;
-#endif
 	case WM_IME_COMPOSITION:
 		OnIMEComposition(wp, lp);
 		break;

Modified: branches/cmake/teraterm/teraterm/vtwin.h
===================================================================
--- branches/cmake/teraterm/teraterm/vtwin.h	2018-09-03 10:51:43 UTC (rev 7219)
+++ branches/cmake/teraterm/teraterm/vtwin.h	2018-09-03 10:51:46 UTC (rev 7220)
@@ -1,4 +1,4 @@
-/*
+/*
  * Copyright (C) 1994-1998 T. Teranishi
  * (C) 2004-2018 TeraTerm Project
  * All rights reserved.
@@ -98,37 +98,34 @@
 	afx_msg void OnDropFiles(HDROP hDropInfo);
 	afx_msg void OnGetMinMaxInfo(MINMAXINFO *lpMMI);
 	afx_msg void OnHScroll(UINT nSBCode, UINT nPos, HWND pScrollBar);
-//	afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
-	afx_msg void OnInitMenuPopup(TTCMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu);
+	afx_msg void OnInitMenuPopup(HMENU hPopupMenu, UINT nIndex, BOOL bSysMenu);
 	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
 	afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
 	afx_msg void OnKillFocus(HWND hNewWnd);
-	afx_msg void OnLButtonDblClk(UINT nFlags, TTCPoint point);
-	afx_msg void OnLButtonDown(UINT nFlags, TTCPoint point);
-	afx_msg void OnLButtonUp(UINT nFlags, TTCPoint point);
-	afx_msg void OnMButtonDown(UINT nFlags, TTCPoint point);
-	afx_msg void OnMButtonUp(UINT nFlags, TTCPoint point);
-	afx_msg int OnMouseActivate(TTCWnd* pDesktopWnd, UINT nHitTest, UINT message);
-	afx_msg void OnMouseMove(UINT nFlags, TTCPoint point);
+	afx_msg void OnLButtonDblClk(UINT nFlags, POINTS point);
+	afx_msg void OnLButtonDown(UINT nFlags, POINTS point);
+	afx_msg void OnLButtonUp(UINT nFlags, POINTS point);
+	afx_msg void OnMButtonDown(UINT nFlags, POINTS point);
+	afx_msg void OnMButtonUp(UINT nFlags, POINTS point);
+	afx_msg int OnMouseActivate(HWND pDesktopWnd, UINT nHitTest, UINT message);
+	afx_msg void OnMouseMove(UINT nFlags, POINTS point);
 	afx_msg void OnMove(int x, int y);
-//	afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, TTCPoint pt);
-	afx_msg LRESULT OnMouseWheel(WPARAM wParam, LPARAM lParam);
-//	afx_msg void OnNcCalcSize(BOOL valid, NCCALCSIZE_PARAMS *calcsize);
-	afx_msg void OnNcLButtonDblClk(UINT nHitTest, TTCPoint point);
-	afx_msg void OnNcRButtonDown(UINT nHitTest, TTCPoint point);
+	afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, POINTS pt);
+//	afx_msg void OnNcCalcSize(BOOL valid, NCCALCSIZE_PARAMS *calcsize); // 何もしていない、不要
+	afx_msg void OnNcLButtonDblClk(UINT nHitTest, POINTS point);
+	afx_msg void OnNcRButtonDown(UINT nHitTest, POINTS point);
 	afx_msg void OnPaint();
-	afx_msg void OnRButtonDown(UINT nFlags, TTCPoint point);
-	afx_msg void OnRButtonUp(UINT nFlags, TTCPoint point);
+	afx_msg void OnRButtonDown(UINT nFlags, POINTS point);
+	afx_msg void OnRButtonUp(UINT nFlags, POINTS point);
 	afx_msg void OnSetFocus(HWND hOldWnd);
 	afx_msg void OnSize(UINT nType, int cx, int cy);
 	afx_msg void OnSizing(UINT fwSide, LPRECT pRect);
 	afx_msg void OnSysChar(UINT nChar, UINT nRepCnt, UINT nFlags);
-	afx_msg void OnSysColorChange();
+//	afx_msg void OnSysColorChange();		// 何もしていない、不要
 	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
 	afx_msg void OnSysKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
 	afx_msg void OnSysKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
 	afx_msg void OnTimer(UINT_PTR nIDEvent);
-//	afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
 	afx_msg void OnVScroll(UINT nSBCode, UINT nPos, HWND pScrollBar);
 	afx_msg BOOL OnDeviceChange(UINT nEventType, DWORD_PTR dwData);
 //<!--by AKASI
@@ -225,7 +222,7 @@
 	afx_msg void OnWindowRestoreAll();
 	afx_msg void OnWindowUndo();
 	afx_msg void OnHelpIndex();
-	afx_msg void OnHelpUsing();
+//	afx_msg void OnHelpUsing();		// 実体なし不要
 	afx_msg void OnHelpAbout();
 	afx_msg LRESULT OnDropNotify(WPARAM ShowMenu, LPARAM lParam);
 	//}}AFX_MSG



Ttssh2-commit メーリングリストの案内