LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Howto catch "minimize panel"

I have LabWindows/CVI 7.1 and I want to execute some code when the user minimizes the main panel of my program.
I have written a panel callback and in the UIR i have asociated the panel callback with my main panel.
The source code of this panel callback is:
 
// PARENTcallback
int CVICALLBACK PARENTcallback (int panel, int event, void *callbackData,
  int eventData1, int eventData2)
{
 if(event==EVENT_CLOSE)
  QuitUserInterface(0);
 return 0;
}
I have a breakpoint on the if-statement. If I close the main panel (clicking the cross at the right top) I enter the panel callback at the breakpoint.
 
But if I minimize I do not enter the callback. Nor a "lost focus" (clicking on the windows desktop) is received...
 
What have I done wrong?!?
 
Best regards,
Robin
0 Kudos
Message 1 of 9
(3,863 Views)

Hello Robin,

Check out Al S's comments in the following post.

Thanks.

Message 2 of 9
(3,860 Views)
Thanks for your reply. I noticed this thread, however it was of no help for me as I do NOT receive the "LOST FOCUS" event...
 
I have the "_" button and the "x" button on the main panel. When I pressing the "x" button, I enter my callback, when I press the "_" button I do not enter my callback...
 
I hope you can help me...
0 Kudos
Message 3 of 9
(3,855 Views)
Well, it works fine for me......
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 4 of 9
(3,843 Views)
Yep, this one works for me as well...
So any suggestions?!?
I can e-mail you my project as well?
0 Kudos
Message 5 of 9
(3,820 Views)
Robin,

the most propable thing is, that the callback is not connected as a panelcallback to the appropriate panel. please check if the callback is connected to the correct panel. best use the uir-editor to generate all callbacks again after making sure that the panel has a callback defined. backup your old callbacks each time CVI asks you. then take a look if there are any new callbacks...... but i would advise you not to save this state of project. 🙂 this is only to take a look!

Norbert B.
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 6 of 9
(3,815 Views)
Thank you for your prompt reply. I will try this (in a copy of my project, not in the original) 🙂
Is it not more easy to check the corresponding *.h file of the *.uir file to see which callbacks are connected to which panels?!?
0 Kudos
Message 7 of 9
(3,814 Views)
Robin,

"Is it not more easy to check the corresponding *.h file of the *.uir file to see which callbacks are connected to which panels?!?"
it depends on the number of panels and the amount of callbacks you included there (by using the editor). i for myself prefer the generation because i dont get messed up with different panelhandles..... but you can do it the other way as well....

Norbert B.

Message Edited by Norbert B on 08-31-2005 05:48 AM

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 8 of 9
(3,810 Views)

Still not working in CVI7. But when I tried to compile the project with CVI8, I got the MINIMIZE event! Without changing anything to the C-source code... So...

0 Kudos
Message 9 of 9
(3,764 Views)