mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
03468f7d4b
Sun Feb 15 12:02:59 1998 Alexandre Julliard <julliard@lrc.epfl.ch> * [graphics/x11drv/*.c] [objects/*.c] A few X11 critical section optimizations, mostly with XGet/PutPixel. * [scheduler/sysdeps.c] [misc/main.c] Make sure X11 critical section is available before any Xlib call. * [if1632/relay.c] [tools/build.c] Yet another attempt at fixing Catch/Throw. * [loader/pe_image.c] Fixed broken PE DLL loading. * [include/winnt.h] [scheduler/handle.c] [scheduler/*.c] Implemented handle access rights. Added Get/SetHandleInformation. Sun Feb 15 09:45:23 1997 Andreas Mohr <100.30936@germany.net> * [misc/winsock.c] Fixed bug in WSACleanup which lead to crashes in WINSOCK_HandleIO. * [graphics/fontengine.c] [include/font.h] Minor improvements. * [memory/global.c] Implemented GlobalEntryHandle. * [misc/toolhelp.c] Fixed a memory bug in Notify*register. * [misc/w32scomb.c] Improved Get16DLLAddress. * [objects/gdiobj.c] Implemented GdiSeeGdiDo. Sat Feb 14 14:57:39 1998 John Richardson <jrichard@zko.dec.com> * [win32/console.c] Added the console implementation, AllocConsole, FreeConsole, CONSOLE_InheritConsole. * [documentation/console] Some documentation on the console. * [include/winerror.h] Added some error defines. * [scheduler/k32obj.c] Registered the scheduler ops. Fri Feb 13 19:35:35 1998 James Moody <013263m@dragon.acadiau.ca> * [ole/ole2nls.c] Some English language fixes for missing values. * [controls/listbox.c] Fix to allow an empty listbox to deselect all items. * [relay32/user32.spec] [windows/keyboard.c] CreateAcceleratorTableA stub method. * [windows/sysmetrics.c] Added missing SM_CXCURSOR & SM_CYCURSOR initializers. * [windows/message.c] PostThreadMessage32A stub method. Fri Feb 13 17:12:24 1998 Jim Peterson <jspeter@roanoke.infi.net> * [libtest/hello3res.rc] [libtest/hello3.c] [libtest/Makefile.in] Updated the 'hello3' test so that it functions properly again. Fri Feb 13 14:08:07 1998 Martin Boehme <boehme@informatik.mu-luebeck.de> * [graphics/mapping.c] Fixed the embarrassing bugs I introduced into DPtoLP and LPtoDP. * [windows/scroll.c] Prevent ScrollWindow32 from sending WM_ERASEBKGND. Thu Feb 12 22:46:53 1998 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [objects/metafile] [include/ldt.h] Fix to cope with records longer than 64K. * [windows/clipboard.c] Clean up bitmaps and metapicts properly. Mon Feb 3 21:52:18 1998 Karl Backström <karl_b@geocities.com> * [programs/winhelp/Sw.rc] [resources/sysres_Sw.rc] Minor update of Swedish language support.
103 lines
2.4 KiB
C
103 lines
2.4 KiB
C
#include <windows.h>
|
|
#include <resource.h>
|
|
#include "hello3res.h"
|
|
#include <commdlg.h>
|
|
|
|
BOOL FileOpen(HWND hWnd)
|
|
{
|
|
char filename[80] = "test.c";
|
|
OPENFILENAME ofn = { sizeof(OPENFILENAME),
|
|
hWnd, NULL, "C code\0*.c\0", NULL, 0, 0, filename, 80,
|
|
NULL, 0, NULL, NULL, OFN_CREATEPROMPT |
|
|
OFN_SHOWHELP, 0, 0, NULL, 0, NULL };
|
|
return GetOpenFileName(&ofn);
|
|
}
|
|
|
|
BOOL CALLBACK DlgProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
|
{
|
|
switch(msg)
|
|
{
|
|
case WM_INITDIALOG:
|
|
return 1;
|
|
case WM_COMMAND:
|
|
if(wParam==100)
|
|
DestroyWindow(hWnd);
|
|
return 0;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
LRESULT WndProc (HWND wnd, UINT msg, WPARAM w, LPARAM l)
|
|
{
|
|
switch (msg){
|
|
|
|
case WM_COMMAND:
|
|
switch(w){
|
|
case 100:
|
|
CreateDialogIndirect(0,hello3res_DIALOG_DIADEMO.bytes,wnd,(WNDPROC)DlgProc);
|
|
return 0;
|
|
case 101:
|
|
{
|
|
BITMAPINFO *bm=(BITMAPINFO*)hello3res_BITMAP_BITDEMO.bytes;
|
|
char *bits=(char*)bm;
|
|
HDC hdc=GetDC(wnd);
|
|
bits+=bm->bmiHeader.biSize;
|
|
bits+=(1<<bm->bmiHeader.biBitCount)*sizeof(RGBQUAD);
|
|
SetDIBitsToDevice(hdc,0,0,bm->bmiHeader.biWidth,
|
|
bm->bmiHeader.biHeight,0,0,0,bm->bmiHeader.biHeight,
|
|
bits,bm,DIB_RGB_COLORS);
|
|
ReleaseDC(wnd,hdc);
|
|
return 0;
|
|
}
|
|
case 102:
|
|
FileOpen(wnd);
|
|
return 0;
|
|
default:
|
|
return DefWindowProc (wnd, msg, w, l);
|
|
}
|
|
case WM_DESTROY:
|
|
PostQuitMessage (0);
|
|
break;
|
|
|
|
default:
|
|
return DefWindowProc (wnd, msg, w, l);
|
|
}
|
|
return 0l;
|
|
}
|
|
|
|
int PASCAL WinMain (HANDLE inst, HANDLE prev, LPSTR cmdline, int show)
|
|
{
|
|
HWND wnd;
|
|
MSG msg;
|
|
WNDCLASS class;
|
|
char className[] = "class"; /* To make sure className >= 0x10000 */
|
|
char winName[] = "Test app";
|
|
|
|
if (!prev){
|
|
class.style = CS_HREDRAW | CS_VREDRAW;
|
|
class.lpfnWndProc = WndProc;
|
|
class.cbClsExtra = 0;
|
|
class.cbWndExtra = 0;
|
|
class.hInstance = inst;
|
|
class.hIcon = LoadIcon (0, IDI_APPLICATION);
|
|
class.hCursor = LoadCursor (0, IDC_ARROW);
|
|
class.hbrBackground = GetStockObject (WHITE_BRUSH);
|
|
class.lpszMenuName = 0;
|
|
class.lpszClassName = (SEGPTR)className;
|
|
}
|
|
if (!RegisterClass (&class))
|
|
return FALSE;
|
|
|
|
wnd = CreateWindow (className, winName, WS_OVERLAPPEDWINDOW,
|
|
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, 0,
|
|
LoadMenu(inst,"MAIN"), inst, 0);
|
|
ShowWindow (wnd, show);
|
|
UpdateWindow (wnd);
|
|
|
|
while (GetMessage (&msg, 0, 0, 0)){
|
|
TranslateMessage (&msg);
|
|
DispatchMessage (&msg);
|
|
}
|
|
return 0;
|
|
}
|