Thursday - last edited Monday by Laszlo Nagy
I program C++/Add-on in ArchiCAD27 / Visual StudioC++2019 / Windows 10.
I try UserControl(Pen Type) in ListBox.
But can't put user control into a listbox,
How to put a user control into a listbox?
1)grc
/* [11] */ MultiSelList 21 72 903 356 LargePlain PartialItems 21 HasHeader 21
/* [12] */ UserControl 55 451 180 40 257 0x0001 0x0000 0
2)cpp : OpenDialog()
res = DGModalDialog(
ACAPI_GetOwnResModule()
, resID //grcでのdialog/palette定義ID
, ACAPI_GetOwnResModule()
, staticDlgMsgCallBack
, (DGUserData)_this
);
3)cpp : MsgInit() Event
//UserControl
API_UCCallbackType ucb;
BNZeroMemory(&ucb, sizeof(ucb));
ucb.dialogID = this->dialID;
ucb.type = APIUserControlType_Pen;
ucb.itemID = ctrl_id;//ctrl_id==12
ACAPI_Dialog_SetUserControlCallback(&ucb);
4)cpp : MakeListBox()
//ctrl_id==12
NiArchi::DGSetItemWidth(dial_id, ctrl_id, w);
NiArchi::DGSetItemHeight(dial_id, ctrl_id, h);
DGSetItemValLong(this->dialID, ctrl_id, (short)color);
DGListSetDialItemOnTabField(dial_id, grid_id, col, ctrl_id);
Thursday
Try to place UserControl's line before MultiSelList line in grc .