Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - create dialog and insert to the callback.: (3 Items)
   
create dialog and insert to the callback.  
Hi Everyone,

Do you know how to create dialog and insert it to activate callback in a widget using code?

or

Do you know how to insert menu / dialog that I already create in phAB to callback using code? what should command I need
 to use?

Thank you
Best Regards
Afif
Re: create dialog and insert to the callback.  
Hi Afif,

you can use PtAddCallback and PtCreateWidget or ApCreateModule.

E.g. for a button:

PtAddCallback( ABW_Button, Pt_CB_ACTIVATE, button_cb, NULL );

int button_cb( PtWidget_t *widget, void *data, 
           PtCallbackInfo_t *info)
{
    ApCreateModule( ABM_mydialog, NULL, info );

    return Pt_CONTINUE;
}

For more information please read about PtAddCallback, PtCreateWidget and ApCreateModule:
http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=%2Fcom.qnx.doc.photon_lib_ref%2Fpt%2Fptaddcallbacks.html&cp=
17_1_13_1

http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=%2Fcom.qnx.doc.photon_lib_ref%2Fap%2Fapcreatemodule.html&cp=
17_1_4_8

http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=%2Fcom.qnx.doc.photon_lib_ref%2Fpt%2Fptcreatewidget.html&cp=
17_1_13_101

Best regards,
Fedor
Re: create dialog and insert to the callback.  
Hi,

I already create the window in my PhAB, now I want to link the window that I already create in PhAB with callback 
activate. I already try to use your advice but there's error "my window is not declared"

thank you
best regards
afif.