Fixed various bugs introduced by previous commit.

Signed-off-by: Xiaomao Chen <xiaomao5@live.com>
This commit is contained in:
Quantum 2013-09-07 20:49:02 -04:00
parent 053a308d6a
commit df3493dbcd
2 changed files with 9 additions and 4 deletions

View file

@ -11,8 +11,8 @@ void MainWindow::OnLoadFile()
HANDLE file = INVALID_HANDLE_VALUE, mapping = 0;
LPSTR data = NULL;
LPWSTR storage = NULL;
int codepage = 0
DWORD size = 0, length = 0;
int codepage;
DWORD size, length;
ofn.hwndOwner = m_hwnd;
ofn.lpstrFilter = L"Text Files (*.txt)\0*.txt\0All Files (*.*)\0*.*\0";
@ -88,8 +88,8 @@ void MainWindow::OnSaveFile()
LPSTR storage = NULL;
HANDLE file = INVALID_HANDLE_VALUE;
HLOCAL buf = NULL;
int codepage = 0;
DWORD length = 0, size = 0, written = 0;
int codepage;
DWORD length, size, written;
ofn.hwndOwner = m_hwnd;
ofn.lpstrFilter = L"Text Files (*.txt)\0*.txt\0All Files (*.*)\0*.*\0";

View file

@ -3,6 +3,11 @@
#include <resource.h>
#include <windowsx.h>
#ifndef max
#define max(a, b) (((a) > (b)) ? (a) : (b))
#define min(a, b) (((a) < (b)) ? (a) : (b))
#endif
LRESULT PreviewWindow::OnCreate()
{
LOGFONT lf;