Quote from: KetilO on August 25, 2008, 08:49:16 AM
Hi duyangan
To have code complete on structures the structure must be defined in your code or included in the masmApiStruct.api file.
KetilO
hi,KetilO
To be done RadASM a plug-in, Which Message can tell that plug-in the current cursor location is a variable structure, and that the structure is that type of.
eg:
WinMain proc hInst:HINSTANCE,hPrevInst:HINSTANCE,CmdLine:LPSTR,CmdShow:DWORD
LOCAL @wc :WNDCLASSEX
LOCAL @msg :MSG
mov @wc.cbSize,sizeof WNDCLASSEX
mov @wc.style,CS_HREDRAW or CS_VREDRAW
mov @wc.lpfnWndProc,offset WndProc
mov @wc.cbClsExtra,NULL
mov @wc.cbWndExtra,DLGWINDOWEXTRA
@m2m @wc.hInstance,hInst
mov @wc.hbrBackground,COLOR_BTNFACE+1
mov @wc.lpszMenuName,IDM_MENU
mov @wc.lpszClassName,offset ClassName
invoke LoadIcon,NULL,IDI_APPLICATION
mov @wc.hIcon,eax
mov @wc.hIconSm,eax
invoke LoadCursor,NULL,IDC_ARROW
mov @wc.hCursor,eax
invoke RegisterClassEx,addr @wc
invoke CreateDialogParam,hInstance,IDD_DIALOG,NULL,addr WndProc,NULL
invoke ShowWindow,hWnd,SW_SHOWNORMAL
invoke UpdateWindow,hWnd
.while TRUE
invoke GetMessage,addr @msg,NULL,0,0
.BREAK .if !eax
invoke TranslateMessage,addr @msg
invoke DispatchMessage,addr @msg
.endw
mov eax,@msg.wParam
ret
WinMain endp
To note the following lines of code for
invoke GetMessage,addr @msg,NULL,0,0
Then cursor location in @msg Department RadASM can tell this plug-in @msg is a MSG STRUCTURE
;-----------
I am sorry, my English very bad
;---------------------------------
RadASM is Good!!! :U