Announcement

Collapse
No announcement yet.

Detect DDT or SDK was used?

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

  • Detect DDT or SDK was used?

    I am going over old code, and found a "minor inconvenience" that I had mixed and matched DDT with SDK code for a window. (nice example of a "no-no" though ) so it got me wondering. Is there a way to tell if I used DDT or SDK at runtime?
    Engineer's Motto: If it aint broke take it apart and fix it

    "If at 1st you don't succeed... call it version 1.0"

    "Half of Programming is coding"....."The other 90% is DEBUGGING"

    "Document my code????" .... "WHYYY??? do you think they call it CODE? "

  • #2
    At runtime?
    Code:
    $USING_DDT =  "YES" 
    
    FUNCTION PBMAIN
       PRINT USING$( "USING DDT: &", $USING_DDT) 
    ...
    Besides, "Mixing SDK and DDT" is not ALWAYS "bad" or "wrong"

    What IS always "bad" or "wrong" is using DDT commands against windows or controls not created with DIALOG NEW or CONTROL ADD.

    But since both CBHNDL and the "hCtrl" returned by CONTROL HANDLE are valid window handles (this is documented), the use of API calls against them is permitted.

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

    Comment


    • #3
      Sooooo, using Windows API (SDK) commands on something that may have been created DDT is not wrong or bad????

      But using DDT commands or PB assist on something that was created API MIGHT be bad???

      that is the confusion I have often seen, asked, answered, asked again....

      I am seeing the "Application Specific veil" but its a lonngggg idea, and hard to overcome what I know as "Set in Wet Concrete"
      Engineer's Motto: If it aint broke take it apart and fix it

      "If at 1st you don't succeed... call it version 1.0"

      "Half of Programming is coding"....."The other 90% is DEBUGGING"

      "Document my code????" .... "WHYYY??? do you think they call it CODE? "

      Comment


      • #4
        User to user discussions about the PB/Win (formerly PB/DLL) product line. Discussion topics include PowerBASIC Forms, PowerGEN and PowerTree for Windows.


        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".

        Best regards,

        Bob Zale
        PowerBASIC Inc.
        Rgds, Dave

        Comment


        • #5
          Originally posted by Cliff Nichols View Post
          . Is there a way to tell if I used DDT or SDK at runtime?
          GetClassName

          James

          Comment


          • #6
            #32770
            Patrice Terrier
            www.zapsolution.com
            www.objreader.com
            Addons: GDImage.DLL 32/64-bit (Graphic library), WinLIFT.DLL 32/64-bit (Skin Engine).

            Comment

            Working...
            X