Click here to Skip to main content
14,975,686 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: disassembly Pin
devvvy21-Dec-05 16:27
Memberdevvvy21-Dec-05 16:27 
QuestionHooking Explorer.exe Pin
ragavan20-Dec-05 17:19
Memberragavan20-Dec-05 17:19 
QuestionCListCtrl display long text problem. Pin
Zyraph20-Dec-05 16:29
MemberZyraph20-Dec-05 16:29 
QuestionModeless Property Sheet (Win32) Pin
VeRtRX20-Dec-05 8:22
MemberVeRtRX20-Dec-05 8:22 
Questionreceiving windows messages Pin
Roy K20-Dec-05 8:18
MemberRoy K20-Dec-05 8:18 
GeneralRe: receiving windows messages Pin
Ward20-Dec-05 9:44
MemberWard20-Dec-05 9:44 
GeneralRe: receiving windows messages Pin
Roy K20-Dec-05 13:10
MemberRoy K20-Dec-05 13:10 
AnswerRe: receiving windows messages Pin
Ward20-Dec-05 19:51
MemberWard20-Dec-05 19:51 
What is that handle 'camController_Handle' you are sending the message to? Since you want to send the message to a console program, which has no windows, I think you better broadcast your message:
SendMessage(HWND_BROADCAST, REPLY_PICTURE_READY,IntPtr.Zero, IntPtr.Zero);

But then it is unsave to 'SEND' a message to another program. Your C# application could get blocked. Better use PostMessage(HWND_BROADCAST, REPLY_PICTURE_READY,IntPtr.Zero, IntPtr.Zero);

To capture window messages in a console program, try:
<br />
#include <windows.h><br />
int main()<br />
{<br />
  UINT uiREPLY_PICTURE_READY = RegisterWindowMessage("REPLY_PICTURE_READY");<br />
  MSG msg;<br />
  while (GetMessage(&msg, NULL, 0, 0)) /*this is an endless loop, so its might be better to put it in a subthread that you can manage from your mainthread to end*/<br />
  {<br />
    if(uiREPLY_PICTURE_READY == msg)<br />
    {<br />
        //your action...<br />
    }<br />
  }<br />
}



The above might not work (I have not tested it) since GetMessage might need at least one window in the console application. You can always create a simple hidden window using CreateWindow.
I the above tips do not work, contact me again.

kind regards,

Ward
QuestionRe: receiving windows messages Pin
David Crow20-Dec-05 10:16
MemberDavid Crow20-Dec-05 10:16 
QuestionCSliderCtrl - dotted focus rect Pin
AJ12320-Dec-05 7:32
MemberAJ12320-Dec-05 7:32 
AnswerRe: CSliderCtrl - dotted focus rect Pin
0verflow14-Oct-12 20:21
Member0verflow14-Oct-12 20:21 
QuestionHome-grown tooltip window Pin
#realJSOP20-Dec-05 7:14
mva#realJSOP20-Dec-05 7:14 
AnswerRe: Home-grown tooltip window Pin
PJ Arends20-Dec-05 7:36
professionalPJ Arends20-Dec-05 7:36 
QuestionGetSysColor Weirdness Pin
#realJSOP20-Dec-05 6:59
mva#realJSOP20-Dec-05 6:59 
AnswerRe: GetSysColor Weirdness Pin
Jack Puppy20-Dec-05 7:20
MemberJack Puppy20-Dec-05 7:20 
GeneralRe: GetSysColor Weirdness Pin
#realJSOP20-Dec-05 7:58
mva#realJSOP20-Dec-05 7:58 
GeneralRe: GetSysColor Weirdness Pin
PJ Arends20-Dec-05 8:15
professionalPJ Arends20-Dec-05 8:15 
GeneralRe: GetSysColor Weirdness Pin
#realJSOP20-Dec-05 10:37
mva#realJSOP20-Dec-05 10:37 
QuestionCTreeCtrl Pin
Ivan Cachicatari20-Dec-05 6:39
MemberIvan Cachicatari20-Dec-05 6:39 
AnswerRe: CTreeCtrl Pin
RChin20-Dec-05 9:54
MemberRChin20-Dec-05 9:54 
AnswerRe: CTreeCtrl Pin
Jack Puppy20-Dec-05 10:46
MemberJack Puppy20-Dec-05 10:46 
GeneralRe: CTreeCtrl Pin
Ivan Cachicatari26-Dec-05 8:26
MemberIvan Cachicatari26-Dec-05 8:26 
Questionto find and close empty word document out of many instances of word document Pin
anku12320-Dec-05 6:23
Memberanku12320-Dec-05 6:23 
QuestionFunction to find out what files there are in a folder? Pin
KevinSheedy20-Dec-05 5:11
MemberKevinSheedy20-Dec-05 5:11 
AnswerRe: Function to find out what files there are in a folder? Pin
Chris Losinger20-Dec-05 5:27
professionalChris Losinger20-Dec-05 5:27 

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.