Copy link to clipboard
Copied
Hi to all,
I'm trying to add my Qt button to the dockable panel of the plugin. I need HWND of this panel to attach my button. How I can get it? With spy++ I found out that my panel's class name is InDesign_HWNDBasedPanelView but I don't know how to access it and get it's HWND.Could you tell me how to get it please? Thank you in advance.
Here's the solution that works for me:
HWND hwnd{};
InterfacePtr<IApplication> app(GetExecutionContextSession()->QueryApplication());
if (app)
{
InterfacePtr<IPanelMgr> panelMgr(app->QueryPanelManager());
if (panelMgr)
{
InterfacePtr<IControlView> controlView(this, UseDefaultIID());
if (controlView)
{
PaletteRef panelsContainer = panelMgr->GetPaletteRefContainingPanel(controlView);
hwnd = panelsContainer.GetOWLControl();
}
...
Copy link to clipboard
Copied
Here's the solution that works for me:
HWND hwnd{};
InterfacePtr<IApplication> app(GetExecutionContextSession()->QueryApplication());
if (app)
{
InterfacePtr<IPanelMgr> panelMgr(app->QueryPanelManager());
if (panelMgr)
{
InterfacePtr<IControlView> controlView(this, UseDefaultIID());
if (controlView)
{
PaletteRef panelsContainer = panelMgr->GetPaletteRefContainingPanel(controlView);
hwnd = panelsContainer.GetOWLControl();
}
}
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now