I am receiving an error in the following code when compiling.
"The following symbol was not defined in the object file or files - lvc.imask"
.Const
.Data
STOCKMESSAGES DD WM_INITDIALOG, OnInitDialog
DD WM_CLOSE, OnStockClose
Heading1 DB "Head One", 0
.Code
dlgStockProcedure Frame hDlg, uMsg, wParam, lParam
Mov Eax, [uMsg]
Mov Ecx, SizeOf STOCKMESSAGES / 8
Mov Edx, Addr STOCKMESSAGES
: Dec Ecx
Js >L2
Cmp [Edx + Ecx * 8], Eax
Jne <
Call [Edx + Ecx * 8 + 4]
Ret
L2: Return (FALSE)
EndF
OnInitDialog:
UseData dlgStockProcedure
Local lvc:LV_COLUMN, hList
;==================================
;Write the initialization code here
;==================================
; 1. Get handle to the LV - returned in Eax
Invoke GetWindowItem, [hDlg], IDC_DLGSTOCK_LVSTOCK
Mov [hList], Eax
Mov D[lvc.imask], LVCF_TEXT + LVCF_WIDTH
Mov [lvc.pszText], Addr Heading1
Mov D[lvc.lx], 100
Invoke SendMessage, [hList], LVM_INSERTCOLUMN, 0, Addr lvc
Return (TRUE)
EndU
OnStockClose:
UseData dlgStockProcedure
;=========================
;Write the final code here
;=========================
Invoke IsModal, [hDlg]
Or Eax, Eax ;Cmp Eax, FALSE
Jz >
Invoke EndModal, [hDlg], IDCANCEL
Mov Eax, TRUE ;Return (TRUE)
: Ret
EndU
dlgStocklvStock Frame hWnd, uMsg, wParam, lParam
Return (FALSE)
EndF
dlgStockbtnExit Frame hWnd, uMsg, wParam, lParam
Return (FALSE)
EndF
Any help with this please?
Hi BPak,
If you have a look at the commctrl.inc file, int the ..\GoAsm\Include folder, you will see that LV_COLUMN is defined as follows:
LV_COLUMN Struct
mask DD
fmt DD
lx DD
pszText DD
cchTextMax DD
iSubItem DD
iImage DD
iOrder DD
EndS
So, the first member is mask in GoAsm, like defined in C for Windows, not imask. In MASM32 this member has been changed to imask (I guess) because mask is a MASM reserved word.
Just replace imask with mask and the problem is solved.
Regards,
Ramon
Thanks Ramon.
That helps me in finding my way around.
BPak
You are welcome. Thanks for using Easy Code.
Ramon