OnSetCursor - works in 1 dlg but in other doesn't!
-
Hi all, i have 2 dialogs, dlg1 & dlg2 in both of them i use the same code:
BOOL CDlg1::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
if (!m_bCondition)
{
::SetCursor(::LoadCursor(NULL, IDC_WAIT));
return TRUE;return CDialog::OnSetCursor(pWnd,nHitTest,message);
}
BOOL CDlg2::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
if (!m_bCondition)
{
::SetCursor(::LoadCursor(NULL, IDC_WAIT));
return TRUE;return CDialog::OnSetCursor(pWnd,nHitTest,message);
}
problem is that i see the hourglass when mouse is over dlg1, but i don't see the hourglass when mouse is over dlg2???? what am i missing? should i implement an other message? thanks in advanced Yaron
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
-
Hi all, i have 2 dialogs, dlg1 & dlg2 in both of them i use the same code:
BOOL CDlg1::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
if (!m_bCondition)
{
::SetCursor(::LoadCursor(NULL, IDC_WAIT));
return TRUE;return CDialog::OnSetCursor(pWnd,nHitTest,message);
}
BOOL CDlg2::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
if (!m_bCondition)
{
::SetCursor(::LoadCursor(NULL, IDC_WAIT));
return TRUE;return CDialog::OnSetCursor(pWnd,nHitTest,message);
}
problem is that i see the hourglass when mouse is over dlg1, but i don't see the hourglass when mouse is over dlg2???? what am i missing? should i implement an other message? thanks in advanced Yaron
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
Use
CWaitCursor
object in OnMouseMove function of both dialog.Prasad Notifier using ATL | Operator new[],delete[][^]
-
Hi all, i have 2 dialogs, dlg1 & dlg2 in both of them i use the same code:
BOOL CDlg1::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
if (!m_bCondition)
{
::SetCursor(::LoadCursor(NULL, IDC_WAIT));
return TRUE;return CDialog::OnSetCursor(pWnd,nHitTest,message);
}
BOOL CDlg2::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
if (!m_bCondition)
{
::SetCursor(::LoadCursor(NULL, IDC_WAIT));
return TRUE;return CDialog::OnSetCursor(pWnd,nHitTest,message);
}
problem is that i see the hourglass when mouse is over dlg1, but i don't see the hourglass when mouse is over dlg2???? what am i missing? should i implement an other message? thanks in advanced Yaron
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
You say it doesnt call OnSetCursor on CDlg2,right?
WhiteSky
-
You say it doesnt call OnSetCursor on CDlg2,right?
WhiteSky
the method OnSetCursor is being called on both dialogs, but the problem is that i can see the hourglass on dialog1 when mouse is over it, but i see only an arrow (not hourglass) on dialog2 when mouse is over it.... ? Yaron
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
-
Use
CWaitCursor
object in OnMouseMove function of both dialog.Prasad Notifier using ATL | Operator new[],delete[][^]
well, i just took you advise and altered it abit: i used OnMouseMove, and set the cursor myself according to the condition and it worked :) thanks Yaron
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)