In C++ plugin development, how do you set the position of a panel or dialog on the screen?
I have obtained the IControlView of the panel or dialog, and then called the MoveTo function, but it doesn't change the window's position. For the panel, I obtained the IWidgetParent interface through IControlView, and then got the IWindow interface by calling:
InterfacePtr<IWidgetParent> myParent(panelControw, UseDefaultIID());
InterfacePtr<IWindow> iWindow((IWindow*)myParent->QueryParentFor(IWindow::kDefaultIID));For dialogs, I created a new dialog using:
IDialog* dialog = dialogMgr->CreateNewDialog(dialogSpec, IDialog::kMovableModal);Then I got the IWindow interface through:
InterfacePtr<IWindow> iWindow(dialog, UseDefaultIID());Afterwards, I called the SetPosition function of the IWindow interface, but still couldn’t change the window's position. Has anyone encountered this issue before? Any guidance or advice from more experienced developers would be greatly appreciated. Thank you.
