Index: /trunk/gui/shared/PrintUtl.VRS =================================================================== --- /trunk/gui/shared/PrintUtl.VRS (revision 18) +++ /trunk/gui/shared/PrintUtl.VRS (revision 19) @@ -339,4 +339,24 @@ +/*:VRX CreatePrinterObject +*/ +/* Create the specified printer using SysCreateObject (this should create the + * queue automatically). + */ +CreatePrinterObject: PROCEDURE + PARSE ARG driver, model, portname, queuename, printername + + oid = '' + setup = 'PORTNAME='portname';PRINTDRIVER='driver'.'model';QUEUENAME='queuename';TAKEDEFAULTS=YES' + + rc = SysCreateObject('WPPrinter', printername, '', setup';OBJECTID='oid';', 'F') + IF rc == 1 THEN + CALL SysMoveObject oid, '' + ELSE + rc = SysCreateObject('WPPrinter', printername, '', setup';', 'F') + +RETURN rc + + /*:VRX RSPCreatePort */ @@ -594,2 +614,54 @@ RETURN drv_list.0 +/*:VRX NLSGetMessage +*/ +/* + * Gets the message text associated with the given message number from the + * current language file. + */ +NLSGetMessage: PROCEDURE EXPOSE globals. + PARSE ARG msgnum, . + args = ARG() + + msgfile = globals.!messages + IF msgnum == '' THEN RETURN '' + + sub_parms = '' + DO i = 2 TO args + sub_parms = sub_parms', "'ARG( i )'"' + END + + INTERPRET 'msgfromfile = SysGetMessage( msgnum, msgfile' sub_parms ')' + + PARSE VAR msgfromfile message '0D'x . + IF SUBSTR( message, 1, 4 ) == 'SYS0' THEN message = '' + +RETURN message + +/*:VRX NLSSetText +*/ +/* + * Sets the specified property of the specified control to the specified + * message text. + */ +NLSSetText: PROCEDURE EXPOSE globals. + PARSE ARG control, property, message, substitution + args = ARG() + + success = 1 + IF args < 4 THEN + text = NLSGetMessage( message ) + ELSE DO + sub_parms = '' + DO i = 4 TO args + sub_parms = sub_parms '"'|| ARG( i ) ||'",' + END + sub_parms = STRIP( sub_parms, 'T', ',') + INTERPRET 'text = NLSGetMessage( message, 'sub_parms')' + END + + IF text == '' THEN success = 0 + ELSE CALL VRSet control, property, text + +RETURN success +

AltStyle によって変換されたページ (->オリジナル) /