Page 4 of 15

Re: HMG 3.1.4 (Test)

Posted: Thu Jun 20, 2013 1:10 pm
by Rathinagiri
I meant to replace in the programming and not in HMG itself. It would be a better indication (like always on 'ToolTip' for the user). Tooltip can't be done away with because cuebanner works only for TextBox control.

I don't have XP. Can somebody check and report?

Re: HMG 3.1.4 (Test)

Posted: Thu Jun 20, 2013 1:41 pm
by Carlos Britos
Rathinagiri wrote:I meant to replace in the programming and not in HMG itself. It would be a better indication (like always on 'ToolTip' for the user). Tooltip can't be done away with because cuebanner works only for TextBox control.

I don't have XP. Can somebody check and report?
Hi
I don´t have at this moment the last HMG release, but I´ve using this code in XP and works fine, on textbox, combobox (edit part) and spinner. Don´t works on editbox, richeditbox. You can compare the HMG code with this one. It was not tested on Hmg, is an adaptation.

Code: Select all

HB_FUNC( SETCUEBANNER )   // ( editHandle, cMsg ) -> nil
{
   #ifdef IGH_UNICODE
      LPWSTR lpWCStr = HMG_parc(2) ;
   #else
      LPWSTR lpWCStr = (LPCWSTR) ( hb_parc(2) == NULL ) ? NULL : hb_mbtowc( (const char *) hb_parc(2) ) ;
   #endif
   SendMessage( (HWND) hb_parnl(1), EM_SETCUEBANNER, (WPARAM) 0, (LPARAM) (LPCWSTR) lpWCStr ) ;
   SysFreeString( lpWCStr );
}

HMG 3.1.4 (Test)

Posted: Thu Jun 20, 2013 2:16 pm
by Pablo César
Hi Carlos, your example is not working with HMG in XP, in Win 7 yes but different than Rathi example. The differance (in win7) from your sample and Rathi is that in Rathi example cuebanner text only disapear when start typing and your example disapear initially with prompted.

Any way both example is not working in XP yet. I have seen many VB examples and same behaviour and in most of them talks some about of comctl32.dll version. I am not sure but probably our problem is from MINGW compiler.

Carlos, what do you mean about #ifdef IGH_UNICODE (here in red is it something wrong ?)

Re: HMG 3.1.4 (Test)

Posted: Thu Jun 20, 2013 2:30 pm
by srvet_claudio
Carlos Britos wrote:
Rathinagiri wrote:I meant to replace in the programming and not in HMG itself. It would be a better indication (like always on 'ToolTip' for the user). Tooltip can't be done away with because cuebanner works only for TextBox control.

I don't have XP. Can somebody check and report?
Hi
I don´t have at this moment the last HMG release, but I´ve using this code in XP and works fine, on textbox, combobox (edit part) and spinner. Don´t works on editbox, richeditbox. You can compare the HMG code with this one. It was not tested on Hmg, is an adaptation.

Code: Select all

HB_FUNC( SETCUEBANNER )   // ( editHandle, cMsg ) -> nil
{
   #ifdef IGH_UNICODE
      LPWSTR lpWCStr = HMG_parc(2) ;
   #else
      LPWSTR lpWCStr = (LPCWSTR) ( hb_parc(2) == NULL ) ? NULL : hb_mbtowc( (const char *) hb_parc(2) ) ;
   #endif
   SendMessage( (HWND) hb_parnl(1), EM_SETCUEBANNER, (WPARAM) 0, (LPARAM) (LPCWSTR) lpWCStr ) ;
   SysFreeString( lpWCStr );
}
Wow Carlos, very clean and nice code!!! :D
SETCUEBANNER of the HMG.3.1.4, works also in ANSI because this portion of the code is forced to compile always in Unicode. But the use of MultiByteToWideChar() function in ANSI version is more accurate.
Best regards,
Claudio.

Re: HMG 3.1.4 (Test)

Posted: Thu Jun 20, 2013 2:34 pm
by srvet_claudio
Pablo César wrote:Carlos, what do you mean about #ifdef IGH_UNICODE (here in red is it something wrong ?)
Pablo, change:

Code: Select all

#ifdef IGH_UNICODE
for:

Code: Select all

#ifdef UNICODE

HMG 3.1.4 (Test)

Posted: Thu Jun 20, 2013 2:38 pm
by Pablo César
srvet_claudio wrote:Pablo, change:

Code: Select all

#ifdef IGH_UNICODE
for:

Code: Select all

#ifdef UNICODE
Thank you Dr.
srvet_claudio wrote:SETCUEBANNER of the HMG.3.1.4, works
But please Claudio clarify if is working in XP. Because for me is not working in XP.
But the use of MultiByteToWideChar() function in ANSI version is more accurate.
And how it could be implemented in your opinion Claudio in Carlos source code ?

Re: HMG 3.1.4 (Test)

Posted: Thu Jun 20, 2013 2:51 pm
by danielmaximiliano
Claudio :
Resolvi el problema del IDE, configure el IDE Ansi con Crimsom como editor y Español como lenguaje, copie los 3 .ini
  • Language.ini
    Hmg.ini
    Editor.ini
los edite con Notepad++ y los conveti a UTF8 Without BOM, abri el IDE y se ejecuta sin ningun problema :mrgreen: , por algún problema el IDE no crea estos achivos en su formato de encoding ????

Windows 7 Home Premium 64 recien instalado y aplicado todos sus services pack , 4GB Ram.

Re: HMG 3.1.4 (Test)

Posted: Thu Jun 20, 2013 3:01 pm
by srvet_claudio
Pablo César wrote:
srvet_claudio wrote:SETCUEBANNER of the HMG.3.1.4, works
But please Claudio clarify if is working in XP. Because for me is not working in XP.
I not tried the Carlo's code, but the CueBanner of HMG.3.1.4 not work well in XP.

Re: HMG 3.1.4 (Test)

Posted: Thu Jun 20, 2013 3:02 pm
by Pablo César
danielmaximiliano wrote:Claudio :
Resolvi el problema del IDE, configure el IDE Ansi con Crimsom como editor y Español como lenguaje, copie los 3 .ini
  • Language.ini
    Hmg.ini
    Editor.ini
Congratulation, Daniel. Probably was not in UTF8 for spanish.
danielmaximiliano wrote:UTF8 Without BOM
I never use (without "BOM") option, simply "UTF-8" only.

Re: HMG 3.1.4 (Test)

Posted: Thu Jun 20, 2013 3:06 pm
by srvet_claudio
danielmaximiliano wrote:Claudio :
Resolvi el problema del IDE, configure el IDE Ansi con Crimsom como editor y Español como lenguaje, copie los 3 .ini
  • Language.ini
    Hmg.ini
    Editor.ini
los edite con Notepad++ y los conveti a UTF8 Without BOM, abri el IDE y se ejecuta sin ningun problema :mrgreen: , por algún problema el IDE no crea estos achivos en su formato de encoding ????

Windows 7 Home Premium 64 recien instalado y aplicado todos sus services pack , 4GB Ram.
Que extraño Daniel, verifique y a mi me crea el archivo Language.ini en UTF8.
Proba borrar el archivo Language.ini, cargar el IDE y cambiar el idioma a Español, tendría que crear automáticamente el archivo Language.ini en UTF8.