10-22-2013 10:18 AM
Hi,
This is probably a case of me doing something I shouldn't, but I figured out a while ago that I could get resizable modal pop ups by doing something like this:
SetPanelAttribute(panelHandle2, ATTR_SIZABLE, 0); InstallPopup(panelHandle2); SetPanelAttribute(panelHandle2, ATTR_SIZABLE, 1);
This is almost certainly a hack, but it seems to work and I get modal pop ups that the user can resize and maximize. However, the run-time engine does not seem to like this, and I am getting general protection faults when alt-tabbing between the main application window and the pop up (which both have taskbar buttons). The address where it crashes, at least on my computer, is 0x684F5E34 which is in cvirte.dll. This also seems to crash in the release configuation.
I've attached a small sample application. In order to see the problem, launch the application, open the Pop Up, and alt-tab a few times between the two windows. On my development PC this will generate a general protection fault after a few times (often the first time). I'm running CVI 2012SP1 on a Windows XP Pro PC.
Any insight would be helpful. Thanks.
10-22-2013 10:51 AM
What I don't understand is how you can switch between main and popup panel since the latter is displayed with InstallPopup: I never succeed in getting focus to the main panel when the popup is active, and it is not even listed among windows in alt-tab procedure. If I select the main window in taskbar, the popup immediately comes up and gets the focus.
10-22-2013 10:57 AM - edited 10-22-2013 10:59 AM
It also crashes with CVI2013, the difference is in the address (different RTE), in my case I have 0x684F2A66
@Roberto: You do not need to tab yourself - simply set a few breakpoints so that CVI will switch windows...