|
Are you wanting the WM_LBUTTONDOWN message to be handled in both the control class and in the dialog class? Have you seen this?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
one possible approach send dialog messages inside control derived class
Kuphryn
|
|
|
|
|
Fernando A. Gómez F. wrote: I assume that is because the control already managed te WM_LBUTTONDOWN message. What can I do about it?
Maybe. Read some MSDN articles on MFC message routing.
Fernando A. Gómez F. wrote: What can I do about it?
Lots of things. Since you have a custom control "CStatic-derived class" you can define a message that you post that the parent dialog can handle. Or you can do more of a Observer/Observable Design Pattern.
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
I think I'll try your approach. Thanks a lot.
Regards,
FG.
A polar bear is a bear whose coordinates has been changed in terms of sine and cosine.
|
|
|
|
|
In your CStatic derived class' WM_LBUTTONUP and WM_LBUTTONDOWN handlers try placing a call to Default() .
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
Didn't work...
A polar bear is a bear whose coordinates has been changed in terms of sine and cosine.
|
|
|
|
|
|
Hi All,
It's a uncommon application that ihave to code and _mainly_ will be basing on
WM_LBUTTONDOWN message.
The problem is that wm_lbuttondown is not beign received when application is "minimized" - please help, this is really urgent..
With regards,
Paul.
|
|
|
|
|
I don't see how you can receive anything when your application is minimized...
|
|
|
|
|
For example:
an application counting mouse clicks - sitting somewhere in the tray does that..
|
|
|
|
|
That's a tray icon which has nothing to do with whether your application is minimized or not.
When you called Shell_NotifyIcon you had to specify a callback message in the NOTIFYICONDATA struct right? The lParam of that message would contain the mouse or keyboard message associated with the event.
|
|
|
|
|
So no chance to 'track' message while app is minimized ?
All i want to do is write an app that draws a box using Rectangle(...) on the desktop and check wether WM_LBUTTONDOWN appeared on the box X,Y values - if so, box would be redrawed in other position.
|
|
|
|
|
In that case I think PJ Arends' suggestion[^] would be just about the only way I can think of as well.
|
|
|
|
|
Your app has to have the input focus in order to handle mouse messages. When your app is minimized it does not have the input focus. The only work around that I know of is to setup a global hook. See SetWindowsHookEx(WH_MOUSE, ...) in MSDN and do a search here on CP for "Global Hooks"
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
Not a good idea,
that's because - app is beign developed on the PPC.
Any other idea?
|
|
|
|
|
int01h wrote: The problem is that wm_lbuttondown is not beign received when application is "minimized" - please help, this is really urgent..
Are you sure other messages are received by your application ?
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
|
|
|
|
|
|
Hello,
I have a quick question about serialization. I have a custom built classe (we'll call it MyClass) that contain standard C++ items (i.e. int, float, etc...), MFC objects (i.e. CString, etc...), a few vectors, and some of my custom classes as data memebers. If I derive it (MyClass) from CObject, can I use the standard MFC Serialize functions to save it (MyClass) to a file?
Thanks in advance,
BP
|
|
|
|
|
|
Thank you, I have looked at the article, it is very good. However, I still don't know the answer to my question. Can I save my class using MFC's serialize function?
Thanks again,
BP
|
|
|
|
|
Hi BP, yes, you can. See this[^] excellent article on (MFC) serialization. My article offers a way to implement serialization without having to derive from CObject .
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
Hi
i need to call invoke an mfc callback function from a non mfc dll. How do I that?
any samples that I can look at?
Shree
|
|
|
|
|
shreelak wrote: How do I that?
More specific information is required. However you cannot use any C++ class (MFC included) across modules unless the class is exported from a DLL. I have no idea if that is what you are looking for.
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
yes what i meant was that MFC callback function is in a DLL and I can call other functions (not callback) from my calling program (non mfc dll) without any problem.
but when my non mfc dll tries to invoke the callback it doesn't get called
the same thing when called from an MFC program works fine.
So my question was is there some thing different that i need to do when i call it from a non mfc app?
like may be sometime of memory mapping? is there any sample code that i can look at?
-S
|
|
|
|
|
shreelak wrote: but when my non mfc dll tries to invoke the callback it doesn't get called
What does that mean? When you debug the application it just steps over the function without the function executing? Is there an exception? An error reported? what?
|
|
|
|