|
It's going to depend on the particular compiler's implementation (of sequence points).
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
modified 21-Feb-14 9:19am.
|
|
|
|
|
|
Perhaps, I found out the right answer, form the C99 standard, about compound ass.:
Semantics
3 A compound assignment of the form E1 op= E2 differs from the simple assignment expression E1 = E1 op (E2) only in that the lvalue E1 is evaluated only once.
So E1 is evaluated ONCE
|
|
|
|
|
No that isn't what that means.
E1 appears on both side of the equals. It is referring to whether E1 is evaluated once for the lvalue side and once for the rvalue side. And it says no.
|
|
|
|
|
Dear all:
I want to implement a application, when I touch the pannel, the application will play sound globally.
I use hook(WH_MOUSE_LL) and WM_LBUTTONDOWN to process the touch and PlaySound to play wav.
The Question is :
when I touch the pannel, it does not play. if I touch and leave fast, it will play.
How do I solve this problem?
Thank for your help .Victor
|
|
|
|
|
|
Dear Randor:
My application function must be have:
1.When I touch anywhere, even not on my app(ex:desktop, other application, extc...), it will play sound.
so I must be use hook, I did not find anything about hook with touch.
Does anything else to implement this application
Thank for your help, Victor
|
|
|
|
|
Hi,
cedricvictor wrote: Does anything else to implement this applicati
Microsoft recommends that you use a HID filter driver for something like this. You might be able to hack something together with a WH_GETMESSAGE hook.
I will now go and answer your original question.
Best Wishes,
-David Delaune
|
|
|
|
|
Hi,
cedricvictor wrote: when I touch the pannel, it does not play. if I touch and leave fast, it will play.
When you use the touch screen and 'HOLD down' the touch driver may interpret this as a right click. If the application did not register itself as being 'compatible with touch' a WM_RBUTTONDOWN followed by a WM_RBUTTONUP would be injected into the input stream.
Best Wishes,
-David Delaune
|
|
|
|
|
Dear Randor:
I think you are right. It is different between touch and mouse.
when left mouse button down, it will play sound.
when I touch the panel, and leave fast, it will play or touch the panel, and then move my finger on panel, it will play sound, too.
Thank for your help, Victor.
|
|
|
|
|
This is puzzling me.
I can add menu item with system generated and #define(d) ID and the menu text will be grayed out until I add a function to process the ON_COMMAND macro.
However, I have a static DLL which has just the #define(s) IDs and if I use the ID in MFC
OnCommand function ( WPARAM) – in case switch – the menu will be active.
The way it looks – if the ID is defined in DLL the menu is OK, but if “locally” it needs the function in ON_COMMAND macro and than the OnCommand function is not used.
If this is normal , OK
Thanks for your time.
Cheers
Vaclav
|
|
|
|
|
Vaclav_Sal wrote: I have a static DLL That's a static dynamic link library.
|
|
|
|
|
Ok, nice catch and just for you - "Win32 Static Libray".
Now back to OP.
|
|
|
|
|
Vaclav_Sal wrote: and just for you No, it's for everyone, because there are important and fundamental differences in how a static library and a DLL are connected to the executable. And that affects how your problem occurs and how it may be resolved.
|
|
|
|
|
LIB + DLL + .H . I think you should add you Dll,lib and .H in you Debug folder . Then you can use it just like a class. you can try !
|
|
|
|
|
You just posted that to Richard...
|
|
|
|
|
CP seems to be new to him...
|
|
|
|
|
Stick to the point Richard.
|
|
|
|
|
What? The point is that much of the question makes no sense.
|
|
|
|
|
Not sure I follow what you're saying... elaborate a bit perhaps?
|
|
|
|
|
Vaclav_Sal wrote: if the ID is defined in DLL
It cant be defined in a dll, it must be defined in a header file to have any meaning in your app.
Don't really get what you mean though.
|
|
|
|
|
Hi,
This is completely normal in MFC from a CFrameWnd derived class. This behavior is governed by the variable CFrameWnd::m_bAutoMenuEnable[^].
Best Wishes,
-David Delaune
|
|
|
|
|
Thanks David.
I will try to clean up my code - it seems silly to intercept the menu message using ON_COMMAND macro and "re post" same message so OnCommand can process it.
It really does not matter, to me, where the menu message gets processed, but since I started using libraries / modules I was just rying to keep processing uniform and under one function.
It was dissapointing that majority of replies managed to stay off the subject.
Cheers Vaclav
|
|
|
|
|
Vaclav_Sal wrote: It was dissapointing that majority of replies managed to stay off the subject. It was disappointing that your original question was so confusing.
|
|
|
|
|
Dear all:
I wanna implemented a app with only one button.
Function of application:
1.The Application with a button, that we can select sound by button.
2. When touch the panel, it will play sound, not only on my app(ex: desktop).
Question:
1.How do I use hook with touch event? Does anything else to implement this application?
2.if I use hook, how do I set the sound path in hook, when I select?
I am a new one of MFC, and my english is not good, please forgive me.
Thanks for your help, Victor.
|
|
|
|