2013-01-09 07:52 AM - last edited on 2023-08-02 03:28 PM by Doreena Deng
2013-01-09 09:35 AM
static short DGCALLBACK TestDlgCallBack (short message, short dialId, short itemId, DGUserData /*userData*/, DGMessageData /*msgData*/) { switch (message) { case DG_MSG_INIT: { short newItem = DGAppendDialogItem (dialId, DG_ITM_BUTTON, DG_BT_TEXT, NULL, 5, 5, 20, 20); DBPrintf("new item %d added\n", newItem); } break; case DG_MSG_CLOSE: break; case DG_MSG_CLICK: switch (itemId) { //case 2: // Close button case DG_CLOSEBOX: return(1); break; default: break; } default: break; } return 0; } void openTestDlg() { DGBlankModalDialog (200, 200, DG_DLG_HGROW | DG_DLG_VGROW, 0, DG_DLG_THICKFRAME, TestDlgCallBack, NULL); }
2013-01-24 02:09 PM
// add new item: short newItem = DGAppendDialogItem (dialId, DG_ITM_CHECKBOX, DG_BT_TEXT, 0, 206, 7, 60, 18); // set font, text and others: DGSetItemFont (dialId, newItem, DG_IS_EXTRASMALL); DGSetItemText (dialId, newItem, "NEW"); // ... // make it visible: DGShowItem (dialId, newItem);
2013-01-30 03:00 AM