#include "wx/dcprint.h"
#include <string.h>
-#include <math.h>
#include "wx/os2/private.h"
static const int MM_POINTS = 9;
static const int MM_METRIC = 10;
-// usually this is defined in math.h
-#ifndef M_PI
- static const double M_PI = 3.14159265358979323846;
-#endif // M_PI
-
// ---------------------------------------------------------------------------
// private functions
// ---------------------------------------------------------------------------
if (!IsKindOf(CLASSINFO(wxPrinterDC)))
{
HBITMAP hBitmap = (HBITMAP)rBmp.GetHBITMAP();
- HBITMAP hBitmapOld;
+ HBITMAP hBitmapOld = NULLHANDLE;;
POINTL vPoint[4];
vY = OS2Y(vY,rBmp.GetHeight());
int l;
FONTMETRICS vFM; // metrics structure
BOOL bRc;
- char* pStr;
ERRORID vErrorCode; // last error id code
wxFont* pFontToUse = (wxFont*)pTheFont;
- char zMsg[128]; // DEBUG
+ wxChar zMsg[128]; // DEBUG
wxString sError;
if (!pFontToUse)
pFontToUse = (wxFont*)&m_font;
l = rsString.length();
- pStr = (PCH) rsString.c_str();
//
// In world coordinates.
//
bRc = ::GpiQueryTextBox( m_hPS
,l
- ,pStr
+ ,(PCH)rsString.c_str()
,TXTBOX_COUNT // return maximum information
,avPoint // array of coordinates points
);
vErrorCode = ::WinGetLastError(wxGetInstance());
sError = wxPMErrorToStr(vErrorCode);
// DEBUG
- sprintf(zMsg, "GpiQueryTextBox for %s: failed with Error: %lx - %s", pStr, vErrorCode, sError.c_str());
- (void)wxMessageBox( "wxWidgets Menu sample"
+ wxSprintf(zMsg, _T("GpiQueryTextBox for %s: failed with Error: %lx - %s"), rsString.c_str(), vErrorCode, sError.c_str());
+ (void)wxMessageBox( _T("wxWidgets Menu sample")
,zMsg
,wxICON_INFORMATION
);
wxSize wxDC::GetPPI() const
{
LONG lArray[CAPS_VERTICAL_RESOLUTION];
- int nWidth;
- int nHeight;
+ int nWidth = 0;
+ int nHeight = 0;
if(::DevQueryCaps( m_hDC
,CAPS_FAMILY