[Ttssh2-commit] [8337] ウィンドウプロシージャの引数の型を UINT から WPARAM に変更した

scmno****@osdn***** scmno****@osdn*****
2019年 10月 28日 (月) 22:07:49 JST


Revision: 8337
          https://osdn.net/projects/ttssh2/scm/svn/commits/8337
Author:   zmatsuo
Date:     2019-10-28 22:07:49 +0900 (Mon, 28 Oct 2019)
Log Message:
-----------
ウィンドウプロシージャの引数の型を UINT から WPARAM に変更した

Modified Paths:
--------------
    trunk/teraterm/common/tmfc.h
    trunk/teraterm/common/tmfc_frame.cpp
    trunk/teraterm/teraterm/tekwin.cpp
    trunk/teraterm/teraterm/tekwin.h
    trunk/teraterm/teraterm/vtwin.cpp
    trunk/teraterm/teraterm/vtwin.h

-------------- next part --------------
Modified: trunk/teraterm/common/tmfc.h
===================================================================
--- trunk/teraterm/common/tmfc.h	2019-10-28 13:07:38 UTC (rev 8336)
+++ trunk/teraterm/common/tmfc.h	2019-10-28 13:07:49 UTC (rev 8337)
@@ -119,15 +119,13 @@
 	///
 	virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
 	///
-#if 1
 	void OnKillFocus(HWND hNewWnd);
 	void OnDestroy();
 	void OnSetFocus(HWND hOldWnd);
-	void OnSysCommand(UINT nID, LPARAM lParam);
+	void OnSysCommand(WPARAM nID, LPARAM lParam);
 	void OnClose();
-#endif
-	void OnSysKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
-	void OnSysKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
+	void OnSysKeyDown(WPARAM nChar, UINT nRepCnt, UINT nFlags);
+	void OnSysKeyUp(WPARAM nChar, UINT nRepCnt, UINT nFlags);
 };
 
 class TTCDialog : public TTCWnd

Modified: trunk/teraterm/common/tmfc_frame.cpp
===================================================================
--- trunk/teraterm/common/tmfc_frame.cpp	2019-10-28 13:07:38 UTC (rev 8336)
+++ trunk/teraterm/common/tmfc_frame.cpp	2019-10-28 13:07:49 UTC (rev 8337)
@@ -115,17 +115,17 @@
 void TTCFrameWnd::OnSetFocus(HWND hOldWnd)
 {}
 
-void TTCFrameWnd::OnSysCommand(UINT nID, LPARAM lParam)
+void TTCFrameWnd::OnSysCommand(WPARAM nID, LPARAM lParam)
 {}
 
-void TTCFrameWnd::OnSysKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
+void TTCFrameWnd::OnSysKeyDown(WPARAM nChar, UINT nRepCnt, UINT nFlags)
 {
-	DefWindowProc(WM_SYSKEYDOWN, (WPARAM)nChar, MAKELONG(nRepCnt, nFlags));
+	DefWindowProc(WM_SYSKEYDOWN, nChar, MAKELONG(nRepCnt, nFlags));
 }
 
-void TTCFrameWnd::OnSysKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags)
+void TTCFrameWnd::OnSysKeyUp(WPARAM nChar, UINT nRepCnt, UINT nFlags)
 {
-	DefWindowProc(WM_SYSKEYUP, (WPARAM)nChar, MAKELONG(nRepCnt, nFlags));
+	DefWindowProc(WM_SYSKEYUP, nChar, MAKELONG(nRepCnt, nFlags));
 }
 
 void TTCFrameWnd::OnClose()

Modified: trunk/teraterm/teraterm/tekwin.cpp
===================================================================
--- trunk/teraterm/teraterm/tekwin.cpp	2019-10-28 13:07:38 UTC (rev 8336)
+++ trunk/teraterm/teraterm/tekwin.cpp	2019-10-28 13:07:49 UTC (rev 8337)
@@ -249,7 +249,7 @@
 	}
 }
 
-void CTEKWindow::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
+void CTEKWindow::OnChar(WPARAM nChar, UINT nRepCnt, UINT nFlags)
 {
 	unsigned int i;
 	char Code;
@@ -299,12 +299,12 @@
 	InitMenuPopup(hPopupMenu);
 }
 
-void CTEKWindow::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
+void CTEKWindow::OnKeyDown(WPARAM nChar, UINT nRepCnt, UINT nFlags)
 {
 	KeyDown(HTEKWin,nChar,nRepCnt,nFlags & 0x1ff);
 }
 
-void CTEKWindow::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags)
+void CTEKWindow::OnKeyUp(WPARAM nChar, UINT nRepCnt, UINT nFlags)
 {
 	KeyUp(nChar);
 }
@@ -315,7 +315,7 @@
 	TTCFrameWnd::OnKillFocus(hNewWnd);
 }
 
-void CTEKWindow::OnLButtonDown(UINT nFlags, POINTS point)
+void CTEKWindow::OnLButtonDown(WPARAM nFlags, POINTS point)
 {
 	POINT p;
 	HMENU PopupMenu, PopupBase;
@@ -369,12 +369,12 @@
 	TEKWMLButtonDown(&tk,&ts,&cv,p);
 }
 
-void CTEKWindow::OnLButtonUp(UINT nFlags, POINTS point)
+void CTEKWindow::OnLButtonUp(WPARAM nFlags, POINTS point)
 {
 	TEKWMLButtonUp(&tk,&ts);
 }
 
-void CTEKWindow::OnMButtonUp(UINT nFlags, POINTS point)
+void CTEKWindow::OnMButtonUp(WPARAM nFlags, POINTS point)
 {
 	//OnRButtonUp(nFlags,point);
 }
@@ -390,7 +390,7 @@
 	}
 }
 
-void CTEKWindow::OnMouseMove(UINT nFlags, POINTS point)
+void CTEKWindow::OnMouseMove(WPARAM nFlags, POINTS point)
 {
 	POINT p;
 
@@ -431,7 +431,7 @@
 	TTCFrameWnd::OnSetFocus(hOldWnd);
 }
 
-void CTEKWindow::OnSize(UINT nType, int cx, int cy)
+void CTEKWindow::OnSize(WPARAM nType, int cx, int cy)
 {
 	int w, h;
 	RECT R;
@@ -452,7 +452,7 @@
 	TEKWMSize(&tk,&ts,w,h,cx,cy);
 }
 
-void CTEKWindow::OnSysCommand(UINT nID, LPARAM lParam)
+void CTEKWindow::OnSysCommand(WPARAM nID, LPARAM lParam)
 {
 	if (nID==ID_SHOWMENUBAR) {
 		ts.PopupMenu = 0;
@@ -463,7 +463,7 @@
 	}
 }
 
-void CTEKWindow::OnSysKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
+void CTEKWindow::OnSysKeyDown(WPARAM nChar, UINT nRepCnt, UINT nFlags)
 {
 	if (nChar==VK_F10) {
 		OnKeyDown(nChar,nRepCnt,nFlags);
@@ -473,7 +473,7 @@
 	}
 }
 
-void CTEKWindow::OnSysKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags)
+void CTEKWindow::OnSysKeyUp(WPARAM nChar, UINT nRepCnt, UINT nFlags)
 {
 	if (nChar==VK_F10) {
 		OnKeyUp(nChar,nRepCnt,nFlags);

Modified: trunk/teraterm/teraterm/tekwin.h
===================================================================
--- trunk/teraterm/teraterm/tekwin.h	2019-10-28 13:07:38 UTC (rev 8336)
+++ trunk/teraterm/teraterm/tekwin.h	2019-10-28 13:07:49 UTC (rev 8337)
@@ -50,26 +50,26 @@
 protected:
 	virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
 	void OnActivate(UINT nState, HWND pWndOther, BOOL bMinimized);
-	void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
+	void OnChar(WPARAM nChar, UINT nRepCnt, UINT nFlags);
 	void OnDestroy();
 	void OnGetMinMaxInfo(MINMAXINFO *lpMMI);
 	void OnInitMenuPopup(HMENU hPopupMenu, UINT nIndex, BOOL bSysMenu);
-	void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
-	void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
+	void OnKeyDown(WPARAM nChar, UINT nRepCnt, UINT nFlags);
+	void OnKeyUp(WPARAM nChar, UINT nRepCnt, UINT nFlags);
 	void OnKillFocus(HWND hNewWnd);
-	void OnLButtonDown(UINT nFlags, POINTS point);
-	void OnLButtonUp(UINT nFlags, POINTS point);
-	void OnMButtonUp(UINT nFlags, POINTS point);
+	void OnLButtonDown(WPARAM nFlags, POINTS point);
+	void OnLButtonUp(WPARAM nFlags, POINTS point);
+	void OnMButtonUp(WPARAM nFlags, POINTS point);
 	int OnMouseActivate(HWND hDesktopWnd, UINT nHitTest, UINT message);
-	void OnMouseMove(UINT nFlags, POINTS point);
+	void OnMouseMove(WPARAM nFlags, POINTS point);
 	void OnMove(int x, int y);
 	void OnPaint();
 	void OnRButtonUp(UINT nFlags, POINTS point);
 	void OnSetFocus(HWND hOldWnd);
-	void OnSize(UINT nType, int cx, int cy);
-	void OnSysCommand(UINT nID, LPARAM lParam);
-	void OnSysKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
-	void OnSysKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
+	void OnSize(WPARAM nType, int cx, int cy);
+	void OnSysCommand(WPARAM nID, LPARAM lParam);
+	void OnSysKeyDown(WPARAM nChar, UINT nRepCnt, UINT nFlags);
+	void OnSysKeyUp(WPARAM nChar, UINT nRepCnt, UINT nFlags);
 	void OnTimer(UINT_PTR nIDEvent);
 	LRESULT OnAccelCommand(WPARAM wParam, LPARAM lParam);
 	LRESULT OnChangeMenu(WPARAM wParam, LPARAM lParam);

Modified: trunk/teraterm/teraterm/vtwin.cpp
===================================================================
--- trunk/teraterm/teraterm/vtwin.cpp	2019-10-28 13:07:38 UTC (rev 8336)
+++ trunk/teraterm/teraterm/vtwin.cpp	2019-10-28 13:07:49 UTC (rev 8337)
@@ -1747,7 +1747,7 @@
 	}
 }
 
-void CVTWindow::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
+void CVTWindow::OnChar(WPARAM nChar, UINT nRepCnt, UINT nFlags)
 {
 	unsigned int i;
 	char Code;
@@ -2247,7 +2247,7 @@
 	InitMenuPopup(hPopupMenu);
 }
 
-void CVTWindow::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
+void CVTWindow::OnKeyDown(WPARAM nChar, UINT nRepCnt, UINT nFlags)
 {
 	BYTE KeyState[256];
 	MSG M;
@@ -2281,7 +2281,7 @@
 
 }
 
-void CVTWindow::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags)
+void CVTWindow::OnKeyUp(WPARAM nChar, UINT nRepCnt, UINT nFlags)
 {
 	KeyUp(nChar);
 }
@@ -2297,7 +2297,7 @@
 	}
 }
 
-void CVTWindow::OnLButtonDblClk(UINT nFlags, POINTS point)
+void CVTWindow::OnLButtonDblClk(WPARAM nFlags, POINTS point)
 {
 	if (LButton || MButton || RButton) {
 		return;
@@ -2326,7 +2326,7 @@
 	::SetTimer(HVTWin, IdScrollTimer, 100, NULL);
 }
 
-void CVTWindow::OnLButtonDown(UINT nFlags, POINTS point)
+void CVTWindow::OnLButtonDown(WPARAM nFlags, POINTS point)
 {
 	POINT p;
 
@@ -2335,7 +2335,7 @@
 	ButtonDown(p,IdLeftButton);
 }
 
-void CVTWindow::OnLButtonUp(UINT nFlags, POINTS point)
+void CVTWindow::OnLButtonUp(WPARAM nFlags, POINTS point)
 {
 	if (IgnoreRelease)
 		IgnoreRelease = FALSE;
@@ -2350,7 +2350,7 @@
 	ButtonUp(FALSE);
 }
 
-void CVTWindow::OnMButtonDown(UINT nFlags, POINTS point)
+void CVTWindow::OnMButtonDown(WPARAM nFlags, POINTS point)
 {
 	POINT p;
 
@@ -2359,7 +2359,7 @@
 	ButtonDown(p,IdMiddleButton);
 }
 
-void CVTWindow::OnMButtonUp(UINT nFlags, POINTS point)
+void CVTWindow::OnMButtonUp(WPARAM nFlags, POINTS point)
 {
 	if (IgnoreRelease)
 		IgnoreRelease = FALSE;
@@ -2391,7 +2391,7 @@
 	}
 }
 
-void CVTWindow::OnMouseMove(UINT nFlags, POINTS point)
+void CVTWindow::OnMouseMove(WPARAM nFlags, POINTS point)
 {
 	int i;
 	BOOL mousereport;
@@ -2612,7 +2612,7 @@
 	FocusReport(TRUE);
 }
 
-void CVTWindow::OnSize(UINT nType, int cx, int cy)
+void CVTWindow::OnSize(WPARAM nType, int cx, int cy)
 {
 	if (IgnoreSizeMessage) {
 		return;
@@ -2700,7 +2700,7 @@
 // \x83\x8A\x83T\x83C\x83Y\x92\x86\x82̏\x88\x97\x9D\x82Ƃ\xB5\x82āA\x88ȉ\xBA\x82̓\xF1\x82‚\xF0\x8Ds\x82\xA4\x81B
 // \x81E\x83c\x81[\x83\x8B\x83`\x83b\x83v\x82ŐV\x82\xB5\x82\xA2\x92[\x96\x96\x83T\x83C\x83Y\x82\xF0\x95\\x8E\xA6\x82\xB7\x82\xE9
 // \x81E\x83t\x83H\x83\x93\x83g\x83T\x83C\x83Y\x82ƒ[\x96\x96\x83T\x83C\x83Y\x82ɍ\x87\x82킹\x82āA\x83E\x83B\x83\x93\x83h\x83E\x88ʒu\x81E\x83T\x83C\x83Y\x82𒲐\xAE\x82\xB7\x82\xE9
-void CVTWindow::OnSizing(UINT fwSide, LPRECT pRect)
+void CVTWindow::OnSizing(WPARAM fwSide, LPRECT pRect)
 {
 	int nWidth;
 	int nHeight;
@@ -2765,11 +2765,9 @@
 		pRect->bottom = pRect->top + fixed_height;
 		break;
 	}
-
-//TODO	TTCFrameWnd::OnSizing(fwSide, pRect);
 }
 
-void CVTWindow::OnSysChar(UINT nChar, UINT nRepCnt, UINT nFlags)
+void CVTWindow::OnSysChar(WPARAM nChar, UINT nRepCnt, UINT nFlags)
 {
 	char e = ESC;
 	char Code;
@@ -2821,7 +2819,7 @@
 	TTCFrameWnd::DefWindowProc(WM_SYSCHAR, nChar, MAKELONG(nRepCnt, nFlags));
 }
 
-void CVTWindow::OnSysCommand(UINT nID, LPARAM lParam)
+void CVTWindow::OnSysCommand(WPARAM nID, LPARAM lParam)
 {
 	if (nID==ID_SHOWMENUBAR) {
 		ts.PopupMenu = 0;
@@ -2839,7 +2837,7 @@
 #endif
 }
 
-void CVTWindow::OnSysKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
+void CVTWindow::OnSysKeyDown(WPARAM nChar, UINT nRepCnt, UINT nFlags)
 {
 	if ((nChar==VK_F10) || MetaKey(ts.MetaKey) && ((MainMenu==NULL) || (nChar!=VK_MENU))) {
 		KeyDown(HVTWin,nChar,nRepCnt,nFlags & 0x1ff);
@@ -2850,7 +2848,7 @@
 	}
 }
 
-void CVTWindow::OnSysKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags)
+void CVTWindow::OnSysKeyUp(WPARAM nChar, UINT nRepCnt, UINT nFlags)
 {
 	if (nChar==VK_F10) {
 		OnKeyUp(nChar,nRepCnt,nFlags);

Modified: trunk/teraterm/teraterm/vtwin.h
===================================================================
--- trunk/teraterm/teraterm/vtwin.h	2019-10-28 13:07:38 UTC (rev 8336)
+++ trunk/teraterm/teraterm/vtwin.h	2019-10-28 13:07:49 UTC (rev 8337)
@@ -87,7 +87,7 @@
 protected:
 	virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
 	void OnActivate(UINT nState, HWND pWndOther, BOOL bMinimized);
-	void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
+	void OnChar(WPARAM nChar, UINT nRepCnt, UINT nFlags);
 	void OnClose();
 	void OnAllClose();
 	void OnDestroy();
@@ -95,16 +95,16 @@
 	void OnGetMinMaxInfo(MINMAXINFO *lpMMI);
 	void OnHScroll(UINT nSBCode, UINT nPos, HWND pScrollBar);
 	void OnInitMenuPopup(HMENU hPopupMenu, UINT nIndex, BOOL bSysMenu);
-	void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
-	void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
+	void OnKeyDown(WPARAM nChar, UINT nRepCnt, UINT nFlags);
+	void OnKeyUp(WPARAM nChar, UINT nRepCnt, UINT nFlags);
 	void OnKillFocus(HWND hNewWnd);
-	void OnLButtonDblClk(UINT nFlags, POINTS point);
-	void OnLButtonDown(UINT nFlags, POINTS point);
-	void OnLButtonUp(UINT nFlags, POINTS point);
-	void OnMButtonDown(UINT nFlags, POINTS point);
-	void OnMButtonUp(UINT nFlags, POINTS point);
+	void OnLButtonDblClk(WPARAM nFlags, POINTS point);
+	void OnLButtonDown(WPARAM nFlags, POINTS point);
+	void OnLButtonUp(WPARAM nFlags, POINTS point);
+	void OnMButtonDown(WPARAM nFlags, POINTS point);
+	void OnMButtonUp(WPARAM nFlags, POINTS point);
 	int OnMouseActivate(HWND pDesktopWnd, UINT nHitTest, UINT message);
-	void OnMouseMove(UINT nFlags, POINTS point);
+	void OnMouseMove(WPARAM nFlags, POINTS point);
 	void OnMove(int x, int y);
 	BOOL OnMouseWheel(UINT nFlags, short zDelta, POINTS pt);
 	void OnNcLButtonDblClk(UINT nHitTest, POINTS point);
@@ -113,12 +113,12 @@
 	void OnRButtonDown(UINT nFlags, POINTS point);
 	void OnRButtonUp(UINT nFlags, POINTS point);
 	void OnSetFocus(HWND hOldWnd);
-	void OnSize(UINT nType, int cx, int cy);
-	void OnSizing(UINT fwSide, LPRECT pRect);
-	void OnSysChar(UINT nChar, UINT nRepCnt, UINT nFlags);
-	void OnSysCommand(UINT nID, LPARAM lParam);
-	void OnSysKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
-	void OnSysKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
+	void OnSize(WPARAM nType, int cx, int cy);
+	void OnSizing(WPARAM fwSide, LPRECT pRect);
+	void OnSysChar(WPARAM nChar, UINT nRepCnt, UINT nFlags);
+	void OnSysCommand(WPARAM nID, LPARAM lParam);
+	void OnSysKeyDown(WPARAM nChar, UINT nRepCnt, UINT nFlags);
+	void OnSysKeyUp(WPARAM nChar, UINT nRepCnt, UINT nFlags);
 	void OnTimer(UINT_PTR nIDEvent);
 	void OnVScroll(UINT nSBCode, UINT nPos, HWND pScrollBar);
 	BOOL OnDeviceChange(UINT nEventType, DWORD_PTR dwData);


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