SDK:Working with VWPushButtonCtrl
From Vectorworks Developer
.SDK|SDK ..SDK:Types|SDK Types ..SDK:Using the SDK|Using the SDK ..VCOM:VCOM (Vectorworks Component Object Model)|VCOM Basics ..VCOM:Class Reference|VCOM Class Reference
Handling event
The push event is handled by the event dispatch mechanizm in the dialog class. First you need to add handler functions below DEFINE_EVENT_DISPATH_MAP:
// dispatch map protected: DEFINE_EVENT_DISPATH_MAP; void OnMyButton(long controlID, void* pData);
Then you provide implementation of this function:
CMyDialog::OnMyButton(long controlID, void* pdata) { // button event handler // ... }
At the end you attach the function to the control:
EVENT_DISPATCH_MAP_BEGIN( CMyDialog); ADD_DISPATCH_EVENT( kMyButtonID, OnMyButton); EVENT_DISPATCH_MAP_END;
See Also
SDK:Creating handler class for VectorScript layout dialog | SDK:Creating handler class for manual layout dialog | SDK:Working with Dynamic Data Exchange (DDX) |