Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 25 AUG 1999 09:28:55AM Oystein Reigem wrote:

Here's something I tried to ask about on the plebeian list, but having got no reply I take the posting to the Works list instead:

…I still need some help with the Windows API MessageBox function, so I'd be very grateful for a nudge in the right direction. I've no problem with running it from a window, but as you might have guessed I want it to work from the System Editor.

I quote from the online Reference article on the Msg function:

"To display a message without being in event context (for example, if code is executed from the system editor) use the Windows API function MessageBox. This requires SYSTEM MODAL to be set and all string parameters to be terminated with char(0)."

My questions is: Why do I still get the message "The stored procedure can be executed in event-context only"?

And if that can be circumvented - what should I use for the handle parameter? And which modality? 1? (1=application modality.)

- Oystein -

oystein.reigem@hit.uib.no


At 25 AUG 1999 01:11PM cpates@sprezzatura.com - [url=http://www.sprezzatura.com]Sprezzatura Group[/url] wrote:

[notag]Hi Oystein,

Call MessageBox( 0, "Some Text" : \00\, "Some Title" : \00\, 4096 )

Passing in zero ( NULL in C-speak ) forces the Message to use the screen.

The 4096 is the setting for System Modal..

Not very pretty but works from the system editor…( Well for me anyway :-)

[<A HREF="mailto:cpates@sprezzatura.com" onMouseOver="window.status='Why not click here to send me Email?';return(true)">Carl Pates</A>]

[<A HREF="http://www.sprezzatura.com" onMouseOver="window.status='Why not click here to visit our web site?';return(true)">Sprezzatura Group</A>]

[<I>World Leaders in all things RevSoft</I>]

[<img src="http://www.sprezzatura.com/zz.gif">]

[<script language="javascript">function openNewPage () {window.location.href=(document.TOCNavigator.pageToGoTo.options[document.TOCNavigator.pageToGoTo.selectedIndex].value);document.TOCNavigator.pageToGoTo.selectedIndex="0";}end hiding from non-JS browsers –></script>] [<FORM ACTION "" METHOD=GET NAME="TOCNavigator" <SELECT NAME="pageToGoTo" SIZE=1 onChange="openNewPage()"> <OPTION>Pull down this menu to choose whereabouts on Sprezz site to go <OPTION VALUE="http://www.sprezzatura.com">Home Page <OPTION VALUE="http://www.sprezzatura.com/whatsnew.htm">What's New <OPTION VALUE="http://www.sprezzatura.com/senl.htm">SENL <OPTION VALUE="http://www.sprezzatura.com/patches.htm">Download S/LIST <OPTION VALUE="mailto:support@sprezzatura.com">Send mail to support at Sprezzatura <OPTION VALUE="mailto:sales@sprezzatura.com">Send mail to sales at Sprezzatura </SELECT> </FORM>] [/notag] </QUOTE> —- === At 26 AUG 1999 04:08AM Oystein Reigem wrote: === <QUOTE>Carl, Thanks a lot! Handle 0 I had guessed already, or half remembered from earlier… Modality …but thanks a lot for that Type=4096 (= hex 1000=mb_SystemModal). I had tried to set the modality with the Utility function instead. For all I know that works too, but there was a different reason for my program failing - a bug messing up the Type parameter. And now I don't care. I'll stick with your mb_SystemModal. Or e.g mb_Ok + mb_IconInformation + mb_SystemModal. Bonus questions - if you have time… :-) Tell me - is it normal that the message box cannot be moved? And no system close button? Have you perhaps got a list of all possible flags to use in the Type parameter? My list contains the following flags (but I don't even remember now where I got it from): /* MessageBox Flags */ mb_Ok =IConv( "0000", "MX" ) mb_OkCancel =IConv( "0001", "MX" ) mb_AbortRetryIgnore=IConv( "0002", "MX" ) mb_YesNoCancel =IConv( "0003", "MX" ) mb_YesNo =IConv( "0004", "MX" ) mb_RetryCancel =IConv( "0005", "MX" ) mb_IconHand =IConv( "0010", "MX" ) mb_IconStop =IConv( "0010", "MX" ) mb_IconQuestion =IConv( "0020", "MX" ) mb_IconExclamation =IConv( "0030", "MX" ) mb_IconAsterisk =IConv( "0040", "MX" ) mb_IconInformation =IConv( "0040", "MX" ) mb_DefButton1 =IConv( "0000", "MX" ) mb_DefButton2 =IConv( "0100", "MX" ) mb_DefButton3 =IConv( "0200", "MX" ) mb_ApplModal =IConv( "0000", "MX" ) mb_SystemModal =IConv( "1000", "MX" ) mb_TaskModal =IConv( "2000", "MX" ) mb_NoFocus =IConv( "8000", "MX" ) mb_TypeMask =IConv( "000F", "MX" ) mb_IconMask =IConv( "00F0", "MX" ) mb_DefMask =IConv( "0F00", "MX" ) mb_ModeMask =IConv( "3000", "MX" ) mb_MiscMask =IConv( "C000", "MX" ) - Oystein - </QUOTE> —- === At 26 AUG 1999 06:28AM cpates@sprezzatura.com - Sprezzatura Group wrote: === <QUOTE>[notag]Hi Oystein, I think you've got all the MessageBox options there. I believe the appearance 'problem' may be due to the System modal setting - it's the same message type that you used to get with GPF's <g> so I think it's hardcoded - System Modal messages are designed so that you take notice of them - I suppose a big ugly white message on the screen qualifies for this…. If you don't set system modal you get a much nicer looking message ( but then System Editor locks up and…. Regards [<A HREF="mailto:cpates@sprezzatura.com" onMouseOver="window.status='Why not click here to send me Email?';return(true)">Carl Pates</A>] [<A HREF="http://www.sprezzatura.com" onMouseOver="window.status='Why not click here to visit our web site?';return(true)">Sprezzatura Group</A>] [<I>World Leaders in all things RevSoft</I>] [<img src="http://www.sprezzatura.com/zz.gif">] [<script language="javascript">function openNewPage () {window.location.href=(document.TOCNavigator.pageToGoTo.options[document.TOCNavigator.pageToGoTo.selectedIndex].value);document.TOCNavigator.pageToGoTo.selectedIndex="0";}end hiding from non-JS browsers –></script>]

[<FORM ACTION "" METHOD=GET NAME="TOCNavigator"

<SELECT NAME="pageToGoTo" SIZE=1 onChange="openNewPage()">

<OPTION>Pull down this menu to choose whereabouts on Sprezz site to go

<OPTION VALUE="http://www.sprezzatura.com">Home Page

<OPTION VALUE="http://www.sprezzatura.com/whatsnew.htm">What's New

<OPTION VALUE="http://www.sprezzatura.com/senl.htm">SENL

<OPTION VALUE="http://www.sprezzatura.com/patches.htm">Download S/LIST

<OPTION VALUE="mailto:support@sprezzatura.com">Send mail to support at Sprezzatura

<OPTION VALUE="mailto:sales@sprezzatura.com">Send mail to sales at Sprezzatura

</SELECT>

</FORM>][/notag]


At 26 AUG 1999 07:19AM Oystein Reigem wrote:

Carl,

…I believe the appearance 'problem' may be due to the System modal setting - it's the same message type that you used to get with GPF's so I think it's hardcoded - System Modal messages are designed so that you take notice of them - I suppose a big ugly white message on the screen qualifies for this….

Certainly. But if you add stuff like mb_Ok and mb_IconInformation it's not big and white and ugly and scary anymore. Just try.

- Oystein -

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/442c3e897ad56fe9852567d8004a0f48.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1