Announcement

Collapse
No announcement yet.

DIALOG SHOW using CodePtr (feature req)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • DIALOG SHOW using CodePtr (feature req)

    Hi,

    In an attempt to create an OO version of the DDT set, I stumbled on the first
    problem. The DDT command DIALOG SHOW doesn't allow for a codeptr to be
    used.

    Therefore, could I ask for a feature request: add the possibility to use
    code a codeptr as a callback mechanism with DDT.

    Thank you

    Steven
    So here we are, this is the end.
    But all that dies, is born again.
    - From The Ashes (In This Moment)

  • #2
    Even CODEPTR is not going to work if your OO functions are in a DLL, as DDT functions are only valid in the module in which the dialog is created.

    (Which is I think why "DIALOG SHOW... CALL DWORD procaddress" is NOT supported).

    BUt I may have a workable method for you....

    You COULD use CODEPTRs by using the SDK-Style dialog creation functions DialogBoxIndirect[Param] and CreateDialogIndirect[Param] in your functions. (FWIW, this how "DDT" syntax is handled by the compiler).

    Just convert your "DIALOG NEW" and CONTROL ADD" functions to entries in the DLGTEMPLATE and DLGITEMTEMPLATE structures used by these functions.

    (OK, so using "just" in that sentence over-simplifies it. Although "doable" it will not be quick and easy)

    MCM
    Michael Mattias
    Tal Systems Inc. (retired)
    Racine WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      Thanks Michael,

      Didn't know about that the same module approach. But I think you're right about why Call Dword is not supported.

      Cheers

      Steven
      So here we are, this is the end.
      But all that dies, is born again.
      - From The Ashes (In This Moment)

      Comment


      • #4
        DDT giveth - DIALOG NEW and CONTROL ADD are certainly easier to master than DialogBoxIndirect - and DDT taketh away - although in this case I think "There's no such thing as a free lunch " might just be 'spot-on.'
        Michael Mattias
        Tal Systems Inc. (retired)
        Racine WI USA
        [email protected]
        http://www.talsystems.com

        Comment

        Working...
        X