CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2008
    Posts
    63

    Exclamation Two same callbackfunction

    Hi All
    i am developing an application in VS2005. I have two same callbackfunction in two classes
    one is login.cpp and other is dialer.cpp. My problem is that when i put debug point in this
    callback function, in login.cpp class it is well but in dialer class it is not?
    i,e when login is succeedded the imediately dialer dialog open but before open dialer dialog
    debug point not goes to callbackfunction.

    this is in Login.cpp //working well
    LRESULT CLogin::OnSIPCallbackEvent(WPARAM WParam, LPARAM LParam)
    {

    SIPCallbackCommand * command = (SIPCallbackCommand *)WParam;

    if (!command)
    {
    return S_FALSE;
    }

    switch(command->getEventType())
    {
    case SIP_UNKNOWN:
    break;




    case SIP_REGISTER_SUCCESS:
    {
    m_Status.SetWindowText (_T ("Logged in"));
    HandleRegisterSuccess(command);

    }


    break;

    case SIP_REGISTER_FAILURE:
    m_Status.SetWindowText (_T ("Not Connected"));
    break;

    }
    delete command;
    command = NULL;

    return S_OK;
    }

    //this is in dialer //not goes debug point over here

    LRESULT CSIPSampleDlg::OnSIPCallbackEvent(WPARAM WParam, LPARAM LParam)
    {

    SIPCallbackCommand * command = (SIPCallbackCommand *)WParam;

    if (!command)
    {
    return S_FALSE;
    }

    switch(command->getEventType())
    {
    case SIP_UNKNOWN:
    break;


    ...................
    .................
    ..............
    .............
    ............
    delete command;
    command = NULL;

    return S_OK;
    }

    plz give me some idea.
    thanks in advance

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: Two same callbackfunction

    1. Please, edit your post adding Code tags around your code snippets.
    2. What is the purpose of using callback functions in your MFC dialogs?
    Victor Nijegorodov

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured