I think Farabi's approach is easiest for me to understand, but of course I can't get it to work :icon_rolleyes:
Here's what I've tried:
;this creates the pretty controls
...
.while ebx <= MAXLOTNUMBER
invoke CreateWindowEx, 0, ADDR RichEditClass, NULL,
WS_VISIBLE or ES_MULTILINE or WS_CHILD or WS_BORDER,
[esi].x, [esi].y, ;location
[esi].w, [esi].h, ;size
hDlg, ;parent
ebx, ;ID number
hInstance,
0
mov [esi].hwnd, eax
invoke SendMessage, [esi].hwnd, EM_SETBKGNDCOLOR, 0, 255 ;red
invoke SetWindowLong, [esi].hwnd, GWL_WNDPROC, ADDR ControlProc
mov oldProc, eax
add esi, type LOT
inc ebx
.endw
...
ControlProc PROC hWnd:HWND, iMsg:DWORD, wParam:WPARAM, lParam:LPARAM
.if iMsg == WM_LBUTTONDOWN
invoke Beep, 400, 500 ;to test
invoke SetCapture, hMapDlg
.else
invoke CallWindowProc, oldProc, hWnd,iMsg,wParam,lParam
.endif
xor eax, eax
ret
ControlProc EndP