You're just in time to ask these sort of questions, since I've been digging into PSPad's internals a bit lately - for my Recent File Pane extension (viz http://forum.pspad.com/read.php?2,40752 ) and my forthcoming intellisense extension.
The TCustomSynEdit control responds to the following messages: WM_CANCELMODE, WM_CAPTURECHANGED, WM_CHAR, WM_CLEAR, WM_COPY, WM_CUT, WM_DROPFILES, WM_ERASEBKGND, WM_GETDLGCODE, WM_GETTEXT, WM_GETTEXTLENGTH, WM_HSCROLL, WM_PASTE, WM_SETTEXT, WM_IME_CHAR, WM_IME_COMPOSITION, WM_IME_NOTIFY, WM_KILLFOCUS, WM_MOUSEWHEEL, WM_SETCURSOR, WM_SETFOCUS, WM_SIZE, WM_UNDO, WM_VSCROLL WM_GETTEXT and WM_GETTEXTLENGTH work just fine, although for PSPad they work with UTF-16 strings as the control is a unicode window. For the font and caret settings, I don't really know. If you can get the font settings then you can call GetCaretPos() and calculate the caret position. Another thought would be to get the caret position from the status bar - send SB_GETTEXTA with 0 as your wParam and you'll get the string containing the caret positions, which you can then parse, assuming its format won't change with future versions. Once you have the caret position you can work out the font size (with GetCaretPos, ClientToScreen, and a divide). The font face will be a bigger problem. You can read the font face from the ini file at at application startup, and then track the font dialog. PSPAD.EXE's IAT is blank so if you want to trap the function call you'll have to use function overwriting, not IAT patching. It might be easier to use a CBT hook to watch for the dialog creation and then subclass. Either way is quite a bit of work though. -- <http://forum.pspad.com/read.php?2,40766,40768> PSPad freeware editor http://www.pspad.com
