Skip to main content
panduvittala
Inspiring
November 27, 2013
Question

get AIPanelSuite in SetSizeChangedNotifyProc callback

  • November 27, 2013
  • 1 reply
  • 796 views

My Plugin does not use global suite references. Instead it acquires and releases suites as required. The problem is with the panel. I want to get the size of the panel when the size is changed (so I can change size of embedded wxpanel accordingly). To get the size, I need to acquire panel suite. However, the SetSizeChangedNotifyProc callback method only provides panelref and no message or anything else. How can I get the suite in this scenario?

Also this piece of code to embed wxpanel inside aipanel, handle resize etc is going into a dll so that it can be used by multiple plugins. So I do not want to use global suite ptr.

This topic has been closed for replies.

1 reply

A. Patterson
Inspiring
November 27, 2013

I don't know if this would work, but you could cache the SPBasicSuite* that comes with every message and use that to acquire your suites as needed. I just don't know if that basic pointer is consistently available or of it's created for each message. If it is, I don't see any way around using global suite pointers, but that's not a big shock since they designed the API around using global suite pointers

panduvittala
Inspiring
November 27, 2013

hmmm... There goes my design of having AI utility methods in a dll

A. Patterson
Inspiring
November 27, 2013

It's worth checking if the SPBasicSutie* stays alive past the life of the message it came in. If it does, you're good to go. Otherwise, yeah, you're a wee bit boned.


Though I don't see why your stand-alone DLL can't have its own global suite pointer. We used to ship our plugin as 30+ plugin DLLs and that worked fine. Why couldn't your stand-alone utility DLL have its own set of suite pointers?