Under debugger m_bMouseWheel (which is global to the class) is always true.
The problem is maybe that OnSetCursor is not triggered during that time (one mousewheel).
The doc say that "The WM_SETCURSOR message is sent to a window if the mouse causes the cursor to move within a window" which is not the case when mousewheeling.
So I am thinking on SendMessage(WM_SETCURSOR, some "params") before entering Zoom function.
But actually I do not know what to use as "params".
Sorry, I am not sure what that has to do with your original question. If you want to zoom an image based on the mouse wheel then you just need to capture the mouse movement and call your zoom function with suitable parameter values.
I have a SDI project. I have created some dynamics ComboBoxes in my toolbar by ".Create" in my CMainFrame Class. My ComboBoxes are working properly in CMainFrame but I want to set some of my variables in CMyView class by void CMainFrame::OnSelchange_My_Dynamics_Combo_1(). I did my best but I was not successful to send/set data to/at CMyView class.
I am beginner in MFC, Please guide me.
I meant: I have some public variables in CMyView class.These variables must be updated from INSIDE the CMyMainFrame class. How can I get access from CMyMainFrame to public variables in CMyView class?
In fact,how can I update public variables I have in CMyView class from CMyMainFrame class?
I did it,Because it seemed very easy, but then I get CDocument ERROR!
After adding #include "CMyView.h" into CMyMainFrame, I get CDocument ERROR!
I searched a lot on the internet, all say use GetActiveView() but it does not work!
You're index is going out of bounds on the st variable 'st[i]', when i is equal to l.
Also, having nested for loops with the same index variable name is tough to read.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
there are still charactes in the input buffer, hence, the next call to getline gets them.
A commont way to deal with this issue is using cin.ignore (see, for instance What is the use of cin.ignore() in C++?[^]).
"In testa che avete, Signor di Ceprano?"
I am trying to draw an image (2nd image) over the other image (existing image file - 1st image) using gdi+ bitmap and graphics and then saving (overwriting) the same 1st image file. But saving is not getting done, when i use GetLasError(), it shows error message,
"The process cannot access the file because it is being used by another process"
Here is the code what i am doing.
<pre>Gdiplus::Bitmap *gpBitmap = new Gdiplus::Bitmap(mImagePath1); /// existing image file
Gdiplus::Graphics *gr = Gdiplus::Graphics::FromImage(gpBitmap);
Gdiplus::Bitmap img(mImagePath2); // second image
Gdiplus::Bitmap* pThumbnail = static_cast<Gdiplus::Bitmap*>(img.GetThumbnailImage(32, 32, NULL, NULL));
gr->DrawImage(pThumbnail, newWpos, newHpos); // drawing the second image on some position of first image
Gdiplus::Status stat = gpBitmap->Save(mImagePath1, pClsid); // pClsid - image encoder set for png output