sync with latest wine source tree

svn path=/trunk/; revision=5356
This commit is contained in:
Richard Campbell 2003-08-01 06:30:52 +00:00
parent 66615a0c8a
commit 50a9df0d98

View file

@ -40,31 +40,30 @@
#define DEBUG(x) #define DEBUG(x)
#endif #endif
#define SZ_APPNAME "ROSMine"
int WINAPI WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmdshow ) int WINAPI WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmdshow )
{ {
MSG msg; MSG msg;
WNDCLASS wc; WNDCLASS wc;
HWND hWnd; HWND hWnd;
HACCEL haccel; HACCEL haccel;
/*
char appname[9]; char appname[9];
LoadString doesn't appear to work properly under ROS
LoadString( hInst, IDS_APPNAME, appname, sizeof(appname)); LoadString( hInst, IDS_APPNAME, appname, sizeof(appname));
*/
wc.style = 0; wc.style = 0;
wc.lpfnWndProc = MainProc; wc.lpfnWndProc = MainProc;
wc.cbClsExtra = 0; wc.cbClsExtra = 0;
wc.cbWndExtra = 0; wc.cbWndExtra = 0;
wc.hInstance = hInst; wc.hInstance = hInst;
wc.hIcon = LoadIcon( hInst, SZ_APPNAME ); wc.hIcon = LoadIcon( hInst, appname );
wc.hCursor = LoadCursor( NULL_HANDLE, IDI_APPLICATION ); wc.hCursor = LoadCursor( NULL_HANDLE, IDI_APPLICATION );
wc.hbrBackground = (HBRUSH) GetStockObject( BLACK_BRUSH ); wc.hbrBackground = (HBRUSH) GetStockObject( BLACK_BRUSH );
wc.lpszMenuName = "MENU_WINEMINE"; wc.lpszMenuName = "MENU_WINEMINE";
wc.lpszClassName = SZ_APPNAME; wc.lpszClassName = appname;
if (!RegisterClass(&wc)) exit(1); if (!RegisterClass(&wc)) exit(1);
hWnd = CreateWindow( SZ_APPNAME, SZ_APPNAME, hWnd = CreateWindow( appname, appname,
WS_OVERLAPPEDWINDOW & ~WS_THICKFRAME & ~WS_MAXIMIZEBOX, WS_OVERLAPPEDWINDOW & ~WS_THICKFRAME & ~WS_MAXIMIZEBOX,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
NULL_HANDLE, NULL_HANDLE, hInst, NULL ); NULL_HANDLE, NULL_HANDLE, hInst, NULL );
@ -74,7 +73,7 @@ int WINAPI WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmd
ShowWindow( hWnd, cmdshow ); ShowWindow( hWnd, cmdshow );
UpdateWindow( hWnd ); UpdateWindow( hWnd );
haccel = LoadAccelerators( hInst, SZ_APPNAME ); haccel = LoadAccelerators( hInst, appname );
SetTimer( hWnd, ID_TIMER, 1000, NULL ); SetTimer( hWnd, ID_TIMER, 1000, NULL );
while( GetMessage(&msg, NULL_HANDLE, 0, 0) ) { while( GetMessage(&msg, NULL_HANDLE, 0, 0) ) {
@ -86,6 +85,7 @@ int WINAPI WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmd
return msg.wParam; return msg.wParam;
} }
LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{ {
HDC hdc; HDC hdc;