I have to repeat this question, because I am really interested to learn to use all the aspects of PB/DLL and I'm seemingly having some teething problems. I hope I'm not offending anybody by repeating this question so soon. I have always got good answers from this forum, so I believe somebody can explain this to me, too.
In COMMCTRL.INC there is a define statement
%TVI_ROOT = &HFFFF0000???
I understand this so that TVI_ROOT is defined to be type DWORD (???).
So given two following macro definitions from COMMCTRL.INC, why does the first one work and the second one not?
To work means here that making a call
clears the Treeview and a call
does not.
Making the following modification makes macro TreeView_DeleteAllItems to do what I assume it to do.
Why?
1. Am I assuming here something which is not true?
2. Is there something wrong with typing of numeric constants in PB/DLL version 6.0 (and Win98)?
I really hope someone could comment on this.
TIA
Lasse Rantanen
[email protected]
In COMMCTRL.INC there is a define statement
%TVI_ROOT = &HFFFF0000???
I understand this so that TVI_ROOT is defined to be type DWORD (???).
So given two following macro definitions from COMMCTRL.INC, why does the first one work and the second one not?
Code:
FUNCTION TreeView_DeleteItem (BYVAL hWnd AS DWORD, BYVAL hitem AS DWORD) _ AS LONG FUNCTION = SendMessage(hWnd, %TVM_DELETEITEM, 0, hitem) END FUNCTION FUNCTION TreeView_DeleteAllItems (BYVAL hWnd AS DWORD) AS LONG FUNCTION = SendMessage(hWnd, %TVM_DELETEITEM, 0, %TVI_ROOT) END FUNCTION
Code:
TreeView_DeleteItem hWndTreeView, %TVI_ROOT
Code:
TreeView_DeleteAllItems hWndTreeView
Making the following modification makes macro TreeView_DeleteAllItems to do what I assume it to do.
Code:
FUNCTION TreeView_DeleteAllItems (BYVAL hWnd AS DWORD) AS LONG LOCAL dwItem AS DWORD dwItem = %TVI_ROOT FUNCTION = SendMessage(hWnd, %TVM_DELETEITEM, 0, dwItem) END FUNCTION
1. Am I assuming here something which is not true?
2. Is there something wrong with typing of numeric constants in PB/DLL version 6.0 (and Win98)?
I really hope someone could comment on this.
TIA
Lasse Rantanen
[email protected]
Comment