maybe - each column has its' own RE control ? :P
No, it's all in one control.
Re barebones example: see attachment. I am afraid it needs the very latest MasmBasic package (
7 Dec 2012), and you will have to open the attached file in \Masm32\RichMasm\RichMasm.exe
Once you see it in RichMasm,
hit F6, click OK and go to System Apps, User plugin. You'll get all the messages of the main WndProc plus those of the subclassed RichEdit control. Move the mouse over the borders of the table and see what comes along. The 1080 etc messages look interesting.
The plugin technique is that you supply two WndProcs (
$exp) which RichMasm uses before starting the normal processing. You return in edx a flag that tells RichMasm to either
- continue its own tailored processing (edx=0)
- return eax (edx=-1)
- continue with DefWindowProc (edx=-2)
Kind of hooking the editor (there is also the simpler PiEntryPoint export, like for qEditor plugins).
Here is the relevant code in RichMasm's main WndProc:
WndProc proc hWin:DWORD, uMsg:DWORD, wParam:DWORD, lParam:DWORD
...
mov ecx, PluginCbMain
jecxz @F
push lParam
push wParam
push uMsg
push hWin
call ecx ; call the plugin WndProc
inc edx ; edx=0->1: proceed
jg @F
jne DWP ; -2->-1: only defwinproc
pop ebx ; -1->0: return eax
pop edi
pop esi
ret
@@:
SWITCH uMsgP.S.: To modify the plugin, go to System Apps, hold Shift and click User plugin. This unloads the DLL and lets you build the new version, which is then available again in System Apps.