[rst-commit] r168 - in /redwax-signtext-windows/trunk/Redwax SignText/Redwax SignText (MFC): Redwax SignText (MFC)Dlg.cpp Redwax SignText (MFC)Dlg.h
rst-commit at redwax.eu
rst-commit at redwax.eu
Mon Jul 1 22:50:33 CEST 2024
Author: minfrin at redwax.eu
Date: Mon Jul 1 22:50:33 2024
New Revision: 168
Log:
Change the mouse pointer to the busy pointer when signing.
Modified:
redwax-signtext-windows/trunk/Redwax SignText/Redwax SignText (MFC)/Redwax SignText (MFC)Dlg.cpp
redwax-signtext-windows/trunk/Redwax SignText/Redwax SignText (MFC)/Redwax SignText (MFC)Dlg.h
Modified: redwax-signtext-windows/trunk/Redwax SignText/Redwax SignText (MFC)/Redwax SignText (MFC)Dlg.cpp
==============================================================================
--- redwax-signtext-windows/trunk/Redwax SignText/Redwax SignText (MFC)/Redwax SignText (MFC)Dlg.cpp (original)
+++ redwax-signtext-windows/trunk/Redwax SignText/Redwax SignText (MFC)/Redwax SignText (MFC)Dlg.cpp Mon Jul 1 22:50:33 2024
@@ -130,6 +130,7 @@
ON_MESSAGE(WM_CRYPTO_SELECTED, OnCryptoSelected)
ON_MESSAGE(WM_CRYPTO_SIGNED, OnCryptoSigned)
ON_MESSAGE(WM_CRYPTO_NOTSIGNED, OnCryptoNotSigned)
+ ON_WM_SETCURSOR()
ON_WM_SIZE()
ON_WM_SIZING()
ON_WM_GETMINMAXINFO()
@@ -700,6 +701,27 @@
}
+BOOL CRedwaxSignTextMFCDlg::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
+{
+ int is_busy = FALSE;
+
+ for (std::shared_ptr<SignPage>& m_dlg : m_dlgs) {
+
+ if (m_dlg->instance->is_signing || m_dlg->instance->out_buffer) {
+ is_busy = TRUE;
+ break;
+ }
+
+ }
+
+ if (is_busy)
+ {
+ ::SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
+ return TRUE;
+ }
+ return CWnd::OnSetCursor(pWnd, nHitTest, message);
+}
+
void CRedwaxSignTextMFCDlg::OnBnClickedCancel()
{
Modified: redwax-signtext-windows/trunk/Redwax SignText/Redwax SignText (MFC)/Redwax SignText (MFC)Dlg.h
==============================================================================
--- redwax-signtext-windows/trunk/Redwax SignText/Redwax SignText (MFC)/Redwax SignText (MFC)Dlg.h (original)
+++ redwax-signtext-windows/trunk/Redwax SignText/Redwax SignText (MFC)/Redwax SignText (MFC)Dlg.h Mon Jul 1 22:50:33 2024
@@ -85,6 +85,7 @@
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnSizing(UINT fwSide, LPRECT pRect);
afx_msg void OnGetMinMaxInfo(MINMAXINFO* lpMMI);
+ afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
DECLARE_MESSAGE_MAP()
private:
More information about the rst-commit
mailing list