Merge branch 'master' of github.com:xiaomao5/MusicKeyboard

This commit is contained in:
Quantum 2013-06-14 19:10:14 -04:00
commit 01ac5a541f
2 changed files with 1 additions and 31 deletions

View file

@ -41,7 +41,7 @@ $(SRCDIR)\MainWindow.cpp: $(INCDIR)\MainWindow.hpp
$(SRCDIR)\PianoControl.cpp: $(INCDIR)\PianoControl.hpp $(SRCDIR)\PianoControl.cpp: $(INCDIR)\PianoControl.hpp
$(SRCDIR)\Keyboard.cpp: $(INCDIR)\MainWindow.hpp $(SRCDIR)\Keyboard.cpp: $(INCDIR)\MainWindow.hpp
$(SRCDIR)\Window.cpp: $(INCDIR)\Window.hpp $(SRCDIR)\Window.cpp: $(INCDIR)\Window.hpp
keyboard.rc: keyboard.ico keymap.bmp keyboard.rc: keyboard.ico
$(OUTDIR)\keyboard.res: keyboard.rc $(OUTDIR)\keyboard.res: keyboard.rc
$(RC) $(RCFLAGS) /fo$@ $** $(RC) $(RCFLAGS) /fo$@ $**

View file

@ -3,36 +3,6 @@
#include <windowsx.h> #include <windowsx.h>
#include <stdio.h> #include <stdio.h>
#define MessageErrorWndTitle(hwnd, e, t) MessageBox(hwnd, e, t, MB_ICONERROR)
#define MessageErrorWnd(hwnd, e) MessageBox(hwnd, e, T("Error!"), MB_ICONERROR)
#define MessageError(e) MessageErrorWnd(NULL, e)
#define MessageLastErrorWndTitle(hwnd, e, title)\
do { \
LPTSTR s; \
if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, e, 0, (LPTSTR)&s, 0, NULL) == 0) {\
TCHAR str[25]; \
snprintf(str, 25, T("%x"), str); \
MessageErrorWndTitle(hwnd, str, title); \
} else { \
MessageErrorWndTitle(hwnd, s, title); \
LocalFree(s); \
} \
} while (0)
#define MessageLastErrorWnd(hwnd, e) MessageLastErrorWndTitle(hwnd, e, T("Error!"))
#define MessageLastError(e) MessageLastErrorWnd(NULL, e)
#define MessageIntBox(hwnd, i, title, opt) \
do { \
CHAR buf[100]; \
sprintf_s(buf, 100, "%d", i); \
MessageBoxA(hwnd, buf, title, opt); \
} while (0)
#define MessageIntWndTitle(hwnd, i, title) MessageIntBox(hwnd, i, title, MB_ICONINFORMATION)
#define MessageIntWnd(hwnd, i) MessageIntWndTitle(hwnd, i, "Debug Info")
#define MessageInt(i) MessageIntWnd(NULL, i)
BOOL PianoControl::WinRegisterClass(WNDCLASS *pwc) BOOL PianoControl::WinRegisterClass(WNDCLASS *pwc)
{ {
return __super::WinRegisterClass(pwc); return __super::WinRegisterClass(pwc);