Announcement

Collapse
No announcement yet.

CommCtrl and ???

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

  • Tom Hanlin
    replied
    Ah, I see. That's what we call a "bug". It's been fixed for the
    next update to the compiler.

    ------------------
    Tom Hanlin
    PowerBASIC Staff

    Leave a comment:


  • Jules Marchildon
    replied

    semen, give these a look over...

    http://www.powerbasic.com/support/pb...ead.php?t=1811

    http://www.powerbasic.com/support/pb...ead.php?t=1787

    regards, jules

    Leave a comment:


  • Semen Matusovski
    replied
    Tom --
    Your reaction talks that you didn't test Hex$(%TVI_ROOT)
    Compiler SHOULD produce the same image for &HFFFF0000??? and &HFFFF0000&, but ...
    Code:
    #Compile Exe
    #Register None
    #Dim All         
    Function PbMain
       MsgBox Hex$(&HFFFF0000???),, Hex$(&HFFFF0000&)
    End Function
    Additional test (what happends with TreeView_DeleteAllItems)
    Code:
       #Compile Exe
       #Register None
       #Dim All
       #Include "Win32Api.Inc"
    
       %TVI_ROOT               = &HFFFF0000???
       
       CallBack Function DlgProc
          Select Case CbMsg
             Case %WM_USER + 1
                SetWindowText CbHndl, "Should be " + Hex$(CbWparam) + " BUT RECEIVED " + Hex$(CbLparam)
          End Select
       End Function
    
       Function PbMain
          Local hDlg As Long
          Dialog New 0, "Palette",,, 400, 100, %WS_SYSMENU Or %WS_CAPTION To hDlg
          PostMessage hDlg, %WM_USER + 1, &HFFFF0000&, %TVI_ROOT
          Dialog Show Modal hDlg Call DlgProc
       End Function
    What is interesting that

    Dim a As Dword
    a = &HFFFF0000???

    works correctly.


    ------------------
    E-MAIL: [email protected]

    [This message has been edited by Semen Matusovski (edited October 26, 2000).]

    Leave a comment:


  • Tom Hanlin
    replied
    Your point is not clear. Perhaps you could be less terse?

    ------------------
    Tom Hanlin
    PowerBASIC Staff

    Leave a comment:


  • Semen Matusovski
    replied
    Originally posted by Tom Hanlin:
    The only case where you might have a problem with this is when doing a direct comparison
    of the values (say, in an IF..THEN construct).
    Tom --
    SendMessage (TreeView_DeleteAllItems)



    ------------------
    E-MAIL: [email protected]

    Leave a comment:


  • Tom Hanlin
    replied
    Eh... what?

    %TVI_ROOT is a constant for a handle type and, thus, is properly defined
    as a DWORD quantity, &HFFFF0000???. In most cases, it is also safe to
    define it as the equivalent LONG quantity, &HFFFF0000&. The only case
    where you might have a problem with this is when doing a direct comparison
    of the values (say, in an IF..THEN construct).


    ------------------
    Tom Hanlin
    PowerBASIC Staff

    Leave a comment:


  • Semen Matusovski
    started a topic CommCtrl and ???

    CommCtrl and ???

    TVI_ROOT = &HFFFF0000???

    Well ... Test Hex$(TVI_ROOT)
    I replaced ??? here and in another places to & and all is Ok.

    ------------------
    E-MAIL: [email protected]
Working...
X