aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/PlatWin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r--win32/PlatWin.cxx24
1 files changed, 12 insertions, 12 deletions
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();