Problem with LeadTools CreateWindow inCFormView -Help !!! - Programmer

This is a discussion on Problem with LeadTools CreateWindow inCFormView -Help !!! - Programmer ; Hi , I have been using LeadTools in Visual Studio 2005. I have a tabctrl and dialogs in each tab and developed using CFormView. So a tabCtrl is a child of CFromView and tab1 is a child of TabCtrl. I ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Problem with LeadTools CreateWindow inCFormView -Help !!!

  1. Problem with LeadTools CreateWindow inCFormView -Help !!!

    Hi ,

    I have been using LeadTools in Visual Studio 2005.
    I have a tabctrl and dialogs in each tab and developed using
    CFormView.
    So a tabCtrl is a child of CFromView and tab1 is a child of TabCtrl.

    I want to insert a LEAD control in one of the tabs .i.e, Dialog.I am
    unable to insert a leadcontrol but inserting a control in the view was
    easy.The problem is I am not able to get the HWND associated to a
    particular dialog which is super child of View.


    Can somebody help me in creating a lead control in the dialog
    configdlg .h
    LAnnotationWindow m_LAnnoWnd;

    FormView.cpp
    CMyTabCtrl m_myCtrlTab;
    tabConfig is the child of CMyCtrlTab

    So in OnInitialUpdate of CFormView () my code was


    HWND hTWnd = ::FindWindow(NULL,_T("ABC")); //This will get main handle
    not super child handle

    //tabconfig is tabctrl which is a child of CFormView

    hWnd = tabConfig->m_LAnnoWnd.CreateWnd(hTWnd ,0,
    WS_VISIBLE|L_BS_CENTER|
    L_BS_PROCESSKEYBOARD,
    450,410,200,290);


    I tried using this code .....

    tabConfig->m_LAnnoWnd.CreateWnd(&m_myCtrlTab,0,
    WS_VISIBLE|L_BS_CENTER|
    L_BS_PROCESSKEYBOARD,
    450,410,200,290);
    But withthis code window is not getting created.
    Can someone help me with this issue.
    thanks
    Bhargavi


  2. Re: Problem with LeadTools CreateWindow inCFormView -Help !!!

    You should be creating the leadtool control in the OnInitDialog of the child
    dialog that it belongs to, not the OnInitialUpdate of the CFormview.

    AliR.

    wrote in message
    news:1148426304.503608.106510@u72g2000cwu.googlegr oups.com...
    > Hi ,
    >
    > I have been using LeadTools in Visual Studio 2005.
    > I have a tabctrl and dialogs in each tab and developed using
    > CFormView.
    > So a tabCtrl is a child of CFromView and tab1 is a child of TabCtrl.
    >
    > I want to insert a LEAD control in one of the tabs .i.e, Dialog.I am
    > unable to insert a leadcontrol but inserting a control in the view was
    > easy.The problem is I am not able to get the HWND associated to a
    > particular dialog which is super child of View.
    >
    >
    > Can somebody help me in creating a lead control in the dialog
    > configdlg .h
    > LAnnotationWindow m_LAnnoWnd;
    >
    > FormView.cpp
    > CMyTabCtrl m_myCtrlTab;
    > tabConfig is the child of CMyCtrlTab
    >
    > So in OnInitialUpdate of CFormView () my code was
    >
    >
    > HWND hTWnd = ::FindWindow(NULL,_T("ABC")); //This will get main handle
    > not super child handle
    >
    > //tabconfig is tabctrl which is a child of CFormView
    >
    > hWnd = tabConfig->m_LAnnoWnd.CreateWnd(hTWnd ,0,
    > WS_VISIBLE|L_BS_CENTER|
    > L_BS_PROCESSKEYBOARD,
    > 450,410,200,290);
    >
    >
    > I tried using this code .....
    >
    > tabConfig->m_LAnnoWnd.CreateWnd(&m_myCtrlTab,0,
    > WS_VISIBLE|L_BS_CENTER|
    > L_BS_PROCESSKEYBOARD,
    > 450,410,200,290);
    > But withthis code window is not getting created.
    > Can someone help me with this issue.
    > thanks
    > Bhargavi
    >




  3. Re: Problem with LeadTools CreateWindow inCFormView -Help !!!

    Yes Ali,
    Yesterday I tried in Ceate function of CDialog rather than OnInitDialog
    and that worked as create is called before Onint Dialog
    Thanks
    Bhargs


+ Reply to Thread