Lisp HUG Maillist Archive

title in delivered application DOS window

Hello,

In the deliver function, how can I specify the title of the DOS 
window that appears with a delivered application?

Francis


Re: title in delivered application DOS window

Hello Francis,

| In the deliver function, how can I specify the title of the DOS
| window that appears with a delivered application?

I am afraid, you need to call Win32API via FLI like this:

(fli:define-foreign-function (|SetConsoleTitle| "SetConsoleTitle" :dbcs)
  ((ptr :pointer))    ; LPCTSTR lpConsoleTitle  new console title
  :result-type  win32:BOOL
  :calling-convention :stdcall
  :module "kernel32")

(defun set-console-title (title)
  (let ((external-format (if (string= (software-type) "Windows NT") :unicode
:ascii)))
    (fli:with-foreign-string (ptr element-count byte-count
         :external-format external-format)
         title
      (declare (ignore element-count byte-count))
      (|SetConsoleTitle| ptr))))
--
Sincerely,
Dmitriy Ivanov
lisp.ystok.ru


Re: title in delivered application DOS window

Le 8/09/2006 08:06, Dmitriy Ivanov écrivait :

>Hello Francis,
>
>| In the deliver function, how can I specify the title of the DOS
>| window that appears with a delivered application?
>
>I am afraid, you need to call Win32API via FLI like this:

Hello Dmitriy,

I was hoping something simpler like a parameter 
in deliver I would have missed. I could also run 
a batch file from LW using Cmdow utility (that 
can also be used to hide the console which is 
also something I want). If interested see http://www.commandline.co.uk/cmdow/

Many thanks,

Francis



>(fli:define-foreign-function (|SetConsoleTitle| "SetConsoleTitle" :dbcs)
>   ((ptr :pointer))    ; LPCTSTR lpConsoleTitle  new console title
>   :result-type  win32:BOOL
>   :calling-convention :stdcall
>   :module "kernel32")
>
>(defun set-console-title (title)
>   (let ((external-format (if (string= (software-type) "Windows NT") :unicode
>:ascii)))
>     (fli:with-foreign-string (ptr element-count byte-count
>          :external-format external-format)
>          title
>       (declare (ignore element-count byte-count))
>       (|SetConsoleTitle| ptr))))
>--
>Sincerely,
>Dmitriy Ivanov
>lisp.ystok.ru



Updated at: 2020-12-10 08:47 UTC