Announcement

Collapse
No announcement yet.

What were the rules again on DDT controls

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

  • Dave Biggs
    replied
    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".

    Leave a comment:


  • Michael Mattias
    replied
    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)

    Leave a comment:


  • Scott Slater
    replied
    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.

    Leave a comment:


  • Michael Mattias
    replied
    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

    Leave a comment:


  • Chris Boss
    replied
    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.

    Leave a comment:


  • Michael Mattias
    replied
    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

    Leave a comment:


  • Steven Pringels 3
    started a topic What were the rules again on DDT controls

    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
Working...
X