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

ACAPI_RegisterModelessWindow‘s PaletteAPIControlCallBack couldn't debug

Anonymous
Not applicable
Hi.
I register modeless dialog by ACAPI_RegisterModelessWindow api.
But the breakpoint can not enter callback function when debugging.
I want to know why can not enter callback.
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Akos Somorjai
Graphisoft
Graphisoft
Hi,

The dialog you register should inherit from DG::Palette:
class FavoritePalette : public DG::Palette {};
Could you please show your ACAPI_RegisterModelessWindow() call?

Also, make sure that you return APIAddOn_Preload from your CheckEnvironment() function.

A trick: add a GUID for your palette, and generate the reference ID from it, to ensure that it's unique:
const GS::Guid paletteGuid ("{DAA252EE-CFB4-42BA-8483-0D255D03D17E}");
const Int32 paletteRefId = (Int32) GS::GenerateHashValue (paletteGuid);
then use these in your ACAPI_RegisterModelessWindow() call.

Best, Akos

View solution in original post

2 REPLIES 2
Solution
Akos Somorjai
Graphisoft
Graphisoft
Hi,

The dialog you register should inherit from DG::Palette:
class FavoritePalette : public DG::Palette {};
Could you please show your ACAPI_RegisterModelessWindow() call?

Also, make sure that you return APIAddOn_Preload from your CheckEnvironment() function.

A trick: add a GUID for your palette, and generate the reference ID from it, to ensure that it's unique:
const GS::Guid paletteGuid ("{DAA252EE-CFB4-42BA-8483-0D255D03D17E}");
const Int32 paletteRefId = (Int32) GS::GenerateHashValue (paletteGuid);
then use these in your ACAPI_RegisterModelessWindow() call.

Best, Akos
Anonymous
Not applicable
Akos wrote:
Hi,

The dialog you register should inherit from DG::Palette:
class FavoritePalette : public DG::Palette {};
Could you please show your ACAPI_RegisterModelessWindow() call?

Also, make sure that you return APIAddOn_Preload from your CheckEnvironment() function.

A trick: add a GUID for your palette, and generate the reference ID from it, to ensure that it's unique:
const GS::Guid paletteGuid ("{DAA252EE-CFB4-42BA-8483-0D255D03D17E}");
const Int32 paletteRefId = (Int32) GS::GenerateHashValue (paletteGuid);
then use these in your ACAPI_RegisterModelessWindow() call.

Best, Akos
Thanks.
According to your method, this problem is solved.

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!