forked from KolibriOS/kolibrios
Copy command line parameters at start to EditBox
git-svn-id: svn://kolibrios.org@7212 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
62c0d24f6c
commit
a4ee0eb182
@ -2,6 +2,9 @@ PATH_SIZE = 1024;
|
|||||||
PARAMS_SIZE = 256;
|
PARAMS_SIZE = 256;
|
||||||
STACK_SIZE = 1024;
|
STACK_SIZE = 1024;
|
||||||
|
|
||||||
|
AppParams = $END + PATH_SIZE;
|
||||||
|
AppPath = $END;
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
.all : AT(0){
|
.all : AT(0){
|
||||||
@ -12,8 +15,8 @@ SECTIONS
|
|||||||
LONG(END);
|
LONG(END);
|
||||||
LONG($END + PATH_SIZE + PARAMS_SIZE + STACK_SIZE);
|
LONG($END + PATH_SIZE + PARAMS_SIZE + STACK_SIZE);
|
||||||
LONG($END + PATH_SIZE + PARAMS_SIZE + STACK_SIZE);
|
LONG($END + PATH_SIZE + PARAMS_SIZE + STACK_SIZE);
|
||||||
LONG($END + PATH_SIZE);
|
LONG(AppParams);
|
||||||
LONG($END);
|
LONG(AppPath);
|
||||||
*(.text)
|
*(.text)
|
||||||
*(.rdata)
|
*(.rdata)
|
||||||
*(.data)
|
*(.data)
|
||||||
|
@ -315,6 +315,9 @@ Edit1 TEditBox <\
|
|||||||
; -------------------------------------------------------- ;
|
; -------------------------------------------------------- ;
|
||||||
.Data? ; ------------------------------------------------- ;
|
.Data? ; ------------------------------------------------- ;
|
||||||
; -------------------------------------------------------- ;
|
; -------------------------------------------------------- ;
|
||||||
|
Extern AppParams: Byte
|
||||||
|
Extern AppPath: Byte
|
||||||
|
|
||||||
BoxLib Dword ?
|
BoxLib Dword ?
|
||||||
ProcLib Dword ?
|
ProcLib Dword ?
|
||||||
|
|
||||||
@ -347,7 +350,7 @@ ProcInfoBuffer Byte PROC_INFO_BUFFER_SIZE Dup (?)
|
|||||||
|
|
||||||
Edit1MouseVariable Dword ?
|
Edit1MouseVariable Dword ?
|
||||||
Edit1TextBuffer Byte EDIT1_TEXT_BUFFER_SIZE + 2 Dup (?) ; buffer for Edit1.text
|
Edit1TextBuffer Byte EDIT1_TEXT_BUFFER_SIZE + 2 Dup (?) ; buffer for Edit1.text
|
||||||
TmpBuffer Byte TMP_BUFFER_SIZE Dup (?) ; this buffer uses in StrInsert
|
TmpBuffer Byte TMP_BUFFER_SIZE Dup (?) ; this buffer uses in StrInsert
|
||||||
; -------------------------------------------------------- ;
|
; -------------------------------------------------------- ;
|
||||||
.Code ; -------------------------------------------------- ;
|
.Code ; -------------------------------------------------- ;
|
||||||
; -------------------------------------------------------- ;
|
; -------------------------------------------------------- ;
|
||||||
@ -576,6 +579,10 @@ OnButtonBrowse Endp
|
|||||||
Invoke GetProcAddress, ProcLib, CStr("OpenDialog_start")
|
Invoke GetProcAddress, ProcLib, CStr("OpenDialog_start")
|
||||||
mov OpenDialogStart, eax
|
mov OpenDialogStart, eax
|
||||||
|
|
||||||
|
; Copy command line parameters to EditBox
|
||||||
|
; Assume EDIT1_TEXT_BUFFER_SIZE > PARAMS_SIZE(defined in linker-script)
|
||||||
|
Invoke EditBoxSetText, Offset Edit1, Offset AppParams
|
||||||
|
|
||||||
; it need for case if spaces are present in filepath
|
; it need for case if spaces are present in filepath
|
||||||
lea eax, [OpenFilePathBuffer + 1]
|
lea eax, [OpenFilePathBuffer + 1]
|
||||||
mov OD.openfile_path, eax
|
mov OD.openfile_path, eax
|
||||||
|
Loading…
Reference in New Issue
Block a user