How to set help text in windows status area

LINUS

New Member
Hello,

I have a fill-in placed on a Smart windows. When I run this window, I have assigned help text greater than 63 character for that fill-in using fill-in:HELP = "some text > 63 characters". But windows is showing help text only upto 63 characters in windows status area for that fill-in.

Is there any way to display/assign help text greater than 63 characters in windows status area ?

Any quick help/view appreciated :)
 

jongpau

Member
Hi Linus,

I don't think it can be longer than 63 characters. The help text is displayed in the status area of the window and that has a maximum size of 63 characters. The format of the _help field is also 63 characters; this does not limit the field contents to that length, but does format it with this length when displayed
 

LINUS

New Member
Thanks Jongpau for your help.

As we see that when particular fill-in placed on viewer/smart window gets focus then its help is displayed in windows status area. So could you please tell me which event or procedure published. OR what exactly is the flow behind this mechanism.
 

TomBascom

Curmudgeon
The Progress runtime does that automatically. You can suppress it (... with NO-HELP ...) but you cannot reformat it.
 

tanveer_jkt

New Member
Hello Tom,

Is there any scope in Progress to assign characters greater than 63 in windows status area. I mean by using Windows API or by modification/customization of Progress source code. I tried to do so by using Windows API to create windows status area. I used procedure CreateStatusWindow of Windows "comctl32.dll" to create windows status area at run time. So as of now I am calling these API on entry of particular fill-in and just assigned text >63 character in status area which is nothing but is a child of windows. Right now it is working fine but I need to have some generic solution. Below I have just provided that code snippet. Could you please help me on this.

Code:
PROCEDURE CreateStatusWindow EXTERNAL "comctl32.dll":
  DEFINE INPUT  PARAMETER lStyle      AS  LONG.
  DEFINE INPUT  PARAMETER lpctStr     AS  CHARACTER.
  DEFINE INPUT  PARAMETER hwndParent  AS  LONG.
  DEFINE INPUT  PARAMETER wId         AS  LONG.
  DEFINE RETURN PARAMETER hStatusArea AS  LONG.
END PROCEDURE.

FUNCTION CreateStatusBar RETURNS INTEGER
  ( /* parameter-definitions */ ) :
/*------------------------------------------------------------------------------
  Purpose:
    Notes:
------------------------------------------------------------------------------*/
  DEFINE VARIABLE hwndMenu      AS  INTEGER NO-UNDO.
  DEFINE VARIABLE hwndParent    AS  INTEGER NO-UNDO.
  DEFINE VARIABLE hInstance     AS  INTEGER NO-UNDO.
  DEFINE VARIABLE hWindowMenu   AS  INTEGER NO-UNDO.
  DEFINE VARIABLE hStatusArea   AS  INTEGER NO-UNDO.
  DEFINE VARIABLE lpParam       AS  MEMPTR  NO-UNDO.
  DEFINE VARIABLE ReturnValue   AS  INTEGER NO-UNDO.

  ASSIGN
    SET-SIZE(lpParam)    = 256
    PUT-LONG(lpParam,1)  = 120
    PUT-BYTE(lpParam,5)  = 240.
    /*PUT-LONG(lpParam,9)  = -1.  extend to the right edge of the window */

  /* find handle to the Parent handle of the Window */
  RUN GetParent IN hpApi(iwinhand,
                         OUTPUT hwndParent).

  RUN GetWindowLongA IN hpApi(hwndParent,
                              -6,  /* GWL_HINSTANCE */
                              OUTPUT hInstance).


  /* Call InitCommonControls to ensure that the comctl32.dll is loaded */
  RUN InitCommonControls.
/* hwndParent */


  /* Create the status window control and parent it to the window */
  RUN CreateStatusWindow
    (   1073741824 /* = WS_CHILD         */
      + 268435456  /* = WS_VISIBLE       */  /* window styles */
      + 8388608 ,   /* = WS_BORDER        */
     cFillInHelp,                                         /* text to display in status area of win */
     hwndParent,                                 /* parent window */
     101,                                        /* ID_STATUS */
     OUTPUT hStatusArea).

  /*MESSAGE hStatusArea "hStatusArea"
      VIEW-AS ALERT-BOX INFO BUTTONS OK.*/


  IF hStatusArea = 0 THEN
    MESSAGE 'Unable to create the status bar...' VIEW-AS ALERT-BOX.
  ELSE
    /* create the multiple segments based on the data in lpParam */
    RUN SendMessageA IN hpApi( INPUT  hStatusArea,
                               INPUT  {&SB_SETPARTS},
                               INPUT  0,         /* number of parts */
                               INPUT GET-POINTER-VALUE(lpParam)).
                               /*OUTPUT ReturnValue).*/

  ASSIGN
    SET-SIZE(lpParam)  = 0.

  RETURN hStatusArea.   /* Function return value. */

END FUNCTION.
 
Last edited by a moderator:

RealHeavyDude

Well-Known Member
AFAIK the prowin32.exe GUI is based on the Windows MFC ( Windows 95? ) and has hardly seen much enhancements since way back then. Without knowing any details I'll take it that this is a hard coded limit in the AVM that stems back from the first forays of Progress into GUI in the beginning of the '90s of the last century. Plus, I'll bet it wont see much enhancments ever. Progress' focus is on .NET and web/mobile application development ( Telerik acquisistion ... ).

If I were you I would not insist on displaying more than 63 characters in the status area managed by the ABL. If you really do need to display more character I would roll my own status display that is capable of that.

Heavy Regards, RealHeavyDude.
 
Top