Release 941107
Sun Nov 6 18:52:04 1994 Alexandre Julliard (julliard@lamisun.epfl.ch)
* [objects/oembitmap.c] (New file)
Added possibility to use .xpm files for OEM bitmaps.
* [include/bitmaps/obm*] (New files)
Redrawn all OEM bitmaps in xpm format.
* [objects/font.c]
Add space for internal leading when using a negative font height.
Stubs for AddFontResource() and RemoveFontResource().
Fix in FONT_Init() for uninitialised default font.
* [windows/dialog.c]
Make font height negative as it is really a point size and not a
pixel size; dialogs using 8-point fonts look better now.
* [windows/graphics.c]
Fixed the fix :-) for Pie() to make it work for Arc() and Chord() also.
* [windows/nonclient.c]
A few changes for new OEM bitmaps.
Sun Nov 6 18:22:18 1994 Michael Patra <micky@marie.physik.tu-berlin.de>
* [windows/class.c]
The names of local classes have to be stored using GlobalAtom*.
Otherwise they couldn't be accessed from other modules (e.g. BWCC)
* [if1632/call.S]
CallTo16(cx): It's possible to set the contents of the cx-register.
* [loader/ne_image.c]
InitNEDLL(): The size of the local heap is now passed in the cx-
register when initializing a DLL.
* [memory/heap.c]
LocalInit(): The case start==0 is now handled in the way it should.
* [windows/win.c]
GetWindowLong(): If the adress of the windows function is requested
it's no longer returned if it's within the Wine code (and therefore
unreachable by a windows program). This makes Borland's OWL happy.
* [controls/edit.c]
EDIT_GetStr(): Added handling for off<0.
Sun Nov 6 17:37:14 1994 Chris Jones <chrisj@ichips.intel.com>
* [loader/library.c]
Fixed infinite loop bug when two DLLs refer to each other (fixes
hangup of Quicken during loading).
Thu Nov 04 12:00:00 1994 Jan Willamowius (jan@janhh.sh.sub.de)
* [misc/dos_fs.c]
Bug fix: The size of a disk an the available space
is now returned in bytes instead of (incorrectly)
KBytes.
Thu Nov 03 12:00:00 1994 Jan Willamowius (jan@janhh.sh.sub.de)
* [windows/graphics.c]
Bug fix: Pie segments are now filled with correct brush.
Thu Nov 3 10:40:09 1994 Martin von Loewis (martin@cs.csufresno.edu)
* [Imakefile]
generate rc.o before loader.o
* [controls/menu.c]
CopySysMenu: generate SYSMENU on the fly, eliminate hSysMenu
* [include/resource.h]
Add struct ResourceTable
* [loader/bitmap.h]
Load system bitmaps from sysresbmTable
* [misc/clipboard.c]
[windows/event.c]
IsClipboardFormatAvailable,EVENT_SelectionRequest: bug fixes
* [rc/Imakefile]
generate rc.o from sysres.o and sysresbm.o. Added -lfl
* [rc/rc.y]
change style handling to allow ( S1 | S2 ) | S3
* [rc/sysres.rc]
[rc/sysresbm.rc]
Put bitmaps and icons to sysresbm, everything else to sysres
* [rc/winerc.c]
[rc/winerc.h]
Added -o, -c flags. New function set_out_file. Output to files.
* [windows/dialog.c]
DialogBoxIndirectPtr, DialogBoxIndirectParamPtr: New functions
* [windows/nonclient.c]
Create AboutWine dialog from template pointer
diff --git a/windows/class.c b/windows/class.c
index 5999d69..6c6ae7b 100644
--- a/windows/class.c
+++ b/windows/class.c
@@ -28,7 +28,7 @@
* Return a handle and a pointer to the class.
* 'ptr' can be NULL if the pointer is not needed.
*/
-HCLASS CLASS_FindClassByName( char * name, CLASS **ptr )
+HCLASS CLASS_FindClassByName( char * name, WORD hinstance, CLASS **ptr )
{
ATOM atom;
HCLASS class;
@@ -36,13 +36,14 @@
/* First search task-specific classes */
- if ((atom = FindAtom( name )) != 0)
+ if ((atom = /*FindAtom*/GlobalFindAtom( name )) != 0)
{
for (class = firstClass; (class); class = classPtr->hNext)
{
classPtr = (CLASS *) USER_HEAP_ADDR(class);
if (classPtr->wc.style & CS_GLOBALCLASS) continue;
- if (classPtr->atomName == atom)
+ if ((classPtr->atomName == atom) &&
+ (( hinstance==0xffff )|| (hinstance == classPtr->wc.hInstance)))
{
if (ptr) *ptr = classPtr;
return class;
@@ -101,7 +102,8 @@
/* Check if a class with this name already exists */
- prevClass = CLASS_FindClassByName( class->lpszClassName, &prevClassPtr );
+ prevClass = CLASS_FindClassByName( class->lpszClassName, class->hInstance,
+ &prevClassPtr );
if (prevClass)
{
/* Class can be created only if it is local and */
@@ -124,9 +126,9 @@
newClass->wc.cbWndExtra = (class->cbWndExtra < 0) ? 0 : class->cbWndExtra;
newClass->wc.cbClsExtra = classExtra;
- if (newClass->wc.style & CS_GLOBALCLASS)
+ /*if (newClass->wc.style & CS_GLOBALCLASS)*/
newClass->atomName = GlobalAddAtom( class->lpszClassName );
- else newClass->atomName = AddAtom( class->lpszClassName );
+ /*else newClass->atomName = AddAtom( class->lpszClassName );*/
newClass->wc.lpszClassName = NULL;
if (newClass->wc.style & CS_CLASSDC)
@@ -161,7 +163,7 @@
CLASS * classPtr, * prevClassPtr;
/* Check if we can remove this class */
- class = CLASS_FindClassByName( className, &classPtr );
+ class = CLASS_FindClassByName( className, instance, &classPtr );
if (!class) return FALSE;
if ((classPtr->wc.hInstance != instance) || (classPtr->cWindows > 0))
return FALSE;
@@ -186,8 +188,8 @@
/* Delete the class */
if (classPtr->hdce) DCE_FreeDCE( classPtr->hdce );
if (classPtr->wc.hbrBackground) DeleteObject( classPtr->wc.hbrBackground );
- if (classPtr->wc.style & CS_GLOBALCLASS) GlobalDeleteAtom( classPtr->atomName );
- else DeleteAtom( classPtr->atomName );
+ /*if (classPtr->wc.style & CS_GLOBALCLASS)*/ GlobalDeleteAtom( classPtr->atomName );
+ /*else DeleteAtom( classPtr->atomName );*/
if ((int)classPtr->wc.lpszMenuName & 0xffff0000)
USER_HEAP_FREE( (int)classPtr->wc.lpszMenuName & 0xffff );
USER_HEAP_FREE( class );
@@ -262,6 +264,7 @@
WND *wndPtr;
CLASS *classPtr;
+ /* FIXME: We have the find the correct hInstance */
if (!(wndPtr = WIN_FindWndPtr(hwnd))) return 0;
if (!(classPtr = CLASS_FindClassPtr(wndPtr->hClass))) return 0;
@@ -277,7 +280,29 @@
{
CLASS *classPtr;
- if (!(CLASS_FindClassByName(lpClassName, &classPtr))) return FALSE;
+ if (HIWORD(lpClassName))
+ {
+ dprintf_class(stddeb, "GetClassInfo hInstance=%04x lpClassName=%s\n",
+ hInstance, lpClassName);
+ }
+ else
+ dprintf_class(stddeb, "GetClassInfo hInstance=%04x lpClassName=#%d\n",
+ hInstance, (int)lpClassName);
+
+
+ /* if (!(CLASS_FindClassByName(lpClassName, &classPtr))) return FALSE; */
+ if (!(CLASS_FindClassByName(lpClassName, hInstance, &classPtr)))
+ {
+ if (!HIWORD(lpClassName))
+ {
+ char temp[10];
+ sprintf(temp, "#%d", (int)lpClassName);
+ if (!(CLASS_FindClassByName(temp, hInstance, &classPtr))) return FALSE;
+
+ }
+ else return FALSE;
+ }
+
if (hInstance && (hInstance != classPtr->wc.hInstance)) return FALSE;
memcpy(lpWndClass, &(classPtr->wc), sizeof(WNDCLASS));