#if wxUSE_RESOURCES
bool wxWriteResource(const wxString& section, const wxString& entry, const wxString& value, const wxString& file)
{
- if (file != wxT(""))
+ if (file != wxEmptyString)
// Don't know what the correct cast should be, but it doesn't
// compile in BC++/16-bit without this cast.
#if !defined(__WIN32__)
static const wxChar defunkt[] = wxT("$$default");
wxChar buf[1024];
- if (file != wxT(""))
+ if (file != wxEmptyString)
{
int n = GetPrivateProfileString(section, entry, defunkt,
buf, WXSIZEOF(buf), file);
return FALSE;
}
if (*value) delete[] (*value);
- *value = copystring(buf);
+ *value = wxStrcpy(new wxChar[wxStrlen(buf) + 1], buf);
return TRUE;
}
if ( hWnd )
{
int len = GetWindowTextLength((HWND)hWnd) + 1;
- ::GetWindowText((HWND)hWnd, str.GetWriteBuf(len), len);
- str.UngetWriteBuf();
+ ::GetWindowText((HWND)hWnd, wxStringBuffer(str, len), len);
}
return str;
for ( ;; )
{
- int count = ::GetClassName((HWND)hWnd, str.GetWriteBuf(len), len);
+ int count = ::GetClassName((HWND)hWnd, wxStringBuffer(str, len), len);
- str.UngetWriteBuf();
if ( count == len )
{
// the class name might have been truncated, retry with larger
*y /= (iHeightMM * 100);
}
+void wxDrawLine(HDC hdc, int x1, int y1, int x2, int y2)
+{
+#ifdef __WXWINCE__
+ POINT points[2];
+ points[0].x = x1;
+ points[0].y = y1;
+ points[1].x = x2;
+ points[1].y = y2;
+ Polyline(hdc, points, 2);
+#else
+ MoveToEx(hdc, x1, y1, NULL); LineTo((HDC) hdc, x2, y2);
+#endif
+}
+