just wonder why the TV_ITEM structure has a different name for "mask"...
in windows help file its "mask" and not "_mask"....
from windows.inc
...
TVITEMA STRUCT
_mask DWORD ?
...
mask is masm keyword, example
lohi record hi:16,lo:16
and eax,mask lo
and edx,mask hi
imho its better to put underscore at the end, so it does not interfere with code completition
(in radasm for example), and that name relates to documentation.
i mean "mask_" matches with "mask" in four characters, but "mask" doesnt match with "_mask" in any.
Quoteimho its better to put underscore at the end
I second that.
Also, while changing things which are keywords in ASM (like cx in some structures) there should be a standard way of modifying it, like
underscore at the end, or something like that, but something standard!
Regards,
Shantanu
The leading _ is by Microsoft convention for masm reserve words and while the earlier section of windows.inc did not conform to that later standard, there is always a problem in modifying an existing structure as it breaks previous usage.
What about using a union?
TVITEMA STRUCT
union
_mask DWORD ?
mask_ DWORD ?
ends
hItem DWORD ?
state DWORD ?
stateMask DWORD ?
pszText DWORD ?
cchTextMax DWORD ?
iImage DWORD ?
iSelectedImage DWORD ?
cChildren DWORD ?
lParam DWORD ?
TVITEMA ENDS
Then you have the best of both worlds.
alksentrs,
That is a good idea, I will have to think about it to make sure there are no side effects.
Oh no, not a bloody UNION. I can never remember how to use them. One more layer of complexity.
In what version of ML were they introduced?
And anyway, don't the versions of H2INC prefix MASM reserved words with an underscore?
If H2INC and "Microsoft convention" (oxymoron) aren't a standard, then what is (are?)?
All I was saying was...lets just go with ONE idea, any one idea. :bg :bg
If mask_ were to become _mask or any such thing, for me it would be a CTRL+H (or CTRL+R in RadASM :lol ) and Replace All.
I understand the code-break headaches it would cause though.
I remember seeing a typedef for the same (I think for the POASM compatibility), not sure though, will check when I reach home!
Regards,
Shantanu
CTRL+H ? Is that...Notepad? Too advanced for me, I prefer to use EDIT.COM. Ah, bring back DOS. :bdg