hi~!
today,i want to create a treeview control,it must use a STRUCT:TV_ITEM; it define like this in win32 programer's reference:

typedef struct TV_ITEM {
UINT mask;
HTREEITEM hItem;
UINT state;
UINT stateMask;
LPSTR pszText;
int cchTextMax;
int iImage;
int iSelectedImage;
int cChildren;
LPARAM lParam;
} TV_ITEM, FAR *LPTV_ITEM;

notice! the first member names "mask",but when you write it in you program,will make error: "undefined symbol".i search it in windows.inc and find that The TV_ITEM is defined like this in it:

TVITEMA STRUCT
_mask DWORD ?
hItem DWORD ?
state DWORD ?
stateMask DWORD ?
pszText DWORD ?
cchTextMax DWORD ?
iImage DWORD ?
iSelectedImage DWORD ?
cChildren DWORD ?
lParam DWORD ?
TVITEMA ENDS

TVITEM equ <TVITEMA>
it has different name. i am a beginner.i want to know why this difference come out ,it's a mistake ? and how many difference like this between window.inc and win32 programer's reference
Posted on 2004-01-15 07:49:24 by stupid bird
mask is an MASM32 keywork and so can't be used in a declaration.If _mask is used in windows.inc then use _mask in your code instead of mask when using the TVITEMA structure.
Posted on 2004-01-15 09:16:55 by ENF
You will find many of these, there is also cx that has been replaced with lx because cx is the name of a register (LV_COLUMN).
Posted on 2004-01-15 09:57:51 by donkey
bird,

how many difference like this between window.inc and win32 programer's reference

The problem as has been mentioned already is that some of the standard names in the Microsoft literature are also MASM reserve words with things like registers and the like. While the vast majority of names are standardised, alterations have had to be made so that MASM can build files using equates and structures that are needed.

It would be useful to do an equate for 32 bit Windows like,


INT equ <DWORD>

but INT is also a mnemonic for dos level interrupts so it cannot be used any other way.
Posted on 2004-01-15 19:58:00 by hutch--
OPTION NOKEYWORD:<LENGTH MASK NAME PAGE SIZE TITLE WIDTH>
:cool:

haven't found a way around 'cx' though
:)
Posted on 2004-01-16 05:14:45 by eGo
thanks for reply~
by any chance,today,i meet other member :"Name1 " at PE file format .and in micsoft's data, it's "Name".
ha!ha~.for you help ,it don't perplex me yet
thank you once more
Posted on 2004-01-16 10:46:55 by stupid bird
btw what's the newest WINDOWS.INC becouse mine did not have LVM_SORTITEMSEX i have to add it manually.
Posted on 2004-01-16 12:56:24 by AceEmbler
eGo,

OPTION NOKEYWORD:<LENGTH MASK NAME PAGE SIZE TITLE WIDTH>

This will in fact work but at the price of disabling some of the functionality of the assembler and while I don't use most of them, someone else may.

There is no alternative to slightly different names in an assembler include file as MASM has enough reserve words of its own that should be left intact.

Regards,

http://www.asmcommunity.net/board/cryptmail.php?tauntspiders=in.your.face@nomail.for.you&id=2f46ed9f24413347f14439b64bdc03fd
Posted on 2004-01-16 19:22:44 by hutch--