|
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.
|
|
|
|
|
|
If this is not the proper place for this question, please let me know where I can post it.
I am working on a bunch of MSBuild project files that were created from scratch. We are in the middle of upgrading to Visual Studios 2013 so a lot of the paths to libraries need to be changed. I am having trouble with the Microsoft Libraries because of the spaces that are in the path.
Here is the line that sets the base of the path to get appended later in the project file:
<CRT_LIB_PATH>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib</CRT_LIB_PATH>
Later there are lines similar to the following:
<LINK_LIBS>$(LINK_LIBS) '"$(CRT_LIB_PATH)\msvcrt$(DEBUG_SUFFIX).lib"'</LINK_LIBS>
In the second line, I have attempted single quotes, double quotes, single quotes surrounded by double quotes, double quotes surrounded by single quotes. Nothing had helped.
How to I properly put this path into the project file?
Thanks,
Kevin
What happens is everything before the "12.0" is lost and linker is not able to find the library.
|
|
|
|
|
I found a solution to this. I was reminded about the old DOS short name for directories, and by using those it fixed the problem.
|
|
|
|
|
You should use the Visual Studio macros for all the known paths. Changing these names to fixed paths or, as in your answer, to 8.3 type names, will most likely cause you problems in the future.
|
|
|
|
|
Actually I had already tried that as well, with the same result. Eventually the Visual Studio files will be moved to the server anyway, and at that point the macros would not be useful.
|
|
|
|
|
You're going to move Visual Studio files to a server? ...why is that?
|
|
|
|
|
Not my choice. I am only a lowly contractor.
|
|
|
|
|
|
I would like to use DirectShow sample code filter – Bouncing Ball. Build in SDK 8.1.
I can build a library – Ball.lib , executable Ball.exe and my ancient compiler builds Ball.ax file.
All with exception of .ax file looks as DLL’s.
I seldom use DLL’s , but when I do I have a control of type of DLL.
Two questions – how do I use these files and what kind of DLL was build – how do I tell?
The doc with the sample code only instructs how to use Graph Edit, which for my purpose is good for nothing.
A sample application using any of the DirectShow samples would be helpful.
Any help is as always appreciated.
Cheers
Vaclav
PS I had no luck on DirectShow forums.
|
|
|
|
|
OK, for some unknown reason , AKA MS naming convention - these fiters builds are not using dll extension , but ax.
And apparently they are "self registering " too.
|
|
|
|