LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Messagebox appears like ConfirmPopup?

Hi all,
I tried to use MessageBox SDK function in order to give the user standard windows messages including icons. My code is the following:
 
  strcpy (msg, "ATTENZIONE!!!\n");
  strcat (msg, "Verranno cancellati i dati delle prove\n");
  strcat (msg, "eseguite fino ad ora.\n\n");
  strcat (msg, "Sei daccordo?");
  if (MessageBox ((HWND)GetCVIWindowHandle (), msg, "Nuova sessione di prove", MB_OKCANCEL || MB_ICONQUESTION || MB_APPLMODAL) == IDCANCEL)
   return 0;
 
With my surprise, the dialogue box displayed is exactly the same as with the folling code, that is a standard CVI popup window:
 
  if (!ConfirmPopup ("Nuova sessione di prove", msg))
   return 0;
 
What can be the reason?
 
I am using CVI 7.1.1 (313) on WinXP Pro SP2; I included windows.h and user32.lib in the project.
 


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 1 of 3
(2,920 Views)
I think "MB_OKCANCEL || MB_ICONQUESTION || MB_APPLMODAL" should be "MB_OKCANCEL | MB_ICONQUESTION | MB_APPLMODAL"
 
- Mohan
0 Kudos
Message 2 of 3
(2,913 Views)
Yes, it's true... and it works!
You can never be too sure about what you really know! Smiley Surprised


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 3 of 3
(2,905 Views)