Click here to Skip to main content
15,895,606 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: disassembly Pin
devvvy21-Dec-05 16:27
devvvy21-Dec-05 16:27 
QuestionHooking Explorer.exe Pin
ragavan20-Dec-05 17:19
ragavan20-Dec-05 17:19 
QuestionCListCtrl display long text problem. Pin
Zyraph20-Dec-05 16:29
Zyraph20-Dec-05 16:29 
QuestionModeless Property Sheet (Win32) Pin
VeRtRX20-Dec-05 8:22
VeRtRX20-Dec-05 8:22 
Questionreceiving windows messages Pin
Roy K20-Dec-05 8:18
Roy K20-Dec-05 8:18 
GeneralRe: receiving windows messages Pin
Ward20-Dec-05 9:44
Ward20-Dec-05 9:44 
GeneralRe: receiving windows messages Pin
Roy K20-Dec-05 13:10
Roy K20-Dec-05 13:10 
AnswerRe: receiving windows messages Pin
Ward20-Dec-05 19:51
Ward20-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
David Crow20-Dec-05 10:16 
QuestionCSliderCtrl - dotted focus rect Pin
AJ12320-Dec-05 7:32
AJ12320-Dec-05 7:32 
AnswerRe: CSliderCtrl - dotted focus rect Pin
0verflow14-Oct-12 20:21
0verflow14-Oct-12 20:21 
QuestionHome-grown tooltip window Pin
#realJSOP20-Dec-05 7:14
mve#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
mve#realJSOP20-Dec-05 6:59 
AnswerRe: GetSysColor Weirdness Pin
Jack Puppy20-Dec-05 7:20
Jack Puppy20-Dec-05 7:20 
GeneralRe: GetSysColor Weirdness Pin
#realJSOP20-Dec-05 7:58
mve#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
mve#realJSOP20-Dec-05 10:37 
QuestionCTreeCtrl Pin
Ivan Cachicatari20-Dec-05 6:39
Ivan Cachicatari20-Dec-05 6:39 
AnswerRe: CTreeCtrl Pin
RChin20-Dec-05 9:54
RChin20-Dec-05 9:54 
AnswerRe: CTreeCtrl Pin
Jack Puppy20-Dec-05 10:46
Jack Puppy20-Dec-05 10:46 
GeneralRe: CTreeCtrl Pin
Ivan Cachicatari26-Dec-05 8:26
Ivan 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
anku12320-Dec-05 6:23 
QuestionFunction to find out what files there are in a folder? Pin
KevinSheedy20-Dec-05 5:11
KevinSheedy20-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.