CAxWindow inherits from ATLs CWindow which has a set of Scrolling Methods: EnableScrollBar, GetScrollInfo, GetScrollPos etc so do these handlers do the scrolling? That's presuming they're getting messages from the ActiveX control.
Yes, to be clear I can't see why _I_ would want to handle this message. But does MFC manage this message handler for every window in my app with a Message Map? I'm trying to decide if there's anything in my code base responsible for calling this unnecessarily.
If the logic that decides if the buttons should be enabled or disabled is too complicated it is advised (do not ask me to find who advised it, I just remember it somehow) that you do not use this method. You could always use CToolBarCtrl::EnableButton() for this and control it from within other parts of the program
One place that can fire off updating is the internal OnIdle. This is a fake message handler, called from the MFC message loop. So, you'll get updates a lot, but only when the message queue has "calmed down". So, if you get it a lot, it's because you don't have a lot else going on.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
It sounds like a trivial issue, use whichever types you're comfortable with. STL vectors and CStringArrays both leap to mind; do you need to save this data somehow? CStringArrays support CArchive but you may want to think about encryption or some other safety feature.
If you're only storing CStrings then CStringArray[^] would be a good choice. If you're storing something else, one of the other collections probably would be more appropriate, here[^] are some examples of thier usage, there are lots of others on the web. here[^] is a link that should help you to decide which collection might be best.
Hi, I have written a code in C++ which works on the "POINT" user defined type i.e. POINT = (x,y).
I am giving input in int form, it is converting it into point might be using "template<int p="">". I am retrieving these point from another function which is a header file of mine.
Now the problem is, I am calling this function in NS-3 software/program, I am unable to convert this point form into integer.
* Can i return more than one value from a function, because point has two values i.e. X and Y.
I am trying to create a dialog MFC application that reads the cursor position anywhere on the screen, finds the colour of the pixel at that location and reports the information back to the dialog application.
I have tried SetCapture and I must be doing something wrong because the cursor location stops reporting as soon as the cursor leaves the client area of the dialog. I have also looked at the "Screen Color Picker" by Florin Vasilescu. That uses an OnTimer function that allows me to read the screen location, but does not report mouse actions (LBUTTONDOWN) so that I can read the pixel at the cursor location.
I have also tried using SetWindowsHookEx and defining the MouseProc (as described by Vesi in the CodeGuru article "Modal dialog and outside mouse control". That wasn't successful. If I use the WH_JOURNALRECORD hook ID as described there appears to be an indeterminate delay between any mouse (or keyboard) action and interaction with screen objects. If I use the WH_MOUSE no mouse actions are detected.
Could someone help me with how to either properly set SetCapture() or point me to where I might discover how to read mouse actions outside the dialog box? I'm happy to supply code, but at this point it's a bit of a mess since I've been trying everything.
Thanks for any help you may be able to provide. Much appreciated.
Last Visit: 23-Mar-19 18:37 Last Update: 23-Mar-19 18:37