From ee1482b98dc1fdc4a8e9db890eeb852cedb57175 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Sat, 16 May 2020 19:15:59 +0000 Subject: [PATCH] graph: set proper edit_box structure git-svn-id: svn://kolibrios.org@7933 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/other/graph/build.bat | 6 ++-- programs/other/graph/hello.cpp | 4 +-- programs/other/graph/use_library.h | 51 +++++++++++++++++++++--------- 3 files changed, 41 insertions(+), 20 deletions(-) diff --git a/programs/other/graph/build.bat b/programs/other/graph/build.bat index 9f67cb2bfb..ecc811b025 100644 --- a/programs/other/graph/build.bat +++ b/programs/other/graph/build.bat @@ -1,9 +1,9 @@ call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" -@cl /c /O2 /nologo /GS- /GR- /fp:fast *.cpp +@cl /c /Od /nologo /GS- /GR- /fp:fast *.cpp @link /nologo /manifest:no /entry:crtStartUp /subsystem:native /base:0 /fixed /align:16 /nodefaultlib hello.obj *.obj -@del table -@pe2kos hello.exe table +@del graph +@pe2kos hello.exe graph @del hello.exe @del *.obj pause \ No newline at end of file diff --git a/programs/other/graph/hello.cpp b/programs/other/graph/hello.cpp index 6d68028ee7..bf7ef41115 100644 --- a/programs/other/graph/hello.cpp +++ b/programs/other/graph/hello.cpp @@ -44,8 +44,8 @@ double x1,y1,x2,y2; char *funct = NULL; char edit_path[256]; -edit_box mybox = {0,92,WND_H-16-32,0xffffff,0x94AECE,0,0x808080,0x10000000, - sizeof(edit_path)-1,(dword)&edit_path, 0, 0}; +edit_box mybox = {200,92,WND_H-16-32,0xffffff,0x94AECE,0,0x808080,0x10000000, + sizeof(edit_path)-1,(dword)&edit_path, 0, 0, 0}; char *full_head; diff --git a/programs/other/graph/use_library.h b/programs/other/graph/use_library.h index ab8364619a..816950d09d 100644 --- a/programs/other/graph/use_library.h +++ b/programs/other/graph/use_library.h @@ -1,21 +1,23 @@ typedef Dword dword; +typedef unsigned short word; +typedef dword __stdcall dword_func(dword); dword am__ = 0x0; dword bm__ = 0x0; -char aEdit_box_draw[9] = "edit_box"; -char aEdit_box_key[13] = "edit_box_key"; -char aEdit_box_mouse[15] = "edit_box_mouse"; -char aVersion_ed[11] = "version_ed"; +char aEdit_box_draw[] = "edit_box"; +char aEdit_box_key[] = "edit_box_key"; +char aEdit_box_mouse[] = "edit_box_mouse"; +char aVersion_ed[] = "version_ed"; -char aCheck_box_draw [15] = "check_box_draw"; -char aCheck_box_mouse [16] = "check_box_mouse"; -char aVersion_ch [11] = "version_ch"; +char aCheck_box_draw [] = "check_box_draw"; +char aCheck_box_mouse [] = "check_box_mouse"; +char aVersion_ch [] = "version_ch"; -char aOption_box_draw [16] = "option_box_draw"; -char aOption_box_mouse[17] = "option_box_mouse"; -char aVersion_op [11] = "version_op" ; +char aOption_box_draw [] = "option_box_draw"; +char aOption_box_mouse[] = "option_box_mouse"; +char aVersion_op [] = "version_op" ; //BOX_LIB @@ -33,8 +35,27 @@ dword dummy = 0; struct edit_box{ -dword width, left, top, color, shift_color, focus_border_color, blur_border_color, -text_color, max, text, flags, size, pos, offset, cl_curs_x, cl_curs_y, shift, shift_old; +dword width, + left, + top, + color, + shift_color, + focus_border_color, + blur_border_color, + text_color, + max, + text, + mouse_variable, + flags, + size, + pos, + offset, + cl_curs_x, + cl_curs_y, + shift, + shift_old, + height, + ed_char_width; }; void load_edit_box() @@ -48,9 +69,9 @@ void load_edit_box() return; } - edit_box_draw = (dword_func*)kol_cofflib_procload(k, "edit_box"); - edit_box_key = (dword_func*)kol_cofflib_procload(k,"edit_box_key"); - edit_box_mouse = (dword_func*)kol_cofflib_procload(k,"edit_box_mouse"); + edit_box_draw = (dword_func*)kol_cofflib_procload(k, aEdit_box_draw); + edit_box_key = (dword_func*)kol_cofflib_procload(k, aEdit_box_key); + edit_box_mouse = (dword_func*)kol_cofflib_procload(k, aEdit_box_mouse); kos_SetMaskForEvents(0x27); if (edit_box_draw == NULL || edit_box_key == NULL || edit_box_mouse == NULL)