Click here to Skip to main content
15,860,859 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to use C program to open a text file using Notepad? Pin
Victor Nijegorodov9-Jan-21 21:42
Victor Nijegorodov9-Jan-21 21:42 
GeneralRe: How to use C program to open a text file using Notepad? Pin
Goh Kak Ng10-Jan-21 1:44
Goh Kak Ng10-Jan-21 1:44 
QuestionRe: How to use C program to open a text file using Notepad? Pin
David Crow9-Jan-21 16:49
David Crow9-Jan-21 16:49 
AnswerRe: How to use C program to open a text file using Notepad? Pin
Mircea Neacsu9-Jan-21 17:11
Mircea Neacsu9-Jan-21 17:11 
GeneralRe: How to use C program to open a text file using Notepad? Pin
Goh Kak Ng9-Jan-21 17:28
Goh Kak Ng9-Jan-21 17:28 
GeneralRe: How to use C program to open a text file using Notepad? Pin
Mircea Neacsu9-Jan-21 17:41
Mircea Neacsu9-Jan-21 17:41 
GeneralRe: How to use C program to open a text file using Notepad? Pin
Goh Kak Ng11-Jan-21 1:59
Goh Kak Ng11-Jan-21 1:59 
QuestionOnMouseWheel and OnSetCursor interaction Pin
Member 132515887-Jan-21 16:01
Member 132515887-Jan-21 16:01 
Hi all,

I have the following code which works for zooming in and out

BOOL CChildView::OnMouseWheel(UINT nFlags, short zDelta, CPoint point)
{
if (theApp.pBitmap)
{
//Caution! point is in screen coordinate!
CPoint pClient = point;
ScreenToClient(&pClient);

if (crDest.PtInRect(pClient))
{
m_bMouseWheel = TRUE;
if (zDelta == 120)
{
OnZoomPlus(pClient);
}
else if (zDelta == -120)
{
OnZoomMinus(pClient);
}
m_bMouseWheel = FALSE;
}
else
PlaySound(MAKEINTRESOURCE(IDR_WAV_SPRING), GetModuleHandle(NULL), SND_RESOURCE);
}
return TRUE;
}

Normally in SetCursor, the BOOL m_bMouseWheel would change the cursor

BOOL CChildView::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
if (m_bMouseDown || m_bMouseWheel)//Todo::Doesnot work for m_bMouseWheel
{
::SetCursor(LoadCursor(NULL, IDC_SIZEALL));
return TRUE;
}
if (theApp.m_hLenseCursor && theApp.bTrackLenseMode)
{
::SetCursor(theApp.m_hLenseCursor);
return TRUE;
}
else
{
::SetCursor(::LoadCursor(NULL, IDC_ARROW));
}

return CWnd::OnSetCursor(pWnd, nHitTest, message);
}

but actually nothing happens.

Any suggestion?

Pierre
AnswerRe: OnMouseWheel and OnSetCursor interaction Pin
Richard MacCutchan7-Jan-21 21:13
mveRichard MacCutchan7-Jan-21 21:13 
GeneralRe: OnMouseWheel and OnSetCursor interaction Pin
Member 1325158810-Jan-21 13:56
Member 1325158810-Jan-21 13:56 
GeneralRe: OnMouseWheel and OnSetCursor interaction Pin
Richard MacCutchan10-Jan-21 22:45
mveRichard MacCutchan10-Jan-21 22:45 
GeneralRe: OnMouseWheel and OnSetCursor interaction Pin
Member 1325158811-Jan-21 17:05
Member 1325158811-Jan-21 17:05 
QuestionHow to get access to CMyView variables from CMainFrame in MFC Pin
Member 1503370431-Dec-20 6:15
Member 1503370431-Dec-20 6:15 
QuestionRe: How to get access to CMyView variables from CMainFrame in MFC Pin
David Crow31-Dec-20 8:41
David Crow31-Dec-20 8:41 
AnswerRe: How to get access to CMyView variables from CMainFrame in MFC Pin
Member 1503370431-Dec-20 20:47
Member 1503370431-Dec-20 20:47 
QuestionRe: How to get access to CMyView variables from CMainFrame in MFC Pin
David Crow1-Jan-21 4:40
David Crow1-Jan-21 4:40 
AnswerRe: How to get access to CMyView variables from CMainFrame in MFC Pin
Member 150337041-Jan-21 4:59
Member 150337041-Jan-21 4:59 
AnswerRe: How to get access to CMyView variables from CMainFrame in MFC Pin
Richard MacCutchan31-Dec-20 21:26
mveRichard MacCutchan31-Dec-20 21:26 
GeneralRe: How to get access to CMyView variables from CMainFrame in MFC Pin
Member 150337041-Jan-21 4:52
Member 150337041-Jan-21 4:52 
GeneralRe: How to get access to CMyView variables from CMainFrame in MFC Pin
Richard MacCutchan1-Jan-21 4:55
mveRichard MacCutchan1-Jan-21 4:55 
GeneralRe: How to get access to CMyView variables from CMainFrame in MFC Pin
Member 150337041-Jan-21 5:06
Member 150337041-Jan-21 5:06 
GeneralRe: How to get access to CMyView variables from CMainFrame in MFC Pin
Richard MacCutchan1-Jan-21 5:13
mveRichard MacCutchan1-Jan-21 5:13 
GeneralRe: How to get access to CMyView variables from CMainFrame in MFC Pin
Member 150337044-Jan-21 7:07
Member 150337044-Jan-21 7:07 
GeneralRe: How to get access to CMyView variables from CMainFrame in MFC Pin
Richard MacCutchan4-Jan-21 9:46
mveRichard MacCutchan4-Jan-21 9:46 
AnswerRe: How to get access to CMyView variables from CMainFrame in MFC Pin
11917640 Member 4-Jan-21 22:29
11917640 Member 4-Jan-21 22:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.