- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
//// AEM_* AkelEdit control messages
if (uMsg >= WM_USER)
{
if (uMsg >= AEM_CANUNDO)
goto CanUndo;
//Text retrieval and modification
if (uMsg == AEM_EXSETTEXTA)
{
AESETTEXTA *at=(AESETTEXTA *)lParam;
return AE_SetTextAnsi(ae, at->nCodePage, at->pText, at->dwTextLen, at->nNewLine);
}
if (uMsg == AEM_EXSETTEXTW)
{
AESETTEXTW *at=(AESETTEXTW *)lParam;
return AE_SetText(ae, at->pText, at->dwTextLen, at->nNewLine, FALSE);
}
if (uMsg == AEM_SETTEXTA)
{
return AE_SetTextAnsi(ae, CP_ACP, (char *)lParam, wParam, AELB_ASINPUT);
}
if (uMsg == AEM_SETTEXTW)
{
return AE_SetText(ae, (wchar_t *)lParam, wParam, AELB_ASINPUT, FALSE);
}
if (uMsg == AEM_APPENDTEXTA)
{
AEAPPENDTEXTA *at=(AEAPPENDTEXTA *)lParam;
AE_AppendTextAnsi(ae, at->nCodePage, at->pText, at->dwTextLen, at->nNewLine);
return 0;
}
if (uMsg == AEM_APPENDTEXTW)
{
AEAPPENDTEXTW *at=(AEAPPENDTEXTW *)lParam;
AE_AppendText(ae, at->pText, at->dwTextLen, at->nNewLine);
return 0;
}
if (uMsg == AEM_REPLACESELA)
{
AEREPLACESELA *rs=(AEREPLACESELA *)lParam;
AE_ReplaceSelAnsi(ae, rs->nCodePage, rs->pText, rs->dwTextLen, rs->nNewLine, rs->dwFlags, rs->ciInsertStart, rs->ciInsertEnd);
return 0;
}
if (uMsg == AEM_REPLACESELW)
{
AEREPLACESELW *rs=(AEREPLACESELW *)lParam;
AE_ReplaceSel(ae, rs->pText, rs->dwTextLen, rs->nNewLine, rs->dwFlags, rs->ciInsertStart, rs->ciInsertEnd);
return 0;
}
if (uMsg == AEM_GETTEXTRANGEA)
{
AETEXTRANGEA *tr=(AETEXTRANGEA *)lParam;
return AE_GetTextRangeAnsi(ae, tr->nCodePage, tr->lpDefaultChar, tr->lpUsedDefChar, &tr->cr.ciMin, &tr->cr.ciMax, tr->pBuffer, tr->dwBufferMax, tr->nNewLine, tr->bColumnSel, tr->bFillSpaces);
}
И далее около сотни if'ов в таком духе.
AkelPad
Анонимус 25.11.2014 18:48 # +2
ЗЫ: только там у меня был свич, конечно