2015-09-09 03:53 PM - last edited on 2023-07-13 03:26 PM by Doreena Deng
DGModalDialog (ACAPI_GetOwnResModule (), UserControl, ACAPI_GetOwnResModule (), UserControl_Handler, (DGUserData) &numItems);
DG::ModalDialog (ACAPI_GetOwnResModule (), dialogResId, ACAPI_GetOwnResModule()),
UC257SetUserData (dialogID, Itm, (DGUserData)&numItems); UC257SetCallBack (dialogID, Itm, UserControlCallBack); DGSetItemValLong (dialogID, Itm, 1);
void CCALL UserControlCallBack (UC257CallBackRec* callBackRec) { if (callBackRec->action == ACT_GETLISTSIZE || callBackRec->action == ACT_GETITEMSIZE) FillGetListSize (callBackRec, false); else if (callBackRec->action == ACT_GETLIST || callBackRec->action == ACT_GETITEM) FillGetList (callBackRec, false); return; }
2015-09-09 07:02 PM
... #include "UCModule.hpp" ... class TabWallAttrs : public DG::TabPage , private DG::UserControlObserver { public: ... private: virtual void UserControlChanged (const DG::UserControlChangeEvent& ev); private: UC::UC257 mi_pcont; };
TabWallAttrs::TabWallAttrs( ... ) , mi_pconte( GetReference(), PCONTE ) { mi_pcont.Attach( *this ); API_UCCallbackType ct = { APIUserControlType_Pen, GetId(), mi_pcont.GetId() }; ACAPI_Interface ( APIIo_SetUserControlCallbackID, &ct, NULL ); } TabWallAttrs::~TabWallAttrs() { mi_pcont.Detach( *this ); } void TabWallAttrs::UserControlChanged (const DG::UserControlChangeEvent& ev) { if ( ev.GetSource() == &mi_pcont ) { // mi_pcont.GetValue() } }
2015-09-10 02:29 PM
2015-09-14 03:23 PM
mi_pcont.Attach( *this ); API_UCCallbackType ct = { APIUserControlType_Pen, GetId(), mi_pcont.GetId() }; ACAPI_Interface ( APIIo_SetUserControlCallbackID, &ct, NULL );