Announcement

Collapse
No announcement yet.

What were the rules again on DDT controls

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

  • What were the rules again on DDT controls

    So, can i use CONTROL ADD ... and all the other functions to use on Windows created by the Windows APi (with CreateWindowEx etc ... ) or are there rules agianst it ? How about embedding a DDT form on a CreateWindow window ?

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

  • #2
    Well, you may do as you please, but 'DDT' syntax is only supported on windows created with the DIALOG NEW or CONTROL ADD statements in the same code module.

    Lots of DDT statements will "work" when passed a handle to a non-DDT window or control, but that would officially be neophyte's serendipity.

    I would not see a problem making a DDT dialog a child window , but then again I am not a 'DDT Guy' so I would actually have to try it.

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

    Comment


    • #3
      My impression is that DDT commands should really only be used for DDT apps.

      DDT controls depend upon being on a DDT Dialog, since the DDT engine likely processes a number of messages (ie. color messages) for the controls in a unique way.

      Now it may be possible to use Modal DDT based dialogs in an SDK app, since the modal dialogs uses a modal message loop and don't require you use a DDT style message loop. Beyond that I wouldn't mix DDT controls (as children of) with SDK style windows.

      While DDT is a set of wrappers over the Windows Dialog API, it does do some internal processing of its own, so it is more like an independent GUI engine. Before mixing DDT with SDK style apps, one must examine it carefully. Do tests to see the results of mixing them.
      Chris Boss
      Computer Workshop
      Developer of "EZGUI"
      http://cwsof.com
      http://twitter.com/EZGUIProGuy

      Comment


      • #4
        I was thinking more like modeless dialog, with SDK message loop including IsDialogMessage() in lieu of 'DDT' message loop?

        I don't believe you can constrain the size/location of the modeless dialog to the client area of the "master" window simply with Window styles, but you should be able to move it yourself when you get WM_SIZE on that master window.

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

        Comment


        • #5
          I believe you can use any API command on a DDT control provided that the DDT Windows and Controls are created and destroyed using DDT.
          Scott Slater
          Summit Computer Networks, Inc.
          www.summitcn.com

          Comment


          • #6
            I believe you can use any API command on a DDT control provided that the DDT Windows and Controls are created and destroyed using DDT.
            That's correct, BUT... that was not the question. He wants to use DDT commands against non-DDT windows. (Specifically CONTROL ADD)
            Michael Mattias
            Tal Systems (retired)
            Port Washington WI USA
            [email protected]
            http://www.talsystems.com

            Comment


            • #7
              Bob Zale: http://www.powerbasic.com/support/pb...004#post304004
              Actually, DDT controls were never, ever designed nor intended for use with non-DDT windows and dialogs.
              If you break "the rules", you are guaranteed to have a problem at some point.
              There has been "no change" in this regard, so PowerBASIC recommends that you consider it carefully.

              Conversely, the opposite is perfectly acceptable.
              Once you have a Windows Handle from a DDT operation, you are encouraged to use it in WinAPI functions
              like GetWindowLong(), etc. This expands your capabilities a great deal, with very little "risk".
              Rgds, Dave

              Comment

              Working...
              X