LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can the Close control be activated on the title bar for a MessagePopup?

I call MessagePopup to display a message in a popup in my application.  Is there a way that the close control "X" on the title bar can be activiated so that depressing it will cause the popup to popdown?
I do not have the same issue with a call to ConfirmPopup.  I don't want to use a ConfirmPopup call instead because I don't want the yes no buttons presented.
Thanks,
Donna
0 Kudos
Message 1 of 11
(4,255 Views)
You could probably configure the GenericMessagePopup() to do what you want.
0 Kudos
Message 2 of 11
(4,252 Views)
Does anyone know how to accomplish this using MessagePopup?
Thanks,
Donna
0 Kudos
Message 3 of 11
(4,246 Views)
Doesn't selecting the X on the title bar close a MessagePopup dialog on your system.  It does on mine.  CVI 7.1.1, and XP
0 Kudos
Message 4 of 11
(4,238 Views)
No nothing happens.  I am using LabWindows 6.0 and Windows XP.
Donna
0 Kudos
Message 5 of 11
(4,233 Views)
I tried cvi 6 under win 2000 and the close X works fine for me.  Something else is going on here, but I do not know what it could be.
0 Kudos
Message 6 of 11
(4,231 Views)
Even in WinXP the close cross works fine with cvi6: it can be hided with some SetSystemPopupAttribute but if shown it works normally.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 7 of 11
(4,220 Views)

It doesn't work for me.  I am not hiding it by setting SetSystemPopupAttribute or anything else.  I just call MessagePopup and that it is all.  Perhaps because I am compiling and building an executable using Visual Studio 6.0.  I use LabWindows to create the .uir files and then I imported the project into Visual Studio 6.0.  Then I use labWindows to Create a distribution kit which uses the .exe that was built using Visual Studio.  Maybe this is the reason?????  I had to have this environment because LabWindows/CVI 6.0 cannot handle C++.  I still would like to know if there is anything that I can do other than create my own panels and use the Close Panel function.  I know that I can also use ConfirmPopup (the X works on the title bar) but is there a way to get rid of the Yes No buttons?

Thanks,

Donna

0 Kudos
Message 8 of 11
(4,192 Views)
As mvr suggested, you can try the GenericMessagePopup:

GenericMessagePopup (title, msg, "OK", NULL, NULL, NULL, 0, 0, VAL_GENERIC_POPUP_BTN1,
                     VAL_GENERIC_POPUP_BTN1, VAL_GENERIC_POPUP_BTN1);

It's still not clear why ConfirmPopup or GenericMessagePopup work in a way that MessagePopup does not, since all the message popup functions are implemented in terms of calls to GenericMessagePopup.
0 Kudos
Message 9 of 11
(4,184 Views)
Hi Donna,

I created a simple CVI project that displays popups via calls to MessagePopup, ConfirmPopup, and GenericMessagePopup, then created a VC++ 6.0 project from it.  I find that the close box for each of the popups does close the popup.  I'd be curious to see if the MessagePopup misbehaves on your system.  If you want to rebuild the executable, you'll have to update the project's include and lib paths.  Let me know how it goes.  Also, you mentioned that you're having this problem after distributing the app.  Does it happen if you just run the exe straight from the build location?  Does it happen on multiple machines?  What version of CVI are you building your uirs/distributions with?

Mert A.
National Instruments
0 Kudos
Message 10 of 11
(4,169 Views)