‎2009-08-03
07:46 PM
- last edited on
‎2023-08-03
01:41 PM
by
Doreena Deng
‎2009-08-04 12:58 PM
nixonjan wrote:Is there a good reason for not simply using a GRC? It's very straight-forward, and items in the GRC can be shown, hidden, moved etc as required.
We have dlg created without using any GRC resource.
Please anyone explains me and provides correct API to add to dlg for example button or any other control
‎2009-08-27 04:24 PM
class palD: public DG::Palette
{
public:
palD( );
virtual ~palD();
private:
// Buttons
DG::IconButton* btCreate;
DG::IconButton* btSwitch;
};
// Constructor :
palD::palD( )
: DG::Palette( DG::Rect(DG::Point(0,0),193,28), paletteGUID, NoGrow, Close, LeftCaption, NormalFrame )
{
ACAPI_RegisterModelessWindow( GetId(), PaletteAPIControlCallBack,
API_PalEnabled_FloorPlan +
API_PalEnabled_Section +
API_PalEnabled_Detail +
API_PalEnabled_Layout +
API_PalEnabled_3D );
// Add buttons :
btCreate = new DG::IconButton( *this, DG::Rect( DG::Point(1,1),30,26) );
btCreate->SetIcon( DG::Icon( 32100 ) );
btCreate->Attach( *this );
btSwitch = new DG::IconButton( *this, DG::Rect( DG::Point(65,1),30,26) );
btSwitch->SetIcon( DG::Icon( 32102 ) );
btSwitch->Attach( *this );
btCreate->Show();
btSwitch->Show();
}
palD::~palD()
{
btCreate->Detach( *this );
btSwitch->Detach( *this );
delete btCreate;
delete btSwitch;
ACAPI_UnregisterModelessWindow( GetId() );
}
I hope this helps...