Hello.  Thanks for scintilla.  I've really gotten a lot of use out of it.

One thing: I often have autocomplete windows appearing behind the windows taskbar. You see, my application is using scintilla as a "command shell" at the bottom of our app window. So it's down there by the taskbar and it's not very tall.

Anyhow, I've implemented a solution for Win32 that seems to work. At least, I'm pretty happy with it.

In ScintillaBase::AutoCompleteStart instead of GetClientArea, I call a new function GetWorkAreaRelative. This gives the desktop work area in coordinates centered on the scintilla window. That way nothing else in the function is changed (that's good for me because I don't mess anything else up). At the very least, this code sample should illuminate what sort of behavior I am advocating for.

//get the coordinates of the desktop working area (minus any taskbars and
junk like that)
//expressed in coordinates relative to this window
PRectangle Window::GetWorkAreaRelative() {
   //rectangle of desktop working area
   RECT dt={0,0,0,0};
   SystemParametersInfo(SPI_GETWORKAREA, NULL, &dt, 0);
   //rectangle of this window in desktop coords
   RECT win={0,0,0,0};
   if (id)
       ::GetWindowRect(reinterpret_cast<HWND>(id), &win);
   //convert - more or less
return PRectangle(dt.left-win.left, dt.top-win.top, dt.right-win.left, dt.bottom-win.top);
}


_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to