Page 1 of 1

Dos cuestiones - Two questions

Posted: Fri Mar 12, 2010 9:06 pm
by JALMAG
Hola amigos, le voy cogiendo el gusto a HMG, es excelente las preguntas para los gurus que estais en este magnifico foro son:

- Como pongo un icono en un ejecutable, es decir, en la ventana principal ya los se poner, me refiero a los ejecutables.
- Como hago para poner en español que cuando le das a la cruz de cierre de la ventana, sale la pregunta en inglés.

Y una duda que me asalta, cual es la diferencia entre MINIGUI 1.7 Extended y HMG.

Muchas gracias amigos.


Translate English
Hello friends, I go him catching the pleasure to HMG, it is excellent the questions for the gurus that you are in this I magnify forum they are:

- As I put an icon in an executable one, that is to say, in the main window already them you to put, I refer to the executable ones.
- As I make to put in Spanish that when you give to the cross of closing of the window, it leaves the question in English.

And a doubt that assaults me which is the difference among MINIGUI 1.7 Extends and HMG.

Thank you friends.

Re: Dos cuestiones - Two questions

Posted: Sat Mar 13, 2010 10:09 am
by mustafa
Hola Jalmag
lo del icon ya te conteste mirate este post : http://hmgforum.com/viewtopic.php?f=5&t=1215
lo del idioma tienes que poner al principio del Prg. MAIN pones estoasi:

FUNCTION MAIN()

SET CENTURY ON
SET DATE FRENCH
SET ESCAPE ON
SET NAVIGATION EXTENDED
SET LANGUAGE TO SPANISH // <--------- aqui pones el lenguaje en nuestro caso español
SET DELETED ON
SET DATE FORMAT TO 'dd/mm/yyyy'

un saludo
MUSTAFA

Re: Dos cuestiones - Two questions

Posted: Sat Mar 13, 2010 5:28 pm
by gfilatov
JALMAG wrote: Hello friends,
...
And a doubt that assaults me which is the difference among MINIGUI 1.7 Extends and HMG.

Thank you friends.
Hello,

There is the following description in the MiniGUI Extended distribution as an answer:
--------------------------------------------------------------------------------
Harbour MiniGUI Extended Syntax Extensions

Harbour MiniGUI Extended is a fork up from Official HMG created March 2005. It aims to follow a more aggressive development path, and be more responsive to user's input.

As it stands at this point, HMG Extended offers Syntax extensions over Official HMG, including:
--------------------------------------------------------------------------------

BUTTONEX control - so-called OwnerDraw Buttons implementation with support for XP Style.
This button can use images (icons or bitmaps) and text together.

--------------------------------------------------------------------------------

BTNTEXTBOX control - extended TEXTBOX control with inserted button.

--------------------------------------------------------------------------------

COMBOBOXEX control - combobox which support of images for items

--------------------------------------------------------------------------------

GETBOX control - Windows implementation of Harbour`s GET Class

Syntax:
@ <nRow> ,<nCol> GETBOX <ControlName>
[ ID <nId> ]
[ OF | PARENT | DIALOG <ParentWindowName> ]
[ HEIGHT <nHeight> ]
[ WIDTH <nWidth> ]
[ FIELD <FieldName> ]
[ VALUE <nValue> ]
[ PICTURE <cPicture> ] //** format function and template string
[ VALID <valid> | RANGE <min>,<max>] // VALID - postvalidation function or codeblock which must return logical value
// RANGE - allowed range of values
[ VALIDMESSAGE <cValidMessage> ]
[ MESSAGE <cMessage> ] // text to display on STATUSBAR Item(1) when getbox have focus
[ WHEN <when> ] // prevalidation function or codeblock (if return .f. GetBox is readonly
[ READONLY ]
[ FONT <cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ PASSWORD ]
[ TOOLTIP <cToolTipText> ]
[ BACKCOLOR <aBackColor> ] // * or <aBackColor,aReadOnlyBackColor,aAciveBackColor>
[ FONTCOLOR <aFontColor> ] // * or <aFontColor,aReadOnlyFontColor,aActiveFontColor>
[ ON CHANGE <uChange> ] ;
[ ON GOTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ON LOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]
[ RIGHTALIGN ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ HELPID <nHelpId> ]


** GETBOX supported PICTURE Format Functions

Function Type Action
------------------------------------------------------------
A C Allows only alphabetic characters.
B N Displays numbers left-justified.
C N Displays CR after positive numbers.
D D,N Displays dates in SET DATE format.
K ALL Deletes default text if first key is not a cursor key.
X N Displays DB after negative numbers.
Z N Displays zero as blanks.
( N Displays negative numbers in parentheses with leading spaces.
) N Displays negative numbers in parentheses without leading spaces.
! C Converts alphabetic character to uppercase.

!>> unsupported Format Functions from Harbour Get class :
R C Nontemplate characters are inserted in the display
but not saved in the variable.
S<n> C Allows horizontal scrolling within a GET. <n> is
E D,N Displays dates with day and month inverted
independent of the current DATE SETting, numerics
with comma and period reverse (European style).
an integer that specifies the width of the region.


** GETBOX supported PICTURE Template Symbols
------------------------------------------------------------
Template Action
------------------------------------------------------------
A Allows only alphabetic characters
N Allows only alphabetic and numeric characters
X Allows any character
9 Allows digits for any data type including sign for numerics
# Allows digits, signs and spaces for C,N type
L Allows only T, F, Y or N
Y Allows only Y or N
! Converts an alphabetic character to uppercase
$ Displays a dollar sign in place of a leading space in a numeric
* Displays an asterisk in place of a leading space in a numeric
. Displays a decimal point
, Displays a comma


* FontColor and BackColor property can be defined as RGB array or array of RGBArrays
for Enable ,ReadOnly and Focused (active) stage.

* ReadOnly stage preserve defined FontColor and BackColor

* VALID and RANGE clauses are checked when control lost focus
User can not leave control if defined validation function (or codeblock) return false
or entered value is out of defined range. (These clauses can not be used together!)

* WHEN clause is checked when control become focus . If defined here function or codeblock
used as WHEN param return false, control status is changed to "noneditable".

--------------------------------------------------------------------------------

HOTKEYBOX control - standard control for hotkey's input.

--------------------------------------------------------------------------------

IMAGELIST control - support for resources from bitmap's list

- commands DEFINE IMAGELIST, DRAW IMAGELIST, RELEASE IMAGELIST
- commands ERASE IMAGE, BEGINDRAG IMAGE, ENTERDRAG IMAGE, ENDDRAG IMAGE, MOVE IMAGE

Look at folder Samples\Advanced\ImageList for sample.

--------------------------------------------------------------------------------

TIMEPICKER control - similar to DATEPICKER control (with UPDOWN clause) but return time in format [HH:mm:ss]

--------------------------------------------------------------------------------

TOOLBAREX control - toolbar with a clauses ROWS, TOOLBARSIZE, IMAGELIST, HOTIMAGELIST and MIXEDBUTTONS, support for CHEVRON menu

Look at folder Samples\Basic\ToolBarEx for samples.

--------------------------------------------------------------------------------

DEFINE DIALOG command - create a Dialog Box from resouces or without using resources:

- ID clause for Controls ANIMATEBOX, BROWSE, BUTTON, CHECKBOX, CHECKBUTTON, COMBOBOX, DATEPICKER,
EDITBOX, FRAME, GRID, IMAGE, LABEL, LISTBOX, MONTHCALENDAR, PROGRESSBAR, RADIOGROUP, SLIDER, TEXTBOX, TAB, TREE

- Command REDEFINE Controls for ANIMATEBOX, BROWSE, BUTTON, CHECKBOX, CHECKBUTTON, COMBOBOX, DATEPICKER,
EDITBOX, FRAME, GRID, IMAGE, LABEL, LISTBOX, MONTHCALENDAR, PROGRESSBAR, RADIOGROUP, SLIDER, TEXTBOX, TAB, TREE

--------------------------------------------------------------------------------

DEFINE FOLDER command. A Folder allows the user to define multiple pages for the same area of dialog box from resources and without using resources.

- Folder from Resources:
DEFINE FOLDER <FolderName>
[ OF| PARENT> < ParentWindowName > ]
RESOURCE <res>
[ CAPTION <cCaption> ]
- Folder created from memory:
DEFINE FOLDER < FolderName >
[ OF| PARENT> < ParentWindowName > ]
AT <nRow>,<nCol>
[ WIDTH < nWidth > ]
[ HEIGHT <nHeight> ]
[ CAPTION <cCaption> ]
- Folder Page (Dialog box) from resources:
FOLDERPAGE <FolderName> RESOURCE <id>
[ TITLE <cTitle> ]
[ IMAGE <cImageName> ]
- Folder Page (Dialog box) with Controls created in Memory:
DEFINE FOLDERPAGE < FolderName > [ RESOURCE <id> ]
[ TITLE <cTitle> ]
[IMAGE <cImageName> ]

... Control Definitions...

END FOLDERPAGE
END FOLDER

--------------------------------------------------------------------------------

New commands:

CLEAN MEMORY - deallocating computer's RAM at program start (for Win 2k/XP only)

DEFINE BKGBRUSH <brush> SOLID IN [ WINDOW ] <form> - similar to window Backcolor property
DEFINE BKGBRUSH <brush> HATCHED IN [ WINDOW ] <form>
DEFINE BKGBRUSH <brush> PATTERN IN [ WINDOW ] <form>

SET REGION OF <window> ROUNDRECT <nRect1>,<nRect2>,<nWidth>,<nHeight>
SET REGION OF <window> BITMAP <file | resource> TRANSPARENT COLOR <color> [ TO <region> ]

SET DEFAULT ICON TO <IconName> - the main icon could be used as default icon to all other windows
SET CENTERWINDOW RELATIVE PARENT | DESKTOP - the windows can be centered relative to the parent window

SET WINDOWPROPERTY <name> [ OF <form> ] VALUE <value> [ DIRECT ]
GET WINDOWPROPERTY <name> [ OF <form> ] VALUE <value> [ DIRECT ]
RELEASE WINDOWPROPERTY <name> [ OF <form> ] [ NOFREE ]

SET EVENTS FUNCTION TO <funcname> - define the user's events handling function

SET MENUSTYLE EXTENDED | STANDARD - define the OwnerDraw Menu style (similar to Delphi)
SET MENUCURSOR FULL | SHORT
SET MENUSEPARATOR [ SINGLE | DOUBLE ] [ LEFTALIGN | CENTERALIGN | RIGHTALIGN ]
SET MENUITEM BORDER 3D | FLAT

SET SHOWDETAILERROR ON | OFF - enable or disable showing the detail error message

SET LOGERROR ON | OFF - enable or disable logging errors to errorlog file
SET ERRORLOG TO <cFile> - set new errorlog file
SET ERRORLOG TO - reset errorlog file to default value

SET TOOLTIP ON | OFF - enable or disable control's tooltip
SET TOOLTIP MAXWIDTH TO <w> [ OF <form> ],
where
<w> is the max width of tooltip's string in pixels
SET TOOLTIP VISIBLETIME TO <v> OF <form>,
where
<v> is the visible time of tooltip in milliseconds (max value ~30000)

ADD TOOLTIPICON [ INFO | WARNING | ERROR ] WITH MESSAGE <message> OF <form>
CLEAR TOOLTIPICON OF <form>

DEFINE FONT <font> FONTNAME <name> ... [ANGLE <angle>][DEFAULT]
The new Font definition supports an Angle clause for font's rotation.

RELEASE FONT <font>
The defined fonts will be released automatically at program release (similar to Hotkeys).

DRAW TEXT IN WINDOW <form> - label which updated ON PAINT event
DRAW PANEL IN WINDOW <form> - draw box raised (panel)
DRAW BOX IN WINDOW <form> - draw box in
DRAW GRADIENT IN WINDOW <form> - draw gradient with using MsImg32.dll and Gdi32.dll

Individual context menu for controls (excluding Frame):
DEFINE CONTEXT MENU CONTROL <control> [ OF <parent> ]
DEFINE CONTEXT MENU CONTROLS <control1> [,<controln>] [ OF <parent> ]
SET CONTEXT MENU CONTROL <control> OF <parent> ON | OFF

--------------------------------------------------------------------------------

New methods and properties for standard controls:

WINDOW - properties 'Backcolor', 'Topmost', 'MinWidth', 'MaxWidth', 'MinHeight', 'MaxHeight' and events ON RESTORE, ON MOVE, ON DROPFILES and
NotifyIconDblClick, method SaveAs( cBmpFile ) for windows and controls.

Semi-oop 'Application' object. It will allow to read (and write when possible) various application MAIN window properties.

Read/write property 'Cargo' for all standard controls.

GRID, BROWSE, COMBOBOX, TREE - methods EnableUpdate and DisableUpdate.

GRID, BROWSE - property 'ImageHeader', property 'ColumnWidth(n)' and methods:
- ColumnAutoFit(n) - set width of column <n> to fit the column contents
- ColumnAutoFitH(n) - set width of column <n> to fit the columnheader text & column contents
- ColumnsAutoFit() - set widths of all columns to fit each column contents
- ColumnsAutoFitH() - set widths of all columns to fit each columnheader text & column contents

GRID - read/write property 'CheckboxItem'.

BUTTON, LABEL, TIMER - read/write property 'Action'.

CHECKBOX - THREESTATE and LEFTJUSTIFY clauses.

COMBOBOX - property 'ListWidth' for definition a width of dropdown list, properties 'BackColor' and 'FontColor', events ON LISTDISPLAY and ON LISTCLOSE.

DATEPICKER - property 'FormatString' and clause DATEFORMAT, BackColor, FontColor and others color clauses.

IMAGE - WHITEBACKGROUND clause.

LABEL - BLINK clause.

MONTHCALENDAR - BackColor, FontColor and others color clauses.

STATUSBAR item - read/write property 'Width'.

RADIOGROUP - LEFTJUSTIFY clause.

RICHEDIT - method Save, event ON SELECT, drag/drop/paste events, NOVSCROL, NOHSCROLL, FILE and FIELD clauses, 'RichValue' and 'AutoFont' properties.

SLIDER - ON SCROLL event.

TAB - property 'Backcolor'.

TREE - properties 'LineColor', 'Indent', 'ItemHeight', 'FontColor' and 'Backcolor'.

--------------------------------------------------------------------------------

New functions:

Functions _GetMenuItemCaption( ItemName , FormName ), _SetMenuItemCaption( ItemName , FormName , Caption ),
_SetMenuItemBitmap( ItemName , FormName , Bitmap ), _SetMenuItemFont( ItemName , FormName , Font )

Functions AddMRUItem(<NewItem>, "OnClickFunc(Item)"), AddMenuElement(<NewItem>, "OnClickFunc(Item)"),
SaveMRUFileList(), ClearMRUList()

Function MsgYesNoCancel()

Functions _ExtDisableControl ( ControlName, ParentForm ) and _ExtEnableControl ( ControlName , ParentForm )
Using these functions we can disable/enable control without changing any other properties (i.e FontColor, Backcolor and so on)

Function GetUserName() return a name for current user.

Function _GetShortPathName( cPath ) return a short path name for specified full path.

Function _GetCompactPath( cFile, nMax ),
where
cFile - string to be compacted (may be for example fullpath, path or file name)
nMax - required string size (characters count)

Function IsThemed() - for accurately detecting if an application is theme-enabled.

--------------------------------------------------------------------------------

MDI support:

commands DEFINE WINDOW <...> MAIN MDI and DEFINE WINDOW <...> MDICHILD

Commands for MDI CHILD Windows support:

FETCH ACTIVE MDICHILD TO <...>
CLOSE ACTIVE MDICHILD
TILE MDICHILDS HORIZONTAL
TILE MDICHILDS VERTICAL
CASCADE MDICHILDS
ARRANGE MDICHILD ICONS
RESTORE MDICHILDS ALL
CLOSE MDICHILDS ALL

Look at folders Samples\Basic\mdi and Samples\Basic\mdi_2 for samples.

--------------------------------------------------------------------------------

Windows Clipboard support:

CopyToClipboard(cText) - store cText in Windows clipboard
RetriveTextFromClipboard()->cText - retrieve text from Windows clipboard
CopyRtfToClipboard(cRtfText) - store cRTFText in Windows clipboard

--------------------------------------------------------------------------------

Optimizations

Optimized font and image management.

Optimized Virtual Window scrolling.

--------------------------------------------------------------------------------

Enhanced

ErrorSys.prg

SET HELPFILE TO <hlp> command supports the help files in CHM format.

DO REPORT command uses an OEM to ANSI conversion if its needed only.

DO REPORT command have added a new features:
- Calculate the greater font for print fit in the choosen paper size
- Not necessary to put number of lines per page nor number of characters for each line
- Headers with a font on 2 points greater than rest
- Top margin clause
- Option 'EVERY PAGE' for GROUPED BY clause

Function GetFile()

Function PutFile()

Function InputWindow()

INI file - an integer value remains without a fractional part, two functions added _GetSectionNames() and _GetSection().

The ICON and NOTIFYICON clauses supports a resource identifier as integer value in the DEFINE WINDOW command.

The BUTTON control supports an icons (*.ico) from files or resource.

The IMAGE BUTTON control with bitmap use mask, created on the fly, for disabled button state.

The IMAGE BUTTON control supports an extraction of icons (*.ico) from external files.

The TEXTBOX and EDITBOX controls support insert/overwrite mode (regarding to <Ins> key global status).

The ReadOnly state of EDIT controls family (TEXT & EDIT) preserve userdefined FontColor and BackColor properties.
We can also define these properties as array of RGB arrays {aEnabled,aReadonly}.

The Monthcal control supports setting of the first day of the week.

The MessageBox functions supports an optional parameters:
nIcon - icon resource name (from resources)
lSysModal - if set to false when MB_APPLMODAL+MB_TOPMOST style is used
nDefaultButton - initial default button at MessageBoxes with 2 or 3 buttons

The SET NAVIGATION EXTENDED command supports backward moving by pressing Shift-Enter.

The EXECUTE FILE WAIT command supports an optional clauses: WHILE and INTERVAL.

The window MOUSECLICK event supports a right mouse click.

The ACTIVATE WINDOW command supports an optional NOWAIT clause.

The EDIT EXTENDED command shows the deleted records.

The Menu items supports Messages in the statusbar.

The MENUITEM command supports a DISABLED clause.

The MENUITEM command supports a CHECKMARK <image> and FONT <font> clauses.

The MENU POPUP command supports an IMAGE <image> clause.

The Main menu supports MRU[ITEM] menu command.

The default action on Statusbar Keyboard items toggle NumLock, CapsLock and Insert status on WinNT/2k/XP.

The StatusBar's command CLOCK supports an optional AMPM clause.

The context menu and notify menu supports multistaged submenu.

The Browse and Grid controls supports an optional NOTABSTOP clause.

The Grid control supports an optional VALIDMESSAGES clause.

The Grid control supports an optional CHECKBOXES clause.

The CheckBox control supports an Extended Navigation.

The Spinner control supports an Extended Navigation.

The Tab control supports adding of ToolTip to separate page instead to all Tab.

The ComboBox control restores an original Value at the Refresh method similar to the Refresh methods in the others controls.

The Address property of Hyperlink control can contain the file of folder name.

The DRAW GRAPH command supports an alternative syntax.

The DRAW GRAPH command supports SHOWDATAVALUES and DATAMASK clauses.

The COMPRESS command supports an optional PASSWORD clause.

The UNCOMPRESS command supports an optional FILEMASK | FILEARRAY clause.

--------------------------------------------------------------------------------

Fixed

Default font name and font size if FontName, FontSize attributes are not defined in control's definition.

Problem in Grid control with first element of array for picture handling.

Filling of Tabs caption property in function _AddTabPage().

Updating of Tab control without any tabs in function UpdateTab().

Specifying the Max value for the identifier of the Hotkeys.

--------------------------------------------------------------------------------

New libraries

The Shell32 library lets you copy, move, delete a files and folders using the WinAPI SHFileOperation() function.
Look at folder Samples\Basic\shell32 for sample.

The TMsAgent library lets you to manage the Microsoft Agents.
Look at folder Samples\Advanced\MsAgent for sample.

The HMG_QHTM library is based upon a freeware Qhtm.Dll from http://www.gipsysoft.com/qhtm/freedownload.shtml.
Look at folder Samples\Advanced\qhtm_2 for sample.

--------------------------------------------------------------------------------

HBprinter library support

The full description is beyond the scope of this document - please refer to doc\MiniGUI.chm for help and samples\Advanced\HBPrint\demo.prg for sample.

--------------------------------------------------------------------------------

TSBrowse library support

The full description is beyond the scope of this document - please refer to doc\TSBrowse.chm for help and samples\Advanced\TsBrowse\demo.prg for sample.

--------------------------------------------------------------------------------

PropGrid library support

The full description is beyond the scope of this document - please refer to doc\MiniGUI.chm for help and samples\Advanced\PropGrid\demo.prg for sample.

--------------------------------------------------------------------------------

PropSheet library support

The full description is beyond the scope of this document - please refer to doc\MiniGUI.chm for help and samples\Advanced\PropSheet\demo.prg for sample.

--------------------------------------------------------------------------------
Thanks to many people at the following forums for contributions and feedbacks:

- English http://groups.yahoo.com/group/harbourminigui/

- Brazilian http://br.groups.yahoo.com/group/miniguibrasil/

- Spanish http://es.groups.yahoo.com/group/harbourminigui_es/

- Russian http://clipper.borda.ru/
I hope that give you an idea :idea:

Re: Dos cuestiones - Two questions

Posted: Sat Mar 13, 2010 8:27 pm
by JALMAG
mustafa wrote:Hola Jalmag
lo del icon ya te conteste mirate este post : http://hmgforum.com/viewtopic.php?f=5&t=1215
lo del idioma tienes que poner al principio del Prg. MAIN pones estoasi:

FUNCTION MAIN()

SET CENTURY ON
SET DATE FRENCH
SET ESCAPE ON
SET NAVIGATION EXTENDED
SET LANGUAGE TO SPANISH // <--------- aqui pones el lenguaje en nuestro caso español
SET DELETED ON
SET DATE FORMAT TO 'dd/mm/yyyy'

un saludo
MUSTAFA
Gracias Mustafá, hacia todo pero no salia y es que se me pasó lo dela rchivo RC. Lo probaré esta noche.
Muchas gracias.

Re: Dos cuestiones - Two questions

Posted: Sat Mar 13, 2010 8:32 pm
by JALMAG
Thank you gfilatov, I work now with MIINGUI 1.7 you "extended", and he/she has an impressive power. I reiterate thank you for the information. :P

Re: Dos cuestiones - Two questions

Posted: Sun Mar 14, 2010 12:53 am
by Roberto Lopez
gfilatov wrote: Hello,

There is the following description in the MiniGUI Extended distribution as an answer:
--------------------------------------------------------------------------------
Harbour MiniGUI Extended Syntax Extensions

Harbour MiniGUI Extended is a fork up from Official HMG created March 2005. It aims to follow a more aggressive development path, and be more responsive to user's input.

As it stands at this point, HMG Extended offers Syntax extensions over Official HMG, including:
<...>
I hope that give you an idea :idea:
WOW! ;)

Re: Dos cuestiones - Two questions

Posted: Fri Mar 26, 2010 12:30 pm
by Roberto Lopez
gfilatov wrote: There is the following description in the MiniGUI Extended distribution as an answer:
--------------------------------------------------------------------------------
Harbour MiniGUI Extended Syntax Extensions
<...>
Dear Grigory,

IMHO, this document you've posted is PLENTY of INACCURACIES and MISLEADING (marketing style) INFORMATION.

I ask you to PROMPTLY CORRECT this document, since it could led users to be CONFUSED about TRUE HMG CAPABILITIES compared with HMG EXT.

I'm sure that this was UNINTENTIONAL, so I expect a QUICK ACTION from your part to CORRECT IT.

Thanks for your attention.

Re: Dos cuestiones - Two questions

Posted: Fri Mar 26, 2010 1:15 pm
by gfilatov
Hello Roberto,

I'll revise this document for an actual condition.

Thanks for your attention!

Re: Dos cuestiones - Two questions

Posted: Fri Mar 26, 2010 1:35 pm
by Roberto Lopez
gfilatov wrote:Hello Roberto,

I'll revise this document for an actual condition.

Thanks for your attention!
Thanks to you!