Форум » GUI » Новая версия Расширенного релиза библиотеки MiniGUI (часть V) (продолжение) » Ответить

Новая версия Расширенного релиза библиотеки MiniGUI (часть V) (продолжение)

gfilatov: Начало темы находится здесь, а теперь АНОНС * АНОНС * АНОНС * АНОНС * АНОНС Готовится к опубликованию новая сборка №48, которая выйдет в конце недели. Если у Вас есть интересные наработки для включения в новый релиз, то сейчас самое удобное время для их отправки мне Кратко, что нового: - исправление обнаруженных ошибок и неточностей кода; - новый класс HEADERIMAGE для Grid и Browse; - свойство Address в Hyperlink может теперь открывать папку или файл на диске; - добавлен NOTABSTOP класс для Browse; - поддержка пользовательских компонентов (заимствована из оффициального релиза); - расширения и исправления в библиотеках TsBrowse и PropGrid; - обновлены сборки Харбор и HMGS-IDE; - новые и обновленные старые примеры (как обычно ).

Ответов - 300, стр: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 All

Dima: Haz пишет: В этом ЗЫ у минигуи наблюдаются проблемы с передачей фокуса А дедько Линарес в FW как то решил эту проблему однако Но я не хочу FW , мне нравится Минигуи !

Петр: Dima пишет: К примеру вот на этом примере глючит C:\MiniGUI\SAMPLES\Advanced\Tsb_LoadFields\ ЗЫ Вынь 7 А у меня не заглючило, Win7 тоже

Dima: Петр Пару раз клацнул наверное. У меня получилось на 4-ом разе. Глючат исключительно приложения на минигуи со всем остальным все идеально. Еще одно ЗЫ :) Mingw у меня в приложениях (так же глючит) А примерчик собран в BCC55


Dima: Петр А вот кино https://cloud.mail.ru/public/Bfu1/JCCd19jhg В примере происходит тоже , кино снимать не стал.

Петр: Dima пишет: Пару раз клацнул наверное. У меня получилось на 4-ом разе. Да нет, вроде. Клацал пока не надоело. MiniGUI свежий, компилятор BCC55, Win7 со всеми доступными обновлениями, AVG.

Dima: Петр пишет: MiniGUI свежий +1 Петр пишет: компилятор BCC55 +1 Петр пишет: Win7 со всеми доступными обновлениями на момент установки 15.05.2015 все стояло самое свежее + KB Петр пишет: AVG Drweb ХЗ что делать , не за себя душа болит а за юзеров а у них только XP и 7 , начнут вот так вот клацать и начнутся вопросы а ответить то и не чего

Петр: Понятно, что собака зарыта здесь: FUNCTION Events ( hWnd, nMsg, wParam, lParam ) Понятно, что код там (и не только там) нужно оптимизировать в любом случае, даже если бы не было артефактов. Посмотрю, что можно сделать и отпишусь. Но нужно время, и отдельная тема, например "Обработка событий в MiniGUI", что бы ветку не зас..ть окончательно, причем из лучших побуждений.

Dima: Петр пишет: Посмотрю, что можно сделать и отпишусь. Но нужно время, и отдельная тема, например "Обработка событий в MiniGUI" Петр я готов тестить в любое время суток если что.

SergKis: Поковырял команды ООП This... : i_this.ch [pre2] ... // WINDOWS (THISWINDOW) #xtranslate ThisWindow . <p:Title,NotifyIcon,NotifyTooltip,FocusedControl,BackColor,Name,Row,Col,Width,Height,MinHeight,MinWidth,MaxHeight,MaxWidth,TitleBar,SysMenu,Sizable,MaxButton,MinButton,Topmost> => GetProperty ( _HMG_THISFORMNAME , <"p"> ) #xtranslate ThisWindow . <p:Title,NotifyIcon,NotifyTooltip,Cursor,BackColor,Row,Col,Width,Height,MinHeight,MinWidth,MaxHeight,MaxWidth,TitleBar,SysMenu,Sizable,MaxButton,MinButton,Topmost> := <arg> => SetProperty ( _HMG_THISFORMNAME , <"p"> , <arg> ) #xtranslate ThisWindow . <p:Activate,Center,Release,Maximize,Minimize,Restore,Show,Hide,SetFocus> [ () ] => DoMethod ( _HMG_THISFORMNAME , <"p"> ) #xtranslate ThisWindow . <p:Handle> => GetFormHandle ( _HMG_THISFORMNAME ) #xtranslate ThisWindow . <p:Index> => GetFormIndex ( _HMG_THISFORMNAME ) #xtranslate ThisWindow . <p:ClientWidth> => GetCliWidth ( GetFormHandle ( _HMG_THISFORMNAME ) ) #xtranslate ThisWindow . <p:ClientHeight> => GetCliHeight( GetFormHandle ( _HMG_THISFORMNAME ) ) ... // COMMON ( REQUIRES TYPE CHECK ) #xtranslate This . <p:Name,Row,Col,Width,Height,BackColor> => iif ( _HMG_THISType == 'C' , GetProperty ( _HMG_THISFORMNAME , _HMG_THISCONTROLNAME , <"p"> ) , GetProperty ( _HMG_THISFORMNAME , <"p"> ) ) #xtranslate This . <p:Row,Col,Width,Height,BackColor> := <arg> => iif ( _HMG_THISType == 'C' , SetProperty ( _HMG_THISFORMNAME , _HMG_THISCONTROLNAME , <"p"> , <arg> ) , SetProperty ( _HMG_THISFORMNAME , <"p"> , <arg> ) ) #xtranslate This . <p:Show,Hide,SetFocus> [ () ] => iif ( _HMG_THISType == 'C' , DoMethod ( _HMG_THISFORMNAME , _HMG_THISCONTROLNAME , <"p"> ) , DoMethod ( _HMG_THISFORMNAME , <"p"> ) ) #xtranslate This . <p:Handle> => iif ( _HMG_THISType == 'C' , GetControlHandle ( _HMG_THISCONTROLNAME , _HMG_THISFORMNAME ) , GetFormHandle ( _HMG_THISFORMNAME ) ) #xtranslate This . <p:Index> => iif ( _HMG_THISType == 'C' , GetControlIndex ( _HMG_THISCONTROLNAME , _HMG_THISFORMNAME ) , GetFormIndex ( _HMG_THISFORMNAME ) ) #xtranslate This . <p:ClientWidth> => GetCliWidth ( iif ( _HMG_THISType == 'C' , GetControlHandle ( _HMG_THISCONTROLNAME , _HMG_THISFORMNAME ) , GetFormHandle ( _HMG_THISFORMNAME ) ) ) #xtranslate This . <p:ClientHeight> => GetCliHeight( iif ( _HMG_THISType == 'C' , GetControlHandle ( _HMG_THISCONTROLNAME , _HMG_THISFORMNAME ) , GetFormHandle ( _HMG_THISFORMNAME ) ) ) #xtranslate This . <c> . <p:ClientWidth> => GetCliWidth ( GetControlHandle ( <"c"> , _HMG_THISFORMNAME ) ) #xtranslate This . <c> . <p:ClientHeight> => GetCliHeight( GetControlHandle ( <"c"> , _HMG_THISFORMNAME ) ) #xtranslate This . <c> . <p:Value,Name,Address,BackColor,FontColor,Picture,Icon,ToolTip,FontName,FontSize,FontBold,FontUnderline,FontItalic,FontStrikeOut,Caption,Row,DisplayValue,Col,Width,Height,Visible,Enabled,Checked,ItemCount,RangeMin,RangeMax,Cargo,Tabstop> => GetProperty ( _HMG_THISFORMNAME, <"c"> , <"p"> ) #xtranslate This . <c> . <p:Value,Name,Address,BackColor,FontColor,Picture,Icon,ToolTip,FontName,FontSize,FontBold,FontUnderline,FontItalic,FontStrikeOut,Caption,Row,DisplayValue,Col,Width,Height,Visible,Enabled,Checked,ItemCount,RangeMin,RangeMax,Cargo,Tabstop> := <n> => SetProperty ( _HMG_THISFORMNAME, <"c"> , <"p"> , <n> ) #xtranslate This . <c> . <p:ListWidth,Position,CaretPos,ForeColor,AllowAppend,AllowDelete,AllowEdit,InputItems,DisplayItems,FormatString,Indent,Linecolor,ItemHeight,AutoFont,RichValue> => GetProperty ( _HMG_THISFORMNAME, <"c"> , <"p"> ) #xtranslate This . <c> . <p:ListWidth,Position,CaretPos,ForeColor,AllowAppend,AllowDelete,AllowEdit,Blink,InputItems,DisplayItems,FormatString,Indent,Linecolor,ItemHeight,AutoFont,RichValue> := <n> => SetProperty ( _HMG_THISFORMNAME, <"c"> , <"p"> , <n> ) #xtranslate This . <c> . <p:Caption,Header,Image,Item,Icon,ToolTip,Width,ColumnWidth,Enabled,RichValue,HeaderImage,CheckboxItem> (<arg>) => GetProperty ( _HMG_THISFORMNAME, <"c"> , <"p"> , <arg> ) #xtranslate This . <c> . <p:Velocity> := <n> => SetProperty ( _HMG_THISFORMNAME, <"c"> , "Velocity" , <n> ) #xtranslate This . <c> . <p:Caption,Header,Image,Item,Icon,ToolTip,Width,ColumnWidth,Enabled,RichValue,CheckboxItem> (<arg>) := <n> => SetProperty ( _HMG_THISFORMNAME, <"c"> , <"p"> , <arg> , <n> ) #xtranslate This . <c> . <p:Cell> (<arg1> , <arg2>) => GetProperty ( _HMG_THISFORMNAME, <"c"> , <"p"> , <arg1> , <arg2> ) #xtranslate This . <c> . <p:Cell> (<arg1> , <arg2>) := <n> => SetProperty ( _HMG_THISFORMNAME, <"c"> , <"p"> , <arg1> , <arg2> , <n> ) #xtranslate This . <c> . <p:HeaderImage> (<arg1>) := <arg2> => SetProperty ( _HMG_THISFORMNAME, <"c"> , <"p"> , <arg1> , <arg2> ) #xtranslate This . <c> . <p:HeaderImage> (<arg1>) := {<arg2> , <arg3>} => SetProperty ( _HMG_THISFORMNAME, <"c"> , <"p"> , <arg1> , <arg2> , <arg3> ) #xtranslate This . <c> . <p:EnableUpdate,DisableUpdate,Refresh,SetFocus,DeleteAllItems,Release,Show,Save,Hide,Play,Stop,Close,Pause,Eject,OpenDialog,Resume,Action,OnClick,OnGotFocus,OnLostFocus,OnChange,OnDblClick,ColumnsAutoFit,ColumnsAutoFitH> \[()\] => Domethod ( _HMG_THISFORMNAME, <"c"> , <"p"> ) #xtranslate This . <c> . <p:AddItem,DeleteItem,Open,DeletePage,DeleteColumn,Expand,Collapse,Seek,ColumnAutoFit,ColumnAutoFitH> (<a>) => Domethod ( _HMG_THISFORMNAME, <"c"> , <"p"> , <a> ) #xtranslate This . <c> . <p:AddItem,AddPage> (<a1> , <a2>) => Domethod ( _HMG_THISFORMNAME, <"c"> , <"p"> , <a1> , <a2> ) #xtranslate This . <c> . <p:AddItem,AddPage> (<a1> , <a2> , <a3> ) => Domethod ( _HMG_THISFORMNAME, <"c"> , <"p"> , <a1> , <a2> , <a3> ) #xtranslate This . <c> . <p:AddItem,AddColumn,AddControl,AddPage> (<a1> , <a2> , <a3> , <a4> ) => Domethod ( _HMG_THISFORMNAME, <"c"> , <"p"> , <a1> , <a2> , <a3> , <a4> ) #xtranslate This . <c> . <p:ReadOnly,DisableEdit,Length> => GetProperty ( _HMG_THISFORMNAME, <"c"> , <"p"> ) #xtranslate This . <c> . <p:ReadOnly,DisableEdit,Speed,Volume,Zoom,Action,OnClick,OnGotFocus,OnLostFocus,OnChange,OnDblClick> := <n> => SetProperty ( _HMG_THISFORMNAME, <"c"> , <"p"> , <n> ) #xtranslate This . <x> . <c> . <p:Caption,Enabled,Value> => GetProperty ( _HMG_THISFORMNAME , <"x"> , <"c"> , <"p"> ) #xtranslate This . <x> . <c> . <p:Caption,Enabled,Value> := <n> => SetProperty ( _HMG_THISFORMNAME , <"x"> , <"c"> , <"p"> , <n> ) #xtranslate This . <x> (<k>) . <c> . <p:Value,Name,Address,BackColor,FontColor,Picture,ToolTip,FontName,FontSize,FontBold,FontItalic,FontUnderline,FontStrikeOut,Caption,Row,DisplayValue,Col,Width,Height,Visible,Enabled,Checked,ItemCount,RangeMin,RangeMax,Cargo> => GetProperty ( _HMG_THISFORMNAME, <"x"> , <k> , <"c"> , <"p"> ) #xtranslate This . <x> (<k>) . <c> . <p:Value,Name,Address,BackColor,FontColor,Picture,ToolTip,FontName,FontSize,FontBold,FontItalic,FontUnderline,FontStrikeOut,Caption,Row,DisplayValue,Col,Width,Height,Visible,Enabled,Checked,ItemCount,RangeMin,RangeMax,Cargo> := <n> => SetProperty ( _HMG_THISFORMNAME , <"x"> , <k> , <"c"> , <"p"> , <n> ) #xtranslate This . <x> (<k>) . <c> . <p:ListWidth,Position,CaretPos,ForeColor,RichValue> => GetProperty ( _HMG_THISFORMNAME, <"x"> , <k> , <"c"> , <"p"> ) #xtranslate This . <x> (<k>) . <c> . <p:ListWidth,Position,CaretPos,ForeColor,RichValue> := <n> => SetProperty ( _HMG_THISFORMNAME , <"x"> , <k> , <"c"> , <"p"> , <n> ) #xtranslate This . <x> (<k>) . <c> . <p:Caption,Header,Item,Icon,RichValue,CheckboxItem> (<arg>) => GetProperty ( _HMG_THISFORMNAME, <"x"> , <k> , <"c"> , <"p"> , <arg> ) #xtranslate This . <x> (<k>) . <c> . <p:Caption,Header,Item,Icon,RichValue,CheckboxItem> (<arg>) := <n> => SetProperty ( _HMG_THISFORMNAME, <"x"> , <k> , <"c"> , <"p"> , <arg> , <n> ) #xtranslate This . <x> (<k>) . <c> . <p:Refresh,SetFocus,DeleteAllItems,Release,Show,Save,Hide,Play,Stop,Close,Pause,Eject,OpenDialog,Resume,Action,OnClick,OnGotFocus,OnLostFocus,OnChange,OnDblClick> \[()\] => Domethod ( _HMG_THISFORMNAME, <"x"> , <k> , <"c"> , <"p"> ) #xtranslate This . <x> (<k>) . <c> . <p:AddItem,DeleteItem,Open,DeletePage,DeleteColumn,Expand,Collapse,Seek> (<a>) => Domethod ( _HMG_THISFORMNAME, <"x"> , <k> , <"c"> , <"p"> , <a> ) #xtranslate This . <x> (<k>) . <c> . <p:AddItem,AddPage> (<a1> , <a2>) => Domethod ( _HMG_THISFORMNAME, <"x"> , <k> , <"c"> , <"p"> , <a1> , <a2> ) #xtranslate This . <x> (<k>) . <c> . <p:AddItem,AddPage> (<a1> , <a2> , <a3> ) => Domethod ( _HMG_THISFORMNAME, <"x"> , <k> , <"c"> , <"p"> , <a1> , <a2> , <a3> ) #xtranslate This . <x> (<k>) . <c> . <p:AddItem,AddColumn,AddControl,AddPage> (<a1> , <a2> , <a3> , <a4> ) => Domethod ( _HMG_THISFORMNAME, <"x"> , <k> , <"c"> , <"p"> , <a1> , <a2> , <a3> , <a4> ) #xtranslate This . <x> (<k>) . <c> . <p:Length> => GetProperty ( _HMG_THISFORMNAME, <"x"> , <k> , <"c"> , <"p"> ) #xtranslate This . <x> (<k>) . <c> . <p:ReadOnly,DisableEdit,Speed,Volume,Zoom> := <n> => SetProperty ( _HMG_THISFORMNAME, <"x"> , <k> , <"c"> , <"p"> , <n> ) #xtranslate This . <x> (<k>) . <c> . <p:Cell> (<arg1> , <arg2>) => GetProperty ( _HMG_THISFORMNAME, <"x"> , <k> , <"c"> , <"p"> , <arg1> , <arg2> ) #xtranslate This . <x> (<k>) . <c> . <p:Cell> (<arg1> , <arg2>) := <n> => SetProperty ( _HMG_THISFORMNAME, <"x"> , <k> , <"c"> , <"p"> , <arg1> , <arg2> , <n> ) #xtranslate This . SplitBox . <c> . <p:Value,Name,Address,BackColor,FontColor,Picture,ToolTip,FontName,FontSize,FontBold,FontItalic,FontUnderline,FontStrikeOut,Caption,Row,DisplayValue,Col,Width,Height,Visible,Enabled,Checked,ItemCount,RangeMin,RangeMax,Position,CaretPos,ForeColor,AllowEdit,Object,InputItems,DisplayItems,Cargo> => GetProperty ( _HMG_THISFORMNAME, "SplitBox" , <"c"> , <"p"> ) #xtranslate This . SplitBox . <c> . <p:Value,Name,Address,BackColor,FontColor,Picture,ToolTip,FontName,FontSize,FontBold,FontItalic,FontUnderline,FontStrikeOut,Caption,Row,DisplayValue,Col,Width,Height,Visible,Enabled,Checked,ItemCount,RangeMin,RangeMax,Position,CaretPos,ForeColor,AllowEdit,Blink,InputItems,DisplayItems,Cargo> := <n> => SetProperty ( _HMG_THISFORMNAME, "SplitBox" , <"c"> , <"p"> , <n> ) #xtranslate This . SplitBox . <c> . <p:AllowAppend,AllowDelete,DisableEdit,ReadOnly> => GetProperty ( _HMG_THISFORMNAME, "SplitBox", <"c"> , <"p"> ) #xtranslate This . SplitBox . <c> . <p:AllowAppend,AllowDelete,DisableEdit,ReadOnly> := <n> => SetProperty ( _HMG_THISFORMNAME, "SplitBox", <"c"> , <"p"> , <n> ) #xtranslate This . SplitBox . <c> . <p:Caption,Header,Item,Icon,HeaderImages,CheckboxItem> (<arg>) => GetProperty ( _HMG_THISFORMNAME, "SplitBox", <"c"> , <"p"> , <arg> ) #xtranslate This . SplitBox . <c> . <p:Caption,Header,Item,Icon,HeaderImages,CheckboxItem> (<arg>) := <n> => SetProperty ( _HMG_THISFORMNAME, "SplitBox", <"c"> , <"p"> , <arg> , <n> ) #xtranslate This . SplitBox . <c> . <p:Cell> (<arg1> , <arg2>) => GetProperty ( _HMG_THISFORMNAME, "SplitBox", <"c"> , <"p"> , <arg1> , <arg2> ) #xtranslate This . SplitBox . <c> . <p:Cell> (<arg1> , <arg2>) := <n> => SetProperty ( _HMG_THISFORMNAME, "SplitBox", <"c"> , <"p"> , <arg1> , <arg2> , <n> ) #xtranslate This . SplitBox . <c> . <p:Refresh,SetFocus,DeleteAllItems,Release,Show,Save,Hide,Play,Stop,Close,Pause,Eject,OpenDialog,Resume,Action,OnClick,OnGotFocus,OnLostFocus,OnChange,OnDblClick> \[()\] => Domethod ( _HMG_THISFORMNAME, "SplitBox", <"c"> , <"p"> ) #xtranslate This . SplitBox . <c> . <p:AddItem,DeleteItem,Open,DeletePage,DeleteColumn,Expand,Collapse,Seek> (<a>) => Domethod ( _HMG_THISFORMNAME, "SplitBox", <"c"> , <"p"> , <a> ) #xtranslate This . SplitBox . <c> . <p:AddItem,AddPage> (<a1> , <a2>) => Domethod ( _HMG_THISFORMNAME, "SplitBox", <"c"> , <"p"> , <a1> , <a2> ) #xtranslate This . SplitBox . <c> . <p:AddItem,AddPage> (<a1> , <a2> , <a3> ) => Domethod ( _HMG_THISFORMNAME, "SplitBox", <"c"> , <"p"> , <a1> , <a2> , <a3> ) #xtranslate This . SplitBox . <c> . <p:AddItem,AddColumn,AddControl,AddPage> (<a1> , <a2> , <a3> , <a4> ) => Domethod ( _HMG_THISFORMNAME, "SplitBox", <"c"> , <"p"> , <a1> , <a2> , <a3> , <a4> ) #xtranslate This . SplitBox . <c> . <p:Name,Length> => GetProperty ( _HMG_THISFORMNAME, "SplitBox", <"c"> , <"p"> ) #xtranslate This . SplitBox . <c> . <p:ReadOnly,DisableEdit,Speed,Volume,Zoom> := <n> => SetProperty ( _HMG_THISFORMNAME, "SplitBox", <"c"> , <"p"> , <n> ) #xtranslate This . SplitBox . <x> . <c> . <p:Caption,Enabled,Value> => GetProperty ( _HMG_THISFORMNAME , "SplitBox" , <"x"> , <"c"> , <"p"> ) #xtranslate This . SplitBox . <x> . <c> . <p:Caption,Enabled,Value> := <n> => SetProperty ( _HMG_THISFORMNAME , "SplitBox", <"x"> , <"c"> , <"p"> , <n> ) // EVENT PROCEDURES ... [/pre2] Для команд выделенных цветом использовал доп. функции ( назвал так, что бы не пересечься с похожими ) [pre2] FUNCTION GetCliWidth ( nHandle ) LOCAL aRect := {0,0,0,0} GetClientRect( nHandle, aRect ) RETURN ( aRect[3] - aRect[1] ) FUNCTION GetCliHeight( nHandle ) LOCAL aRect := {0,0,0,0} GetClientRect( nHandle, aRect ) RETURN ( aRect[4] - aRect[2] ) [/pre2] Если ф-ии лишнии, то надо убрать выделенные цветом команды. Использовать как обычно This.Width , This.Height , This.Handle , This.Index This.Btn.Width, This.Btn.Height, This.Btn.Handle , This.Btn.Index This.ClientWidth, This.ClientHeight This.Btn.ClientWidth, This.Btn.ClientHeight Все варианты написания не проверял (может совместными усилиями ?)

gfilatov2002: SergKis пишет: Для команд выделенных цветом использовал доп. функции Благодарю за дополнение команды This P.S. Заменил доп. функции на одну уже существующую в коде библиотеки функцию _GetClientRect()

SergKis: gfilatov2002 Еще к командам ООП [pre2] i_window.ch ======== ... #ifdef _SOOP_CONTAINERS_ ... #xcommand DECLARE WINDOW <w> ; =>; #xtranslate <w> . \<p:Handle\> => GetFormHandle ( <"w"> ) ;; #xtranslate <w> . \<p:Index\> => GetFormIndex ( <"w"> ) ;; #xtranslate <w> . \<p:Name,Title,Height,Width,Col,Row,NotifyIcon,NotifyToolTip,FocusedControl,BackColor,MinHeight,MinWidth,MaxHeight,MaxWidth,TitleBar,SysMenu,Sizable,MaxButton,MinButton,Topmost,HelpButton\> => GetProperty ( <"w">, \<"p"\> ) ;; ... #xtranslate <w> . \<p:SaveAs\> (\<a\>) => DoMethod ( <"w"> , "SaveAs", \<a\> ) ;; #xtranslate <w> . \<p:ClientHeight\> => GetCliHeight( GetFormHandle ( <"w"> ) ) ;; #xtranslate <w> . \<p:ClientWidth\> => GetCliWidth ( GetFormHandle ( <"w"> ) ) ;; #xtranslate <w> . \<c\> . \<p:SaveAs\> (\<a\>) => DoMethod ( <"w"> , \<"c"\> , "SaveAs", \<a\> ) ;; #xtranslate <w> . \<c\> . \<p:Handle\> => GetControlHandle ( \<"c"\> , <"w"> ) ;; #xtranslate <w> . \<c\> . \<p:Index\> => GetControlIndex ( \<"c"\> , <"w"> ) ;; #xtranslate <w> . \<c\> . \<p:ClientHeight\> => GetCliHeight( GetControlHandle ( \<"c"\> , <"w"> ) ) ;; #xtranslate <w> . \<c\> . \<p:ClientWidth\> => GetCliWidth ( GetControlHandle ( \<"c"\> , <"w"> ) ) ;; #xtranslate <w> . \<c\> . \<p:Value,Name,Address,BackColor,FontColor,Picture,Icon,ToolTip,FontName,FontSize,FontBold,FontUnderline,FontItalic,FontStrikeOut,Caption,Row,DisplayValue,Col,Width,Height,Visible,Enabled,Checked,ItemCount,RangeMin,RangeMax,Cargo,Tabstop\> => GetProperty ( <"w">, \<"c"\> , \<"p"\> ) ;; ... #else #xcommand DECLARE WINDOW <w> ; =>; #xtranslate <w> . \<p:Handle\> => GetFormHandle ( <"w"> ) ;; #xtranslate <w> . \<p:Index\> => GetFormIndex ( <"w"> ) ;; #xtranslate <w> . \<p:Name,Title,Height,Width,Col,Row,NotifyIcon,NotifyToolTip,FocusedControl,BackColor,MinHeight,MinWidth,MaxHeight,MaxWidth,TitleBar,SysMenu,Sizable,MaxButton,MinButton,Topmost,HelpButton\> => GetProperty ( <"w">, \<"p"\> ) ;; ... #xtranslate <w> . \<p:SaveAs\> (\<a\>) => DoMethod ( <"w"> , "SaveAs", \<a\> ) ;; #xtranslate <w> . \<p:ClientHeight\> => GetCliHeight( GetFormHandle ( <"w"> ) ) ;; #xtranslate <w> . \<p:ClientWidth\> => GetCliWidth ( GetFormHandle ( <"w"> ) ) ;; #xtranslate <w> . \<c\> . \<p:SaveAs\> (\<a\>) => DoMethod ( <"w"> , \<"c"\> , "SaveAs", \<a\> ) ;; #xtranslate <w> . \<c\> . \<p:Handle\> => GetControlHandle ( \<"c"\> , <"w"> ) ;; #xtranslate <w> . \<c\> . \<p:Index\> => GetControlIndex ( \<"c"\> , <"w"> ) ;; #xtranslate <w> . \<c\> . \<p:ClientHeight\> => GetCliHeight( GetControlHandle ( \<"c"\> , <"w"> ) ) ;; #xtranslate <w> . \<c\> . \<p:ClientWidth\> => GetCliWidth ( GetControlHandle ( \<"c"\> , <"w"> ) ) ;; #xtranslate <w> . \<c\> . \<p:Value,Name,Address,BackColor,FontColor,Picture,Icon,ToolTip,FontName,FontSize,FontBold,FontUnderline,FontItalic,FontStrikeOut,Caption,Row,DisplayValue,Col,Width,Height,Visible,Enabled,Checked,ItemCount,RangeMin,RangeMax,Cargo,Tabstop\> => GetProperty ( <"w">, \<"c"\> , \<"p"\> ) ;; ... #endif ... i_pseudofunc.ch ========== ... #translate Application.Height := <arg> => MoveWindow ( Application.Handle , Application.Col , Application.Row , Application.Width , <arg> , .t. ) #translate Application.ClientWidth => GetCliWidth ( Application.Handle ) #translate Application.ClientHeight => GetCliHeight( Application.Handle ) #translate Application.Title => GetWindowText ( Application.Handle ) ... Лень все время писать Application..... сделал себе вариант App.... #translate App.ExeName => GetExeFileName() #translate App.Handle => _HMG_MainHandle #translate App.FormName => _HMG_aFormNames \[ _HMG_MainIndex \] #translate App.Col => GetWindowCol ( App.Handle ) #translate App.Col := <arg> => MoveWindow ( App.Handle , <arg> , App.Row , App.Width , App.Height , .t. ) #translate App.Row => GetWindowRow ( App.Handle ) #translate App.Row := <arg> => MoveWindow ( App.Handle , App.Col , <arg> , App.Width , App.Height , .t. ) #translate App.Width => GetWindowWidth ( App.Handle ) #translate App.Width := <arg> => MoveWindow ( App.Handle , App.Col , App.Row , <arg> , App.Height , .t. ) #translate App.ClientWidth => GetCliWidth ( App.Handle ) #translate App.ClientHeight => GetCliHeight ( App.Handle ) #translate App.Height => GetWindowHeight ( App.Handle ) #translate App.Height := <arg> => MoveWindow ( App.Handle , App.Col , App.Row , App.Width , <arg> , .t. ) #translate App.Title => GetWindowText ( App.Handle ) #translate App.Title := <arg> => SetWindowText ( App.Handle, <arg> ) #translate App.Cursor := <arg> => SetWindowCursor ( App.Handle, <arg> ) #translate App.BackColor => _HMG_aFormBkColor \[ _HMG_MainIndex \] #translate App.BackColor := <arg> => _SetWindowBackColor ( App.Handle, <arg> ) #translate App.Topmost => GetProperty ( App.FormName, 'Topmost' ) #translate App.Topmost := <arg> => _ChangeWindowTopmostStyle ( App.Handle, <arg> ) #translate App.HelpButton => GetProperty ( App.FormName, 'HelpButton' ) #translate App.HelpButton := <arg> => _ChangeWindowHelpButtonStyle ( App.FormName, <arg> ) ... [/pre2]

Andrey: SergKis пишет: Использовать как обычно This.Width , This.Height , This.Handle , This.Index Т.е. вместо nFWidth := GetClientWidth( GetFormHandle( _HMG_ThisFormName ) ) nFHeight := GetClientHeight( GetFormHandle( _HMG_ThisFormName ) ) можно будет писать так: nFWidth := This.Width nFHeight := This.Height

Dima: Andrey пишет: This.Width This.ClientWidth

gfilatov2002: SergKis пишет: Еще к командам ООП Благодарю Добавил эти модификации также...

SergKis: Andrey пишет можно будет писать так: nFWidth := This.Width nFHeight := This.Height пример использования [pre2] DEFINE WINDOW wndCalc AT 0,0 ; ... nWidth := This.ClientWidth - x * 2 ... @ y, x LABEL Itog VALUE "" ; ... y += This.Itog.Height + n ... For i := 1 To len(a) If ! empty(a[ i ]) j := "Btn"+a[ i ][1] DEFINE BUTTONEX &j ... ACTION PostMsg() END BUTTONEX This.&(j).Cargo := a[ i ][2] EndIf ... nW := This.ClientWidth - int(n * 0.6) nH := y DRAW RECTANGLE IN WINDOW &( This.Name ) AT nY, nX TO nH, nW ; PENCOLOR BLUE END WINDOW ... STATIC FUNCTION PostMsg( nKey, lFocus ) LOCAL c, j := This.Name Default lFocus := .T. If j != ThisWindow.Name // это контрол не окно c := This.&(j).Cargo If c == "." ; nKey := 190 Elseif c == "C" ; nKey := 32 ElseIf c $ "0123456789"; nKey := 48 + val(c) EndIf EndIf If ! empty(nKey) PostMessage( ThisWindow.Handle, WM_KEYDOWN, nKey, 0) EndIf If lFocus This.Itog.SetFocus EndIf RETURN Nil [/pre2]

SergKis: gfilatov2002 Еще немного ООП строк [pre2] i_this.ch ========= ... // WINDOWS (THISWINDOW) #xtranslate ThisWindow . <p:Type> => GetWindowType ( _HMG_THISFORMNAME ) #xtranslate ThisWindow . <p:Handle> => GetFormHandle ( _HMG_THISFORMNAME ) ... // COMMON ( REQUIRES TYPE CHECK ) ... #xtranslate This . <p:Type> => iif ( _HMG_THISType == 'C' , GetControlType ( _HMG_THISCONTROLNAME , _HMG_THISFORMNAME ) , GetWindowType ( _HMG_THISFORMNAME ) ) #xtranslate This . <p:Handle> => iif ( _HMG_THISType == 'C' , GetControlHandle ( _HMG_THISCONTROLNAME , _HMG_THISFORMNAME ) , GetFormHandle ( _HMG_THISFORMNAME ) ) ... #xtranslate This . <c> . <p:Type> => GetControlType ( _HMG_THISCONTROLNAME , _HMG_THISFORMNAME ) #xtranslate This . <c> . <p:Handle> => GetControlHandle ( <"c"> , _HMG_THISFORMNAME ) ... i_window.ch =========== #ifdef _SOOP_CONTAINERS_ ... #xcommand DECLARE WINDOW <w> ; =>; #xtranslate <w> . \<p:Type\> => GetWindowType ( <"w"> ) ;; #xtranslate <w> . \<p:Handle\> => GetFormHandle ( <"w"> ) ;; ... #xtranslate <w> . \<c\> . \<p:Type\> => GetControlType ( \<"c"\> , <"w"> ) ;; #xtranslate <w> . \<c\> . \<p:Handle\> => GetControlHandle ( \<"c"\> , <"w"> ) ;; ... #else #xcommand DECLARE WINDOW <w> ; =>; #xtranslate <w> . \<p:Type\> => GetWindowType ( <"w"> ) ;; #xtranslate <w> . \<p:Handle\> => GetFormHandle ( <"w"> ) ;; ... #xtranslate <w> . \<c\> . \<p:Type\> => GetControlType ( \<"c"\> , <"w"> ) ;; #xtranslate <w> . \<c\> . \<p:Handle\> => GetControlHandle ( \<"c"\> , <"w"> ) ;; ... #endif ... i_pseudofunc.ch =============== ... //////////////////////////////////////////// // System pseudo-commands //////////////////////////////////////////// #translate Desktop.Col => GetDesktopRealLeft() #translate Desktop.Row => GetDesktopRealTop() #translate Desktop.Width => GetDesktopRealWidth() #translate Desktop.Height => GetDesktopRealHeight() #translate System.Clipboard => RetrieveTextFromClipboard() ... [/pre2]

gfilatov2002: SergKis пишет: #xtranslate This . <p:Type> Благодарю за дополнение - добавил SergKis пишет: #translate Desktop.Col => GetDesktopRealLeft() #translate Desktop.Row => GetDesktopRealTop() #translate Desktop.Width => GetDesktopRealWidth() #translate Desktop.Height => GetDesktopRealHeight() Не стал добавлять, поскольку эти функции не входят в библиотеку (они взяты из примеров). Кстати, завершена подготовка очередной сборки 16.08, которая выйдет на следующей неделе. Список изменений см. ниже [pre2] * Fixed: Missing NOBORDER clause handling in a GetBox control at the alternative syntax. Problem was reported by Dusko Radojcin. Contributed by Grigory Filatov <gfilatov@inbox.ru> * Changed: ANIMATERES User Component was moved from the samples to MiniGUI core. This control opens and displays continuously an AVI clip from a resource in a specified module. Note: You can only use silent AVI clips. Syntax: @ <row>,<col> ANIMATERES <name> [ OF <parent> ] ; [ WIDTH <nWidth> ] [ HEIGHT <nHeight> ] ; FILE <DLL or EXE filename> ID <resource> [ TOOLTIP <tooltip> ] Contributed by Grigory Filatov <gfilatov@inbox.ru> (see demo in folder \samples\Advanced\AVI_Animation) * Changed: The ON CANCEL action in the ComboBox control will fire only if a last pressed key was <Escape> key. It indicates the user's initial selection is to be ignored. Contributed by Grigory Filatov <gfilatov@inbox.ru> * Enhanced: Added the readonly 'Index', 'Type', 'ClientWidth' and 'ClientHeight' properties to 'This' object reference. Common syntax: Control_idx := This.Index, Form_idx := This.Index etc. Windows only syntax: Form_idx := ThisWindow.Index Based upon a contribution of Russian user SergKis (see demo in folder \samples\Basic\GetClientSize) * Enhanced: Added a shorten form 'App' for the 'Application' object. Examples: App.ExeName, App.Handle, App.FormName etc. Suggested by SergKis. * Enhanced: The function PutFile() supports an optional 7-th parameter to control the overwriting if a file already exists. Syntax: PutFile( aFilter, title, cIniFolder, lNoChangeCurDir, cDefFileName,; /*@*/ nFilterIndex, lPromptOverwrite ) If <lPromptOverwrite> set to .T. (default is .F.) and a file already exists, user will be asked to overwrite it or not. Contributed by Pete Dionysopoulos <pete_westg@yahoo.gr> (see demo2.prg in folder \samples\Basic\PutFile) * Updated: Synchronized Extended HMG for compatibility with Official HMG: * Added MiniPrint2 library with the following modifications: - Enhanced look and feel of Print Preview; - Enhanced quality of images of ThumbNails in printer preview; - Changed cursor behavior in Print Preview window: Zoom and Glass Cursor only into page to print. Adapted for Minigui Extended by Grigory Filatov <gfilatov@inbox.ru> (see source in folder \Source\MiniPrint2) (see demo in folder \samples\Advanced\MiniPrint2) * Updated: Header file i_hmgcompat.ch for compatibility with Official HMG: - added the following commands: SET CONTROL <ControlName> OF <FormName> ; CLIENTEDGE | STATICEDGE | WINDOWEDGE | NOTEDGE Contributed by Grigory Filatov <gfilatov@inbox.ru> * Updated: C-code cleaning for correct compiling with the Embarcadero BCC 10.1: - added missing casting for C++ mode into the MiniGUI core, CallDll, HbPrinter and MiniPrint libraries. Contributed by Grigory Filatov <gfilatov@inbox.ru> * Updated: Adaptation FiveWin Class TSBrowse 9.0 in HMG: - fixed a tooltip handle assigning error at Windows Server 2008. Problem was reported by Dusko Radojcin. - fixed a wrong workaround (introduced in the build 16.07). Bug was reported by Jaroslaw Kadziola <kadziola@tlen.pl> * Updated: HbSQLite3 library: - update for using SQLITE3 version 3.14.0dev. Contributed by Grigory Filatov <gfilatov@inbox.ru> * Updated: Harbour Compiler 3.2.0dev (SVN 2016-07-18 20:32). Contributed by Grigory Filatov <gfilatov@inbox.ru> (look at ReadMe.txt in folder \harbour) * New: 'DO REPORT command with a simple formatting' sample. Contributed by Grigory Filatov <gfilatov@inbox.ru> (see demo2.prg in folder \samples\Basic\DO_REPORT) * New: 'ActiveX Report Generator' sample. Based upon a freeware CatchysoftReport.Dll from the following URL: http://www.catchysoft.com/report_generator.html. Contributed by Grigory Filatov <gfilatov@inbox.ru> (see in folder \samples\Advanced\ActiveX_Report) * New: 'Run the executable file from an application resource' console sample. Based upon a contribution at Harbour developer forum. (see in folder \samples\Advanced\RCDataToFile) * Updated: 'HMG Cursor' sample: - added the function PutMouse(). Contributed by Pierpaolo Martinello <pier.martinello[at]alice.it> (see in folder \samples\Basic\CURSOR) * Updated: 'TSBrowse Incremental Seek With Footer's GetBox' sample: - fixed using of "hole" detection. Problem was reported by russian user. Contributed by Grigory Filatov <gfilatov@inbox.ru> (see in folder \samples\Advanced\Tsb_seek_2) [/pre2] И напоследок - небольшой запрос Требуется помощь в портировании winapi-функции TaskDialogIndirect в среду Харбор/Минигуи. Петр, возьметесь

Петр: gfilatov2002 пишет: Требуется помощь в портировании winapi-функции TaskDialogIndirect в среду Харбор/Минигуи. Петр, возьметесь Вечером посмотрю, чем могу помочь

gfilatov2002: Петр пишет: посмотрю, чем могу помочь Заранее благодарен В принципе, вызов этой функции на Си выглядит несложно: [pre]HRESULT hr; TASKDIALOGCONFIG tdc = { sizeof(TASKDIALOGCONFIG) }; int nClickedBtn; BOOL bCheckboxChecked; TASKDIALOG_BUTTON aCustomButtons[] = { { 1000, MAKEINTRESOURCE(IDS_DOWNLOAD_BTN_TEXT) }, { 1001, MAKEINTRESOURCE(IDS_DONT_DOWNLOAD_BTN_TEXT) } }; tdc.hwndParent = m_hWnd; tdc.hInstance = _AtlBaseModule.GetResourceInstance(); tdc.dwFlags = TDF_USE_COMMAND_LINKS|TDF_ENABLE_HYPERLINKS; tdc.pButtons = aCustomButtons; tdc.cButtons = _countof(aCustomButtons); tdc.pszWindowTitle = MAKEINTRESOURCE(IDS_TASKDLG_TITLE); tdc.pszMainIcon = MAKEINTRESOURCE(IDI_MY_TD_ICON); tdc.pszMainInstruction = MAKEINTRESOURCE(IDS_TASKDLG_HEADER); tdc.nDefaultButton = 1001; tdc.pszExpandedInformation = MAKEINTRESOURCE(IDS_TASKDLG_EXTRA_INFO); tdc.pszVerificationText = MAKEINTRESOURCE(IDS_TASKDLG_CHKBOX_TEXT); tdc.pszFooter = MAKEINTRESOURCE(IDS_TASKDLG_FOOTER); tdc.pszFooterIcon = TD_INFORMATION_ICON; tdc.pfCallback = TDCallback; tdc.lpCallbackData = (LONG_PTR) this; // not used, but I'm setting this for demonstration purposes hr = TaskDialogIndirect ( &tdc, &nClickedBtn, NULL, &bCheckboxChecked ); [/pre] Вопрос в том, как это оформить для удобного использования в Харборе (с учетом вызова Callback-функции и использования ресурсных строк)

Петр: gfilatov2002 пишет: Вопрос в том, как это оформить для удобного использования в Харборе (с учетом вызова Callback-функции и использования ресурсных строк) Вот так пойдет? TaskDialogIndirect( aConfig, @nButton, @nRadioButton, @lVerificationFlagChecked ) Шаблон демо [pre2]#include "tdi.ch" PROCEDURE TDI_Demo() LOCAL aConfig, nButton, nRadioButton, lVerificationFlagChecked := .f. LOCAL nResult aConfig := Array( TDC_CONFIG ) /* 2. TDC_HWND - handle to the parent window. This member can be NIL. */ aConfig[TDC_HWND] := ThisWindow.Handle /* 3. TDC_HINSTANCE - handle to the module that contains the icon resource identified by the pszMainIcon or pszFooterIcon members, and the string resources identified by the pszWindowTitle, pszMainInstruction, pszContent, pszVerificationText, pszExpandedInformation, pszExpandedControlText, pszCollapsedControlText or pszFooter members. */ aConfig[TDC_HINSTANCE] := GetInstance() /* 4. TDC_TASKDIALOG_FLAGS - Specifies the behavior of the task dialog. This parameter can be a combination of flags. */ aConfig[TDC_TASKDIALOG_FLAGS] := hb_bitOr( TDF_USE_COMMAND_LINKS, TDF_ENABLE_HYPERLINKS ) /* 6. TDC_WINDOWTITLE - the string to be used for the task dialog title. This parameter can be either a string or an integer resource identifier passed to the MAKEINTRESOURCE macro. If this parameter is NIL, the filename of the executable program is used */ aConfig[TDC_WINDOWTITLE] := "Window Title" /* 8. TDC_MAININSTRUCTION - the string to be used for the main instruction. This parameter can be either a string or an integer resource identifier passed to the MAKEINTRESOURCE macro */ aConfig[TDC_MAININSTRUCTION] := "Main Instruction" /* 9. TDC_CONTENT - the string to be used for the dialog's primary content. This parameter can be either a string or an integer resource identifier passed to the MAKEINTRESOURCE macro. If the ENABLE_HYPERLINKS flag is specified for the TDC_DWFLAGS, then this string may contain hyperlinks in the form: <A HREF="executablestring">Hyperlink Text</A>. */ aConfig[TDC_CONTENT] := "Content" /* 16. TDC_VERIFICATIONTEXT - the string to be used to label the verification checkbox. This parameter can be either a string or an integer resource identifier passed to the MAKEINTRESOURCE macro. If this parameter is NIL, the verification checkbox is not displayed in the task dialog. If the lVerificationFlagChecked parameter of TaskDialogIndirect is NIL, the checkbox is not enabled. */ aConfig[TDC_VERIFICATIONTEXT] := "Verification Text" /* 17. TDC_EXPANDEDINFORMATION - the string to be used for displaying additional information. This parameter can be either a string or an integer resource identifier passed to the MAKEINTRESOURCE macro. The additional information is displayed either immediately below the content or below the footer text depending on whether the TDF_EXPAND_FOOTER_AREA flag is specified. If the TDF_ENABLE_HYPERLINKS flag is specified for the TDC_DWFLAGS, then this string may contain hyperlinks in the form: <A HREF="executablestring">Hyperlink Text</A>. */ aConfig[TDC_EXPANDEDINFORMATION] := "Expanded Information" /* 18. TDC_EXPANDEDCONTROLTEXT - the string to be used to label the button for collapsing the expandable information. This parameter can be either a string or an integer resource identifier passed to the MAKEINTRESOURCE macro. This member is ignored when the TDC_EXPANDEDINFORMATION member is NIL. If this member is NIL and the TDC_COLLAPSEDCONTROLTEXT is specified, then the TDC_COLLAPSEDCONTROLTEXT value will be used for this member as well. */ aConfig[TDC_EXPANDEDCONTROLTEXT] := "Expanded Control Text" /* 19. TDC_COLLAPSEDCONTROLTEXT - the string to be used to label the button for expanding the expandable information. This parameter can be either a string or an integer resource identifier passed to the MAKEINTRESOURCE macro. This member is ignored when the TDC_EXPANDEDINFORMATION member is NIL. ?? If this member is NIL and the TDC_COLLAPSEDCONTROLTEXT is specified, then the TDC_COLLAPSEDCONTROLTEXT value will be used for this member as well. ?? */ aConfig[TDC_COLLAPSEDCONTROLTEXT] := "Collapsed Control Text" /* 21. TDC_FOOTER - the string to be used in the footer area of the task dialog. This parameter can be either a string or an integer resource identifier passed to the MAKEINTRESOURCE macro. If the TDF_ENABLE_HYPERLINKS flag is specified for the TDC_DWFLAGS, then this string may contain hyperlinks in the form: <A HREF="executablestring">Hyperlink Text</A>. */ aConfig[TDC_FOOTER] := "Footer" /* 22. TDC_CALLBACK */ aConfig[TDC_CALLBACK] := {|h,n,w,l| callback( h,n,w,l )} /* 24. TDC_WIDTH - the width of the task dialog's client area, in dialog units. If 0, the task dialog manager will calculate the ideal width. */ aConfig[TDC_WIDTH] := 0 nResult := TaskDialogIndirect( aConfig, @nButton, @nRadioButton, @lVerificationFlagChecked ) /* TODO */ RETURN [/pre2]



полная версия страницы