Click here to Skip to main content
16,005,241 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Accessing USB-device: How to determine lpFileName in CreateFile call Pin
arnold_w29-Nov-07 3:36
arnold_w29-Nov-07 3:36 
GeneralRe: Accessing USB-device: How to determine lpFileName in CreateFile call Pin
Randor 29-Nov-07 3:57
professional Randor 29-Nov-07 3:57 
GeneralRe: Accessing USB-device: How to determine lpFileName in CreateFile call Pin
arnold_w29-Nov-07 21:46
arnold_w29-Nov-07 21:46 
GeneralRe: Accessing USB-device: How to determine lpFileName in CreateFile call Pin
arnold_w5-Dec-07 1:45
arnold_w5-Dec-07 1:45 
QuestionC++ Month Function Pin
sidkraft29-Nov-07 3:11
sidkraft29-Nov-07 3:11 
AnswerRe: C++ Month Function Pin
Maximilien29-Nov-07 3:42
Maximilien29-Nov-07 3:42 
AnswerRe: C++ Month Function Pin
David Crow29-Nov-07 3:42
David Crow29-Nov-07 3:42 
QuestionIdentifying Windows Messages? Pin
narayanagvs29-Nov-07 2:31
narayanagvs29-Nov-07 2:31 
Hi,

I have to restrict mouse clicks on the activex controls of
Windows media player or else say I want to allow only Menu Commands ,Maximise ,Minimise and Close messages to
the application.
For this I have used hooking to trap the windows messages
sent to the WMP application.
I hooked my procedure in to that WMP application and now I
can receive all messages before there are passed to window
procedure of the actual application.

I used the following code in my application to hook my procedure in to another appln.

HOOKPROC dllmsgFunction = (HOOKPROC)::GetProcAddress(m_HookDll, "MyMessageHook");
m_mymsgHook = SetWindowsHookEx(WH_CALLWNDPROC,dllmsgFunction,m_HookDll,dwThreadId);


"MyMessageHook" function is in a seperated Dll.

LRESULT CALLBACK MyMessageHook(int nCode, WPARAM wParam, LPARAM lParam)
{
CWPSTRUCT* msg = (CWPSTRUCT*)lParam;
// If I return any non zero code here all messages to the windows media 
// player application are blocked .
// return -1;

return ::CallNextHookEx(sg_hHook, nCode, wParam, lParam);
}


If I restrict WM_LBUTTONDOWN message , clicks on Menu bar and the complete application are also disabled

as for every mouse click there will be OnLbuttonDown.So, Iam unable to figure out the messages to restrict.
I need an approach to do this. Any suggestions or links would be helpful.

Thanks
Satya

Today is a gift, that's why it is called the present.

AnswerRe: Identifying Windows Messages? Pin
KarstenK29-Nov-07 4:24
mveKarstenK29-Nov-07 4:24 
QuestionWindows service and child processes Pin
vikramlinux29-Nov-07 2:16
vikramlinux29-Nov-07 2:16 
AnswerRe: Windows service and child processes Pin
Nemanja Trifunovic29-Nov-07 2:29
Nemanja Trifunovic29-Nov-07 2:29 
GeneralRe: Windows service and child processes Pin
vikramlinux29-Nov-07 2:37
vikramlinux29-Nov-07 2:37 
QuestionSorting Unicode CStrings correctly Pin
petermcwerner29-Nov-07 2:01
petermcwerner29-Nov-07 2:01 
AnswerRe: Sorting Unicode CStrings correctly Pin
KarstenK29-Nov-07 2:27
mveKarstenK29-Nov-07 2:27 
GeneralRe: Sorting Unicode CStrings correctly Pin
petermcwerner29-Nov-07 3:03
petermcwerner29-Nov-07 3:03 
GeneralRe: Sorting Unicode CStrings correctly Pin
petermcwerner29-Nov-07 4:52
petermcwerner29-Nov-07 4:52 
AnswerRe: Sorting Unicode CStrings correctly Pin
Nemanja Trifunovic29-Nov-07 2:37
Nemanja Trifunovic29-Nov-07 2:37 
GeneralRe: Sorting Unicode CStrings correctly Pin
petermcwerner29-Nov-07 3:11
petermcwerner29-Nov-07 3:11 
GeneralRe: Sorting Unicode CStrings correctly Pin
Nemanja Trifunovic29-Nov-07 3:38
Nemanja Trifunovic29-Nov-07 3:38 
GeneralRe: Sorting Unicode CStrings correctly Pin
petermcwerner29-Nov-07 4:46
petermcwerner29-Nov-07 4:46 
QuestionRe: Sorting Unicode CStrings correctly Pin
David Crow29-Nov-07 3:44
David Crow29-Nov-07 3:44 
AnswerRe: Sorting Unicode CStrings correctly Pin
petermcwerner29-Nov-07 4:15
petermcwerner29-Nov-07 4:15 
QuestionRe: Sorting Unicode CStrings correctly Pin
David Crow29-Nov-07 4:27
David Crow29-Nov-07 4:27 
AnswerRe: Sorting Unicode CStrings correctly Pin
petermcwerner29-Nov-07 4:41
petermcwerner29-Nov-07 4:41 
AnswerRe: Sorting Unicode CStrings correctly Pin
Mike Dimmick29-Nov-07 6:50
Mike Dimmick29-Nov-07 6:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.