Click here to Skip to main content
15,897,518 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Catch the text of the Window Items Pin
Michael Dunn4-Apr-06 20:12
sitebuilderMichael Dunn4-Apr-06 20:12 
Questionexported class meets DoModal() error! Pin
sting_lee4-Apr-06 16:01
sting_lee4-Apr-06 16:01 
QuestionKey code question Pin
EvScott4-Apr-06 15:42
EvScott4-Apr-06 15:42 
AnswerRe: Key code question Pin
Waldermort5-Apr-06 0:01
Waldermort5-Apr-06 0:01 
QuestionNetwork Client Registry Question Pin
u6ik4-Apr-06 15:22
u6ik4-Apr-06 15:22 
AnswerRe: Network Client Registry Question Pin
kakan4-Apr-06 21:27
professionalkakan4-Apr-06 21:27 
GeneralRe: Network Client Registry Question Pin
u6ik4-Apr-06 21:59
u6ik4-Apr-06 21:59 
QuestionProblem with the window handle m_hWnd Pin
dannyham4-Apr-06 14:41
dannyham4-Apr-06 14:41 
I’m trying too passing a window handle from my application to an Interface
Software. The software will then send messages to my application. But it seems like no messages are sent at all. Its really strange though when I create another dialog (config window for my first window) in the first dialogs OnInitDialog(); function where I’m calling the Interface function it works. And then when I remove the code for the config dialog no message is sent.

Kind of hard to explain in words, here is the code that works:

:BOOL ClightswitchDlg::OnInitDialog()<br />
{<br />
  int retval;<br />
        CDialog::OnInitDialog();<br />
/*classic OnInit code<br />
 			*/       <br />
<br />
  hZigBee = new CZigBeeIf(); // The ZigBee Interface<br />
<br />
  retval = hZigBee->ZBIFConnect( m_hWnd ); // Find some hardware<br />
  <br />
<br />
  CConfigureDlg hConfigureDlg; // The Config Dialog<br />
  /* Config code<br />
*/<br />
       INT_PTR nResponse = hConfigureDlg.DoModal(); // Display the dialog<br />
  if (nResponse == IDCANCEL)<br />
        {<br />
    return FALSE; // Cancelled Config so just leave<br />
        }<br />
<br />
    // Subscribe to relevant Callbacks<br />
  hZigBee->ZBIFSubscribe( ZDO_SET_CONFIRM );<br />
  hZigBee->ZBIFSubscribe( ZDO_RESET_CONFIRM );<br />
  hZigBee->ZBIFSubscribe( ZDO_START_CONFIRM );<br />
  hZigBee->ZBIFSubscribe( ZDO_END_DEVICE_BIND_CONFIRM );<br />
  hZigBee->ZBIFSubscribe( AF_INDIRECT_CONFIRM );<br />
  hZigBee->ZBIFSubscribe( ZDO_NLME_SYNC_CONFIRM );<br />
<br />
  Sleep( 1000 ); // Let the stack start and the world sort itself out<br />
<br />
  hZigBee->ZDO_RESET_request( 0 ); // Send a reset into the stack<br />
  <br />
  <br />
  return TRUE;  <br />


And the same code without config dialog that doesn’t work:

BOOL ClightswitchDlg::OnInitDialog()<br />
{<br />
  int retval;<br />
        CDialog::OnInitDialog();<br />
/*classic OnInit code<br />
 			*/       <br />
<br />
        <br />
<br />
  hZigBee = new CZigBeeIf(); // The ZigBee If<br />
  <br />
  }<br />
<br />
  retval = hZigBee->ZBIFConnect( m_hWnd ); // Find some hardware<br />
  <br />
<br />
    // Subscribe to relevant Callbacks<br />
  hZigBee->ZBIFSubscribe( ZDO_SET_CONFIRM );<br />
  hZigBee->ZBIFSubscribe( ZDO_RESET_CONFIRM );<br />
  hZigBee->ZBIFSubscribe( ZDO_START_CONFIRM );<br />
  hZigBee->ZBIFSubscribe( ZDO_END_DEVICE_BIND_CONFIRM );<br />
  hZigBee->ZBIFSubscribe( AF_INDIRECT_CONFIRM );<br />
  hZigBee->ZBIFSubscribe( ZDO_NLME_SYNC_CONFIRM );<br />
<br />
  Sleep( 1000 ); // Let the stack start and the world sort itself out<br />
<br />
  hZigBee->ZDO_RESET_request( 0 ); // Send a reset into the stack<br />
  <br />
  return TRUE;  <br />
}

AnswerRe: Problem with the window handle m_hWnd Pin
Giannakakis Kostas4-Apr-06 19:53
professionalGiannakakis Kostas4-Apr-06 19:53 
GeneralRe: Problem with the window handle m_hWnd Pin
dannyham4-Apr-06 22:21
dannyham4-Apr-06 22:21 
QuestionActiveX Print Template Pin
folken_max4-Apr-06 14:27
folken_max4-Apr-06 14:27 
Questionlink library + crazy error Pin
surfman194-Apr-06 13:40
surfman194-Apr-06 13:40 
AnswerRe: link library + crazy error Pin
Michael Dunn4-Apr-06 13:44
sitebuilderMichael Dunn4-Apr-06 13:44 
GeneralRe: link library + crazy error Pin
surfman194-Apr-06 14:23
surfman194-Apr-06 14:23 
QuestionRegisterWindowMessage Text Pin
Blake Miller4-Apr-06 12:31
Blake Miller4-Apr-06 12:31 
Questionabout LoadLibrary method in embedded Visual C++ Pin
George_George4-Apr-06 12:29
George_George4-Apr-06 12:29 
QuestionHuge Favour - re: compiling source Pin
ldsdbomber4-Apr-06 12:19
ldsdbomber4-Apr-06 12:19 
AnswerRe: Huge Favour - re: compiling source Pin
Anilkumar K V4-Apr-06 20:11
Anilkumar K V4-Apr-06 20:11 
QuestionRemote debugging setup for VS 2003 on XP Pin
lastgen4-Apr-06 11:33
lastgen4-Apr-06 11:33 
AnswerRe: Remote debugging setup for VS 2003 on XP Pin
jmkhael4-Apr-06 20:29
jmkhael4-Apr-06 20:29 
QuestionPopup caption like Windows Media Player Pin
David Simmonds4-Apr-06 11:32
David Simmonds4-Apr-06 11:32 
AnswerRe: Popup caption like Windows Media Player Pin
Hamid_RT4-Apr-06 19:18
Hamid_RT4-Apr-06 19:18 
GeneralRe: Popup caption like Windows Media Player Pin
David Simmonds5-Apr-06 4:05
David Simmonds5-Apr-06 4:05 
Questionhow to select items in a list control. Pin
Ajax954-Apr-06 9:39
Ajax954-Apr-06 9:39 
QuestionRe: how to select items in a list control. Pin
David Crow4-Apr-06 10:09
David Crow4-Apr-06 10:09 

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.