aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--doc/ScintillaHistory.html1
-rw-r--r--win32/PlatWin.cxx24
-rw-r--r--win32/ScintillaWin.cxx12
3 files changed, 19 insertions, 18 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index 4fd34f20e..7cf3c7a86 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -233,6 +233,7 @@
<li>Cristian Adam</li>
<li>Nicolas Chachereau</li>
<li>Istvan Szollosi</li>
+ <li>Xie Renhui</li>
</ul>
<p>
Images used in GTK+ version
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index dd3213bf9..5389ae57b 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -175,7 +175,7 @@ void Palette::Allocate(Window &) {
}
}
-static void SetLogFont(LOGFONT &lf, const char *faceName, int characterSet, int size, bool bold, bool italic) {
+static void SetLogFont(LOGFONTA &lf, const char *faceName, int characterSet, int size, bool bold, bool italic) {
memset(&lf, 0, sizeof(lf));
// The negative is to allow for leading
lf.lfHeight = -(abs(size));
@@ -202,7 +202,7 @@ static int HashFont(const char *faceName, int characterSet, int size, bool bold,
class FontCached : Font {
FontCached *next;
int usage;
- LOGFONT lf;
+ LOGFONTA lf;
int hash;
FontCached(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_);
~FontCached() {}
@@ -221,7 +221,7 @@ FontCached::FontCached(const char *faceName_, int characterSet_, int size_, bool
next(0), usage(0), hash(0) {
::SetLogFont(lf, faceName_, characterSet_, size_, bold_, italic_);
hash = HashFont(faceName_, characterSet_, size_, bold_, italic_);
- id = ::CreateFontIndirect(&lf);
+ id = ::CreateFontIndirectA(&lf);
usage = 1;
}
@@ -631,7 +631,7 @@ void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated
SelectBitmap(hMemDC, hbmOld);
::DeleteObject(hbmMem);
- ::DeleteObject(hMemDC);
+ ::DeleteDC(hMemDC);
} else {
BrushColor(outline);
RECT rcw = RectFromPRectangle(rc);
@@ -799,7 +799,7 @@ void SurfaceImpl::MeasureWidths(Font &font_, const char *s, int len, int *positi
positions[i++] = lastPos;
}
} else if (IsNT() || (codePage==0) || win9xACPSame) {
- if (!::GetTextExtentExPoint(hdc, s, Platform::Minimum(len, maxLenText),
+ if (!::GetTextExtentExPointA(hdc, s, Platform::Minimum(len, maxLenText),
maxWidthMeasure, &fit, positions, &sz)) {
// Eeek - a NULL DC or other foolishness could cause this.
// The least we can do is set the positions to zero!
@@ -841,7 +841,7 @@ void SurfaceImpl::MeasureWidths(Font &font_, const char *s, int len, int *positi
int SurfaceImpl::WidthChar(Font &font_, char ch) {
SetFont(font_);
SIZE sz;
- ::GetTextExtentPoint32(hdc, &ch, 1, &sz);
+ ::GetTextExtentPoint32A(hdc, &ch, 1, &sz);
return sz.cx;
}
@@ -1049,7 +1049,7 @@ void Window::SetCursor(Cursor curs) {
}
void Window::SetTitle(const char *s) {
- ::SetWindowText(reinterpret_cast<HWND>(id), s);
+ ::SetWindowTextA(reinterpret_cast<HWND>(id), s);
}
struct ListItemData {
@@ -1319,7 +1319,7 @@ PRectangle ListBoxX::GetDesiredRect() {
tbuf[len] = L'\0';
::GetTextExtentPoint32W(hdc, tbuf, len, &textSize);
} else {
- ::GetTextExtentPoint32(hdc, widestItem, len, &textSize);
+ ::GetTextExtentPoint32A(hdc, widestItem, len, &textSize);
}
TEXTMETRIC tm;
::GetTextMetrics(hdc, &tm);
@@ -1438,7 +1438,7 @@ void ListBoxX::Draw(DRAWITEMSTRUCT *pDrawItem) {
tbuf[tlen] = L'\0';
::DrawTextW(pDrawItem->hDC, tbuf, tlen, &rcText, DT_NOPREFIX|DT_END_ELLIPSIS|DT_SINGLELINE|DT_NOCLIP);
} else {
- ::DrawText(pDrawItem->hDC, text, len, &rcText, DT_NOPREFIX|DT_END_ELLIPSIS|DT_SINGLELINE|DT_NOCLIP);
+ ::DrawTextA(pDrawItem->hDC, text, len, &rcText, DT_NOPREFIX|DT_END_ELLIPSIS|DT_SINGLELINE|DT_NOCLIP);
}
if (pDrawItem->itemState & ODS_SELECTED) {
::DrawFocusRect(pDrawItem->hDC, &rcBox);
@@ -2012,7 +2012,7 @@ protected:
HMODULE h;
public:
DynamicLibraryImpl(const char *modulePath) {
- h = ::LoadLibrary(modulePath);
+ h = ::LoadLibraryA(modulePath);
}
virtual ~DynamicLibraryImpl() {
@@ -2063,7 +2063,7 @@ bool Platform::MouseButtonBounce() {
}
void Platform::DebugDisplay(const char *s) {
- ::OutputDebugString(s);
+ ::OutputDebugStringA(s);
}
bool Platform::IsKeyDown(int key) {
@@ -2135,7 +2135,7 @@ void Platform::Assert(const char *c, const char *file, int line) {
char buffer[2000];
sprintf(buffer, "Assertion [%s] failed at %s %d", c, file, line);
if (assertionPopUps) {
- int idButton = ::MessageBox(0, buffer, "Assertion failure",
+ int idButton = ::MessageBoxA(0, buffer, "Assertion failure",
MB_ABORTRETRYIGNORE|MB_ICONHAND|MB_SETFOREGROUND|MB_TASKMODAL);
if (idButton == IDRETRY) {
::DebugBreak();
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index acca53d6a..0d76e949f 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -369,7 +369,7 @@ static int InputCodePage() {
HKL inputLocale = ::GetKeyboardLayout(0);
LANGID inputLang = LOWORD(inputLocale);
char sCodePage[10];
- int res = ::GetLocaleInfo(MAKELCID(inputLang, SORT_DEFAULT),
+ int res = ::GetLocaleInfoA(MAKELCID(inputLang, SORT_DEFAULT),
LOCALE_IDEFAULTANSICODEPAGE, sCodePage, sizeof(sCodePage));
if (!res)
return 0;
@@ -1386,11 +1386,11 @@ void ScintillaWin::AddToPopUp(const char *label, int cmd, bool enabled) {
#ifdef TOTAL_CONTROL
HMENU hmenuPopup = reinterpret_cast<HMENU>(popup.GetID());
if (!label[0])
- ::AppendMenu(hmenuPopup, MF_SEPARATOR, 0, "");
+ ::AppendMenuA(hmenuPopup, MF_SEPARATOR, 0, "");
else if (enabled)
- ::AppendMenu(hmenuPopup, MF_STRING, cmd, label);
+ ::AppendMenuA(hmenuPopup, MF_STRING, cmd, label);
else
- ::AppendMenu(hmenuPopup, MF_STRING | MF_DISABLED | MF_GRAYED, cmd, label);
+ ::AppendMenuA(hmenuPopup, MF_STRING | MF_DISABLED | MF_GRAYED, cmd, label);
#endif
}
@@ -1725,7 +1725,7 @@ void ScintillaWin::ImeStartComposition() {
// Since the style creation code has been made platform independent,
// The logfont for the IME is recreated here.
int styleHere = (pdoc->StyleAt(currentPos)) & 31;
- LOGFONT lf = {0,0,0,0,0,0,0,0,0,0,0,0,0,TEXT("")};
+ LOGFONTA lf = {0,0,0,0,0,0,0,0,0,0,0,0,0, ""};
int sizeZoomed = vs.styles[styleHere].size + vs.zoomLevel;
if (sizeZoomed <= 2) // Hangs if sizeZoomed <= 1
sizeZoomed = 2;
@@ -1743,7 +1743,7 @@ void ScintillaWin::ImeStartComposition() {
if (vs.styles[styleHere].fontName)
strcpy(lf.lfFaceName, vs.styles[styleHere].fontName);
- ::ImmSetCompositionFont(hIMC, &lf);
+ ::ImmSetCompositionFontA(hIMC, &lf);
}
::ImmReleaseContext(MainHWND(), hIMC);
// Caret is displayed in IME window. So, caret in Scintilla is useless.