Archicad C++ API
About Archicad add-on development using the C++ API.
SOLVED!

How to remove close button(x)

RAFD
Participant

Hi, how can I remove the close button(x) for add-on? Got a problem when clicking it and I was thinking to remove it.

Thanks 

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

According to the Dialog documentation (can't find it for the online help, but it's available in e.g. the help coming with the AC26 dev kit) you have the following options:

  • Modal Dialog: noCaption - I think this would remove the whole title bar and with it the close box
  • Palette you have additionally: noClose - to remove the close box.

Both options are specified in the resource definition of the dialog/palette. Like the frame and grow flags. Definition from docs:

    'GDLG'  resID  Palette [| frameFlag | growFlag | captionFlag | closeFlag]  x  y  dx  dy  "dlgTitle" {



View solution in original post

4 REPLIES 4
Solution

According to the Dialog documentation (can't find it for the online help, but it's available in e.g. the help coming with the AC26 dev kit) you have the following options:

  • Modal Dialog: noCaption - I think this would remove the whole title bar and with it the close box
  • Palette you have additionally: noClose - to remove the close box.

Both options are specified in the resource definition of the dialog/palette. Like the frame and grow flags. Definition from docs:

    'GDLG'  resID  Palette [| frameFlag | growFlag | captionFlag | closeFlag]  x  y  dx  dy  "dlgTitle" {



Hi @BerndSchwarzenbacher thanks for the help. Very appreciated!

RAFD
Participant

Hi @BerndSchwarzenbacher,

 

How do I change my modal dialog to palette?

It's a bit of work to get it right.
You need to adapt the resource file and specify a palette there and also change the code accordingly.
I think it's best to check out the DG_Test/OwnerDrawnListBoxPalette Example.