Plug-in creation

gulhaugen

Member²
Hi

I was wondering, after looking pretty closely at the plugindoc.pdf, how to intercept the "Compile/F8" button for program window.
What I want to do is modify the package header.

I have achieved this through clicking a menu button, but I need it to happen on every time a compile happens.
 
This is indeed not yet possible. You are not the first to ask though, and this will be added in 7.1.4, which will be available shortly. There will be a BeforeExecute and an AfterExecute function.
 
Hi

Is it possible to get the current scrollbar position in the current editor, to set it again later?

I have developed a plugin that does some changes to the current text in the window, and when it's finnished, the scrollbar ends up at the top.

As an intermediate step, I used the GetCursorX/Y and SetCursor, but it still changes the scrollbar position a bit, since it only controls the word at the cursor position.
 
This should be possible with standard Windows editor messages (EM_XXX) based on the handle of the editor (IDE_GetEditorHandle).
 
Thanks a lot, my plugin now functions as expected.

However, there something I'm wondering about:
It seems I cannot get the EM_GETSCROLLPOS and EM_SETSCROLLPOS to work. I had to turn to EM_GETFIRSTVISIBLELINE and EM_LINESCROLL to return to the scroll position I had before. It also seems that EM_XXXSCROLLPOS is new in RichEdit 3.

This makes it difficult to restore the horizontal scroll position. It is rarely needed, so it is no biggie
 
Back
Top