Menu

#23 Pass button id to Click code block

v1.0_(example)
closed
nobody
None
1
2020-11-16
2020-05-03
No

Hi

Could I ask for a change to be committed in source\winapi\hcontrol.prg, line 596 in r2833:

      Eval( oCtrl:bClick, oCtrl )

to:

      Eval( oCtrl:bClick, oCtrl, id )

I use the id extensively to identify which button has been pressed.

Regards
Alex

Related

Support Requests: #23

Discussion

  • Wilfried Brunken

    Hello Alex,
    modification done (r2834). Tested with MinGW on Windows 10 and my app "CLLOG", OK.
    Please could you do me (and also other users of HWGUI)
    another favour: Please post a little sample program for demonstrating your
    desired feature with allowance to check it in into "samples". Take from another sample the header
    with the copyright remark from Alexander Kresin and add after this your own copyright string.
    I want to check this feature with GTK, if necessary i modify the source code for GTK.

    Thanks for your support.
    Please give info, if Alexander Kresin can close the ticket.

    MNI TNX. 73 es 55 de
    DF7BE, Wilfried

     
  • Alex Strickland

    Alex Strickland - 2020-05-05

    Hi

    Yes Maurizio, you are right, it is sufficient. So Wilfried I guess you can revert that change, thank you. The example I was going to upload is a some code I use to make a nicer MessageBox that tries to emulate the old Clipper alert() with some bells and whistles. You can now see (if you are interested) where I use the id, and now oCtl:id. I attach the code, a header file and a test app. If you like it I would be thrilled to have it in samples.

    Regards
    Alex

     
  • Wilfried Brunken

    Hello Alex,
    i think the revert of modification in hcontrol.prg is not necessary, i found no problems testing
    it with my app CLLOG.
    I tested your posted Alert() with MinGW on my Windows 10 Laptop, but no noise come ot of the little speakers. The Alert boxes appeared and seems to be good.
    Before checking in:
    In your file alert.prg i found a foreign copyright remark for "Center.prg" and "Part of CalcFxn.Lib". I searched in the internet and there is no match. Were do this code came from ?
    Do this part of procedure "Alert_CenterWindow" infringe copyright legislation ?
    Maurizio, what is your opinion ?

    MNI TNX, 73 es 55 de
    DF7BE Wilfried

     
  • Wilfried Brunken

    Hi,
    additional remarks: following the HWGUI conventions i suggest to
    rename all external reachable with the prefix "hwg_".
    This avoids conflicts with Harbour function calls.
    Rename files: alert... to halert.prg/ch

    With regards,
    MNI 73 es 55 de
    DF7BE, Wilfried

     
  • Wilfried Brunken

    Hi Alex,
    Good Morning, it is early morning in Germany (07:41), i checked the alert again and now the Windows "Ding" sound appears. Your solution is great.
    To avoid the copyright problem i'll rewrite the copied function Alert_CenterWindow() and modify your source concerning the HWGUI naming convention. Also it is necessary, to update the HWGUI docs. OK ?
    (It is a good idea for CLLOG, while reading the DX-Cluster: got a alert, if a seldom station appears an the HAM bands.)

    With regards,
    MNI 73 es 55 de
    DF7BE, Wilfried

     
    • Alex Strickland

      Alex Strickland - 2020-05-06

      Hi Wilfried

      I am very happy if you make those changes. I used to use Clip4Win and I
      guess CenterWindow was part of it (1993!). It agree it would be better
      if you rewrote it.

      Regards
      Alex

       
  • Wilfried Brunken

    Hi Alex,
    your files modified/added, tested and committed: r2836.
    Sende Changelog
    Sende doc/hwgdoc_classes.html
    Sende doc/hwgdoc_functions.html
    Füge hinzu include/halert.ch added
    Sende makefile.gcc
    Sende samples/Readme.txt
    Füge hinzu samples/testalert.prg added
    Füge hinzu source/winapi/halert.prg added
    Sende source/winapi/misc.c
    Sende todo.txt
    Übertrage Daten ..........erledigt
    Übertrage Transaktion...
    Revision 2836 übertragen.

    According to your ticket #21, we need a new makefile.vc.
    Please test and post it for checkin.

    If this is done, i hope, that Alexander Kresin can close the ticket.

    MNI TNX for your support.
    73 es 55 de DF7BE, Wilfried.

     
  • Wilfried Brunken

    Hello Alex,
    according to Ticket #24 it was urgent necessary to rename the FUNCTION Alert() to hwg_Alert() to avoid conflicts. Also sample modified an tested again.
    Commited with r2837.
    I'm waiting for your makefile.vc with added class HALERT for commit.
    Please test modification and send an response, if Alexander Kresin can close this ticket.
    MNI TNX fer Support.

    73 es 55, with regards de
    Wilfried, DF7BE

     
  • Alex Strickland

    Alex Strickland - 2020-05-10

    Hi Wilfried

    I have added halert to the vc file and the hbmk2 hbm. I do agree with Itamar that perhaps these functions would be better under contrib, but I leave it to your judgment. Thank you.

    Regards
    Alex

     
  • Wilfried Brunken

    Hello Alex,
    VC makefiles committed with r2838.
    TNX fer ur support.

    With regards,
    CUAGN, MNI TNX, 73 es 55 de
    DF7BE, Wilfried

     
  • Luiz Rafael Culik

    • status: open --> closed
     

Log in to post a comment.