DWORD PASCAL lread(int fh, VOID FAR *pv, DWORD ul);
DWORD PASCAL lwrite(int fh, VOID FAR *pv, DWORD ul);
-BOOL WriteDIB (LPSTR szFile,HANDLE hdib);
+BOOL WriteDIB (LPTSTR szFile,HANDLE hdib);
WORD PaletteSize (VOID FAR * pv);
WORD DibNumColors (VOID FAR * pv);
// HANDLE DibFromBitmap (HBITMAP hbm, DWORD biStyle, WORD biBits, HPALETTE hpal);
BOOL PASCAL MakeBitmapAndPalette(HDC,HANDLE,HPALETTE *,HBITMAP *);
HPALETTE MakeDIBPalette(LPBITMAPINFOHEADER);
-BOOL ReadDIB(LPSTR lpFileName, HBITMAP *bitmap, HPALETTE *palette);
+BOOL ReadDIB(LPTSTR lpFileName, HBITMAP *bitmap, HPALETTE *palette);
/****************************************************************************
* *
* *
****************************************************************************/
-BOOL WriteDIB(LPSTR szFile, HANDLE hdib)
+BOOL WriteDIB(LPTSTR szFile, HANDLE hdib)
{
BITMAPFILEHEADER hdr;
LPBITMAPINFOHEADER lpbi;
if (!hdib)
return FALSE;
- fh = OpenFile(szFile, &of, OF_CREATE | OF_READWRITE);
+ fh = OpenFile(wxFNCONV(szFile), &of, OF_CREATE | OF_READWRITE);
if (fh == -1)
return FALSE;
* FALSE - otherwise
*
****************************************************************************/
-BOOL ReadDIB(LPSTR lpFileName, HBITMAP *bitmap, HPALETTE *palette)
+BOOL ReadDIB(LPTSTR lpFileName, HBITMAP *bitmap, HPALETTE *palette)
{
int fh;
LPBITMAPINFOHEADER lpbi;
/* Open the file and get a handle to it's BITMAPINFO */
- fh = OpenFile (lpFileName, &of, OF_READ);
+ fh = OpenFile (wxFNCONV(lpFileName), &of, OF_READ);
if (fh == -1) {
wsprintf(str,_T("Can't open file '%s'"), lpFileName);
MessageBox(NULL, str, _T("Error"), MB_ICONSTOP | MB_OK);
}
-bool wxLoadIntoBitmap(char *filename, wxBitmap *bitmap, wxPalette **pal)
+bool wxLoadIntoBitmap(wxChar *filename, wxBitmap *bitmap, wxPalette **pal)
{
HBITMAP hBitmap;
HPALETTE hPalette;
else return FALSE;
}
-wxBitmap *wxLoadBitmap(char *filename, wxPalette **pal)
+wxBitmap *wxLoadBitmap(wxChar *filename, wxPalette **pal)
{
wxBitmap *bitmap = new wxBitmap;
if (wxLoadIntoBitmap(filename, bitmap, pal))
return hDIB;
}
-bool wxSaveBitmap(char *filename, wxBitmap *bitmap, wxPalette *colourmap)
+bool wxSaveBitmap(wxChar *filename, wxBitmap *bitmap, wxPalette *colourmap)
{
HPALETTE hPalette = 0;
if (colourmap)