|
Handle the WM_LBUTTONDBLCLK message and in the handler function use GetKeyState() to check if the control key is pressed.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
PJ Arends wrote: in the handler function use GetKeyState() to check if the control key is pressed.
Why ?
wParam value can be checked for MK_CONTROL .
i.e.
if (wParam & MK_CONTROL)
{
}
|
|
|
|
|
Handle WM_LBUTTONDBLCLK .
void CWnd::OnLButtonDblClk(UINT nFlags, CPoint point)
{
if ( nFlags & MK_CONTROL)
{
}
CWnd::OnLButtonDblClk(nFlags, point);
}
|
|
|
|
|
hi i have a small problem.
first i am a c# developer.
i want to use the windows media sdk.
the sdk is only available for c++.
what does i need.
the standard Directshow Filter WM ASF Writer (is from microsoft).
is it posible to build an directshow filter / that includes the WM ASF Writer and add an method that i set in the filter with an pubilc method to an prx file which is locate in the local filesystem.
this is the code that i allredy have / but i don know how i can build an direct show filter that include this....
does have anybody an idea ?
exsisting directshow warper and also warper for the windows media format sdk doesnt work.
best regards enrico hofmann
ok, thx for the firsttime
#include "wmsdk.h"
#include "WMSysPrf.h"
#include "Dshowasf.h"
...
void CIPCameraTestAppDlg::OnFilterCreatedMvsmartcontrol(LPCTSTR Label, LPUNKNOWN Filter)
{
CString szASFWriter = "WM ASF Writer";
if( szASFWriter.Compare(Label) == 0 )
{
IWMProfileManager *pProfileManager = NULL;
HRESULT hr = WMCreateProfileManager( &pProfileManager );
if( hr == S_OK && pProfileManager != NULL )
{
IWMProfile* pProfile = NULL;
// Set a Standard System profile
pProfileManager->LoadProfileByID( WMProfile_V80_BESTVBRVideo, &pProfile );
if( hr == S_OK && pProfile != NULL )
{
IConfigAsfWriter *pProp;
hr = Filter->QueryInterface(IID_IConfigAsfWriter, (void**)&pProp);
if( hr == S_OK && pProp != NULL )
{
hr = pProp->ConfigureFilterUsingProfile(pProfile);
}
}
}
}
}
|
|
|
|
|
Folks,
I've written a template tokenizer class. (BTW, code and the write-up about this class is posted here http://www.codeproject.com/useritems/TemplateTokenizer.asp[^].) All of the template class' code (declaration and implementation) resides in one *.h file. Everything compiles, links and runs just fine, when the template class header file is #include d only in one *.cpp file. But when the header is included into 2 *.cpp files, I get the linker errors:
ParseCSV2.obj : error LNK2005: "protected: void __thiscall CStringTokenizer<class CStringArray>::Add(char const *)" (?Add@?$CStringTokenizer@VCStringArray@@@@IAEXPBD@Z) already defined in ParseCSV.obj
ParseCSV2.obj : error LNK2005: "protected: void __thiscall CStringTokenizer<class CStringList>::Add(char const *)" (?Add@?$CStringTokenizer@VCStringList@@@@IAEXPBD@Z) already defined in ParseCSV.obj
Debug/ParsingNMEA.exe : fatal error LNK1169: one or more multiply defined symbols found
The header file has both #ifndef and #pragma once
#ifndef STRINGTOKENIZER_H
#define STRINGTOKENIZER_H
#pragma once
[declaration+implementation]
#endif // STRINGTOKENIZER_H
Template class headers contain the implementation. They are included into both descendents. Linker sees this as an error. From the linker's perspective, these errors make sense.
What can I do to fix this problem?
Thanks!
Nick
P.S. It seems like it could be a fairly common problem, but I couldn't find a solution on this forum or on the web.
P.P.S. I'm using VC++ 6
|
|
|
|
|
The functions that are defined in a header file need to be inline .
|
|
|
|
|
Michael Dunn wrote: The functions that are defined in a header file need to be inline.
... only when they are not templates (which seems to be the case looking at the linker error).
|
|
|
|
|
I have added the inline to the function definition. The linker error had disappear, and the project links and runs fine. Thanks! However, doesn't inlining defeat the original intended purpose of the functions (from the 1960s) - to reduce the code size? Does the inlining has a different effect on a template method compared to a non-template method?
|
|
|
|
|
The need for things to be inline is a downside of templates. The C++ FAQ Lite section on templates[^] goes into more detail. And remember, writing "inline" doesn't always make the actual code inline. While you need "inline" in some situations to satisfy the compiler or linker, the optimizer will determine on its own which methods should actually be inlined.
Nick Alexeev wrote: Does the inlining has a different effect on a template method compared to a non-template method?
Well, a template function is not code. When you instantiate a template, the compiler generates code from the template, and at that point it's no different from a non-template method. So the end result is the same.
|
|
|
|
|
I use EnumChildWindow() search for "Edit Control" in target windows.
But I don't know the handle that I get from this function if it belong to "Edit Control" handle.
Anybody know, what's function use for this issue.
|
|
|
|
|
you can call GetClassName and check if the returned class is "EDIT" .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Try using GetClassName() on each enumerated HWND and look for the class name "EDIT".
Mark
|
|
|
|
|
To add to previous replies, Use GetClassName , and compare if it with WC_EDIT . WC_EDIT is defined as "EDIT".
|
|
|
|
|
Hi.
I'm having problems with CTreeCtrl derived class. I'm trying to set dynamic item height, for each of the items. I've managed to draw the items correctly, but now i encounter hit test issues.
Has anyone done this before ? I'm using VS2005 MFC project.
Thanks,
Chen.
|
|
|
|
|
1 - where is the number that is Recive
2 - How can I access that Number ( Modem)
Thanks
|
|
|
|
|
Use TPAI to try to retrieve the Caller ID.
If you have the line open for monitoring, you will get notifications, and one of them is the caller ID information.
Some modems now actually support an AT command that will return the last number it was called with.
They store it in the internal RAM and bring it up with an ATI command.
|
|
|
|
|
I am using a system wide hookapi DLL which hooks StartDocA, StartDocW, EndDoc, PrintDlgExA, PrintDlgExW the latter so I can obtain the number of copies, page range etc.
My hook DLL works for NotePad, WordPad etc but the problem I have is Word (and I presume the other Office applications) does not appear to use PrintDlgA, PrintDlgW, or the Ex versions to display the Print dialog and hence I cannot obtain the number of copies, page range etc.
Does anyone know which API Word is using to display the Print dialog ?
I am using Visual Studio .NET 2003, Windows XP (with SP2) and Office XP.
Thanks in advance
|
|
|
|
|
pgibson007700 wrote: Does anyone know which API Word is using to display the Print dialog ?
Maybe they use their own dialog and not an API?
|
|
|
|
|
Office rolls their own controls and dialogs, they don't use the standard built-in dialogs.
|
|
|
|
|
Mike, thanks for that, I'll tackle the problem another way.
|
|
|
|
|
>> I'll tackle the problem another way
Would you like to tell to me ( and every body ) about your method ?
|
|
|
|
|
Hi, gave up with this project a long while ago - never got any where with the Office products. I was using madCodeHook see http://www.madcodehook.com/madCodeHookDescription.htm[^] which worked for every application I tried except the Office suite !
The project as I said is now long forgotten and I don't write code anymore - retired due to ill health.
|
|
|
|
|
Hi
All
I want to create Resource dll in my application.How it load in application. I want to seperate resources from code. So anybody know how to create it, send me procedure of Creating Resource dll in VC++/MFC
Atool
|
|
|
|
|
|