Page 8 of 38

Posted: Mon Jun 14, 2010 9:03 am
by Instructor
KDJ
Add "_" to word delimiter list. "Settings...->Advanced->Word delimiters"

FeyFre
Когда ошибка подчеркнута линия затирает символ "_" несмотря на то, что установлен междустрочный интервал. Чтобы этого не происходило, можно использовать следующий код:

Code: Select all

SendMessage(hWndEdit, AEM_GETCHARSIZE, AECS_HEIGHT, 0);
А это сообщение получает сам междустрочный интервал:

Code: Select all

SendMessage(hWndEdit, AEM_GETLINEGAP, 0, 0);

Posted: Mon Jun 14, 2010 10:31 am
by FeyFre
Instructor
Пользуюсь обоими для 4.x.x

Code: Select all

		dc = GetDC(hWnd);
		hFont=CreateFontIndirectW((LOGFONTW *)SendMessage(hMainWindow, AKD_GETFONTW, (WPARAM)hWnd, 0));
		LONG shift = 0;
		LONG tmHeightLocal;
		if (bAkelEdit)
		{
			tmHeightLocal = shift = SendMessageW(hWnd, AEM_GETCHARSIZE, AECS_HEIGHT, 0)-1;
			shift -= SendMessageW(hWnd, AEM_GETLINEGAP,0,0);
		}
		else
			shift = (tmHeightLocal = tm.tmHeight) - 1;
(shift - смещение от верхнего края строки, там будет рисоваться линия)
Опускать ниже пробовал... не вариант(при отрисовке нижней строки окна при нулевом междустрочным линии вообще не было, видать выходило за регион перерисовки)

Posted: Mon Jun 14, 2010 10:52 am
by Instructor
FeyFre
Ну можно как-нибудь так:

Code: Select all

         gap = SendMessageW(hWnd, AEM_GETLINEGAP,0,0);
         shift -= gap;
         if (gap > 0) shift += 1;
Если это имеет значение, в первом варианте tmHeightLocal будет на единицу меньше, чем в RichEdit.

Posted: Mon Jun 14, 2010 12:32 pm
by FeyFre
Instructor
Можно(но я что-то не хочу в этот кусок лазить.... там по коду 5-кратное вложение if, и 3-кратное while - как бы чего не поломать :lol:)
Если это имеет значение, в первом варианте tmHeightLocal будет на единицу меньше, чем в RichEdit.
В обоих вариантах одинаково(и там, и там есть вычитается 1 из высоты, только для RichEdit беру высоту из TextMetrics шрифта(hOldFont=(HFONT)SelectObject(dc, hFont);GetTextMetricsW(dc,&tm);), а для AkelEdit спрашиваю у него).


ЗЫ: получили ответ? я с другого ящика отсылал.

Posted: Mon Jun 14, 2010 1:00 pm
by Instructor
Всего кода мне не видно, но из того что есть - во втором варианте:

Code: Select all

shift = (tmHeightLocal = tm.tmHeight) - 1;
tmHeightLocal будет равен tm.tmHeight, но не tm.tmHeight - 1. Приглядитесь :)

Ответа нет.

Posted: Mon Jun 14, 2010 1:08 pm
by FeyFre
Instructor
Приглядитесь
Забили. Я вчера целые сутки не мог заставить отладчик студии подхватывать библиотеку(при чем древнейший ntsd всё хватает), злой как бегемот.

Posted: Mon Jun 14, 2010 7:53 pm
by KDJ
Instructor, FeyFre
Add "_" to word delimiter list.
This solves the problem of the sign '_'.

But what to do with numbers and dates "123789", "15-06-2010"?
Whether to add "0123456789" to the list of delimiters?
Then the keyboard shortcuts Ctrl+Left, Ctrl+Right are acting strangely - they are jumping over all numbers and dates.

Posted: Tue Jun 15, 2010 7:51 am
by FeyFre
Then the keyboard shortcuts Ctrl+Left, Ctrl+Right are acting strangely - they are jumping over all numbers and dates.
They acting as you setup them(jump to begin of word, jump to end of word, skipping all delimiters). So SpellCheck will, and so will not mark them as incorrect "words".

Posted: Tue Jun 15, 2010 6:06 pm
by KDJ
Now check spelling does not mark as wrong numbers and dates ("123789", "15-06-2010").
But the use of digits as a separator of words seems to me strange and unnatural.

Posted: Tue Jun 15, 2010 9:18 pm
by FeyFre
But the use of digits as a separator of words seems to me strange and unnatural.
The choice is yours. I'll try to implement this feature letter, after 1.0 release(probably you have noticed that plugin in FeatureFreeze state). For now, there are a lot of undone work in SpellCheck to make it fully compatible with AkelPad, before I'll have right to declare "SpellCheck is stable".

Posted: Sat Jun 19, 2010 9:51 am
by FeyFre
Обновление 1.0 RC

Updated to 1.0 RC

Posted: Thu Jun 24, 2010 8:21 pm
by KDJ
If you remove "\n" from the list of words delimiters and you enable function "SpellCheck:: Background", then AkelPad is hung.

Posted: Fri Jun 25, 2010 8:56 am
by FeyFre
KDJ
That was definitely bad idea. :wink:

Fixed in RC2.

Posted: Sat Jun 26, 2010 1:35 pm
by FeyFre
Обновление 1.0 RC2

Updated to 1.0 RC2

Posted: Sat Jun 26, 2010 3:29 pm
by KDJ
FeyFre
You forgot to update the link to your file.
I found it. It is here: http://staynormal.org.ua/aspell/SpellCheck-RC2.7z
Now it works well.
Even you can do so that the ESC key and Alt+F4 and click the mouse on the button [x], causing closure of the window "SpellCheck::CheckDocument".
Now working as pressing the "Skip" button.