View topic - PtDestroyWidget() does not work
PtDestroyWidget() does not work
2 posts
• Page 1 of 1
PtDestroyWidget() does not work
Hi,
In Phab I have a window called "editWin". It is meant to be a pop-up window that shows up on top of a window called "baseWin".
I create an internal link for editWin, and launch it in my code by calling
Now there is an "Exit" button in baseWin. When that button is clicked, I want the pop up window to close as well. I think to close this window, I'm supposed to call
To get around this problem, I set baseWin to be the parent window, so when baseWin exits, editWin also seems to exit automatically. I have two questions:
1) Is my observation correct? If a parent window exits, any child window also is closed automatically? I just want to make sure it's actually lurking somewhere, just not displayed.
2) Why does PtDestroywidget not work?
Thanks!
In Phab I have a window called "editWin". It is meant to be a pop-up window that shows up on top of a window called "baseWin".
I create an internal link for editWin, and launch it in my code by calling
- Code: Select all
ApCreateModule(ABM_editWin, NULL, NULL );
Now there is an "Exit" button in baseWin. When that button is clicked, I want the pop up window to close as well. I think to close this window, I'm supposed to call
- Code: Select all
PtDestroyWidget(ABW_editWin);
To get around this problem, I set baseWin to be the parent window, so when baseWin exits, editWin also seems to exit automatically. I have two questions:
1) Is my observation correct? If a parent window exits, any child window also is closed automatically? I just want to make sure it's actually lurking somewhere, just not displayed.
2) Why does PtDestroywidget not work?
Thanks!
- summerluv
- New Member
- Posts: 7
- Joined: Mon Oct 29, 2012 6:03 pm
Re: PtDestroyWidget() does not work
You have the right idea, but the wrong code.
ABM_editWin is a module pointer. You create a widget with APCreateModule as follows:
PtWidget_t *window;
window = ApCreateModule(...);
So to destroy the window you would call
PtDestroyWidget(window);
ABM_editWin is a module pointer. You create a widget with APCreateModule as follows:
PtWidget_t *window;
window = ApCreateModule(...);
So to destroy the window you would call
PtDestroyWidget(window);
- maschoen
- QNX Master
- Posts: 2728
- Joined: Wed Jun 25, 2003 5:18 pm
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests