Added DnD cursors as ole32 resources.

This commit is contained in:
Huw D M Davies 2000-11-05 20:16:15 +00:00 committed by Alexandre Julliard
parent 740bb92b5a
commit 96569102d9
7 changed files with 193 additions and 5 deletions

View File

@ -2,3 +2,4 @@
*.spec.glue.s *.spec.glue.s
Makefile Makefile
libole32.so.1.0 libole32.so.1.0
ole32res.res

View File

@ -26,12 +26,16 @@ C_SRCS = \
ole2stubs.c \ ole2stubs.c \
ole2impl.c \ ole2impl.c \
ole2nls.c \ ole2nls.c \
ole32_main.c \
oleobj.c \ oleobj.c \
stg_bigblockfile.c \ stg_bigblockfile.c \
stg_stream.c \ stg_stream.c \
storage.c \ storage.c \
storage32.c storage32.c
RC_SRCS = \
ole32res.rc
@MAKE_DLL_RULES@ @MAKE_DLL_RULES@
### Dependencies: ### Dependencies:

View File

@ -25,6 +25,7 @@
#include "debugtools.h" #include "debugtools.h"
#include "ole2ver.h" #include "ole2ver.h"
#include "winreg.h" #include "winreg.h"
#include "ole32_main.h"
DEFAULT_DEBUG_CHANNEL(ole); DEFAULT_DEBUG_CHANNEL(ole);
@ -1920,15 +1921,21 @@ static void OLEDD_TrackMouseMove(
*/ */
if (hr==DRAGDROP_S_USEDEFAULTCURSORS) if (hr==DRAGDROP_S_USEDEFAULTCURSORS)
{ {
if ( (*trackerInfo->pdwEffect & DROPEFFECT_MOVE) || if (*trackerInfo->pdwEffect & DROPEFFECT_MOVE)
(*trackerInfo->pdwEffect & DROPEFFECT_COPY) ||
(*trackerInfo->pdwEffect & DROPEFFECT_LINK) )
{ {
SetCursor(LoadCursorA(0, IDC_SIZEALLA)); SetCursor(LoadCursorA(OLE32_hInstance, MAKEINTRESOURCEA(1)));
}
else if (*trackerInfo->pdwEffect & DROPEFFECT_COPY)
{
SetCursor(LoadCursorA(OLE32_hInstance, MAKEINTRESOURCEA(2)));
}
else if (*trackerInfo->pdwEffect & DROPEFFECT_LINK)
{
SetCursor(LoadCursorA(OLE32_hInstance, MAKEINTRESOURCEA(3)));
} }
else else
{ {
SetCursor(LoadCursorA(0, IDC_NOA)); SetCursor(LoadCursorA(OLE32_hInstance, MAKEINTRESOURCEA(0)));
} }
} }
} }

View File

@ -1,5 +1,7 @@
name ole32 name ole32
type win32 type win32
init OLE32_DllEntryPoint
rsrc ole32res.res
import advapi32.dll import advapi32.dll
import user32.dll import user32.dll

37
dlls/ole32/ole32_main.c Normal file
View File

@ -0,0 +1,37 @@
/*
* OLE32 Initialization
*
*/
#include "windef.h"
#include "ole32_main.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(ole);
HINSTANCE OLE32_hInstance = 0;
static INT OLE32_RefCount = 0;
/*************************************************************************
* OLE32_DllEntryPoint
*
*/
BOOL WINAPI OLE32_DllEntryPoint(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
{
TRACE("0x%x 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad);
switch(fdwReason) {
case DLL_PROCESS_ATTACH:
if(OLE32_hInstance == 0)
OLE32_hInstance = hinstDLL;
OLE32_RefCount++;
break;
case DLL_PROCESS_DETACH:
OLE32_RefCount--;
if(OLE32_RefCount == 0)
OLE32_hInstance = 0;
break;
}
return TRUE;
}

8
dlls/ole32/ole32_main.h Normal file
View File

@ -0,0 +1,8 @@
#ifndef __WINE_OLE32_MAIN_H
#define __WINE_OLE32_MAIN_H
#include "windef.h"
extern HINSTANCE OLE32_hInstance;
#endif /* __WINE_OLE32_MAIN_H */

129
dlls/ole32/ole32res.rc Normal file
View File

@ -0,0 +1,129 @@
/*
* Top level resource file for OLE32
*
*/
#include "windef.h"
#include "winuser.h"
#include "winnls.h"
/*
* Everything that does not depend on language,
* like textless bitmaps etc, go into the
* neutral language. This will prevent them from
* being duplicated for each language.
*/
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
0 CURSOR
/* BINRES nodrop.cur */
{
'00 00 02 00 01 00 20 20 00 00 0F 00 0F 00 30 01'
'00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00'
'00 00 01 00 01 00 00 00 00 00 80 00 00 00 00 00'
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
'00 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00'
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07'
'E0 00 00 18 18 00 00 20 04 00 00 43 E2 00 00 8C'
'11 00 01 10 20 80 01 20 44 80 02 20 8C 40 02 41'
'12 40 02 42 22 40 02 44 42 40 02 48 82 40 02 31'
'04 40 01 22 04 80 01 04 08 80 00 8C 31 00 00 43'
'C2 00 00 20 04 00 00 18 18 00 00 07 E0 00 00 00'
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
'00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF'
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F8'
'1F FF FF E0 07 FF FF C0 03 FF FF 80 01 FF FF 03'
'E0 FF FE 0F C0 7F FE 1F 80 7F FC 1F 00 3F FC 3E'
'0C 3F FC 3C 1C 3F FC 38 3C 3F FC 30 7C 3F FC 00'
'F8 3F FE 01 F8 7F FE 03 F0 7F FF 03 C0 FF FF 80'
'01 FF FF C0 03 FF FF E0 07 FF FF F8 1F FF FF FF'
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
'FF FF FF FF FF FF'
}
1 CURSOR
/* BINRES drag_move.cur */
{
'00 00 02 00 01 00 20 20 00 00 12 00 16 00 30 01'
'00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00'
'00 00 01 00 01 00 00 00 00 00 00 01 00 00 00 00'
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
'00 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00'
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
'00 00 05 55 00 00 0A AA 80 00 04 01 00 00 08 00'
'80 00 04 01 00 00 08 00 80 00 05 55 00 00 0A EA'
'80 00 00 C0 00 00 01 80 00 00 01 80 00 00 03 00'
'00 00 23 00 00 00 36 00 00 00 3E 00 00 00 3F C0'
'00 00 3F 80 00 00 3F 00 00 00 3E 00 00 00 3C 00'
'00 00 38 00 00 00 30 00 00 00 20 00 00 00 00 00'
'00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF'
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
'FF FF FA AA FF FF F5 55 7F FF FB FE FF FF F7 FF'
'7F FF FB FE FF FF F7 FF 7F FF FA AA FF FF F5 15'
'7F FF FE 1F FF FF FC 3F FF FF BC 3F FF FF 98 7F'
'FF FF 88 7F FF FF 80 FF FF FF 80 0F FF FF 80 1F'
'FF FF 80 3F FF FF 80 7F FF FF 80 FF FF FF 81 FF'
'FF FF 83 FF FF FF 87 FF FF FF 8F FF FF FF 9F FF'
'FF FF FF FF FF FF'
}
2 CURSOR
/* BINRES drag_copy.cur */
{
'00 00 02 00 01 00 20 20 00 00 01 00 01 00 30 01'
'00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00'
'00 00 01 00 01 00 00 00 00 00 00 01 00 00 00 00'
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
'00 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00'
'00 00 00 00 00 00 00 07 F0 00 00 07 70 00 00 07'
'70 00 05 54 10 00 0A A7 70 00 04 07 70 00 08 07'
'F0 00 04 00 00 00 08 00 80 00 05 55 00 00 0A EA'
'80 00 00 C0 00 00 01 80 00 00 01 80 00 00 03 00'
'00 00 23 00 00 00 36 00 00 00 3E 00 00 00 3F C0'
'00 00 3F 80 00 00 3F 00 00 00 3E 00 00 00 3C 00'
'00 00 38 00 00 00 30 00 00 00 20 00 00 00 00 00'
'00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF'
'FF FF FF F0 07 FF FF F0 07 FF FF F0 07 FF FF F0'
'07 FF FA A0 07 FF F5 50 07 FF FB F0 07 FF F7 F0'
'07 FF FB F0 07 FF F7 FF 7F FF FA AA FF FF F5 15'
'7F FF FE 1F FF FF FC 3F FF FF BC 3F FF FF 98 7F'
'FF FF 88 7F FF FF 80 FF FF FF 80 0F FF FF 80 1F'
'FF FF 80 3F FF FF 80 7F FF FF 80 FF FF FF 81 FF'
'FF FF 83 FF FF FF 87 FF FF FF 8F FF FF FF 9F FF'
'FF FF FF FF FF FF'
}
3 CURSOR
/* BINRES drag_link.cur */
{
'00 00 02 00 01 00 20 20 00 00 12 00 16 00 30 01'
'00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00'
'00 00 01 00 01 00 00 00 00 00 00 01 00 00 00 00'
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
'00 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00'
'00 00 00 00 00 00 00 07 F0 00 00 06 F0 00 00 06'
'F0 00 05 57 50 00 0A A7 90 00 04 07 10 00 08 07'
'F0 00 04 00 00 00 08 00 80 00 05 55 00 00 0A EA'
'80 00 00 C0 00 00 01 80 00 00 01 80 00 00 03 00'
'00 00 23 00 00 00 36 00 00 00 3E 00 00 00 3F C0'
'00 00 3F 80 00 00 3F 00 00 00 3E 00 00 00 3C 00'
'00 00 38 00 00 00 30 00 00 00 20 00 00 00 00 00'
'00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF'
'FF FF FF F0 07 FF FF F0 07 FF FF F0 07 FF FF F0'
'07 FF FA A0 07 FF F5 50 07 FF FB F0 07 FF F7 F0'
'07 FF FB F0 07 FF F7 FF 7F FF FA AA FF FF F5 15'
'7F FF FE 1F FF FF FC 3F FF FF BC 3F FF FF 98 7F'
'FF FF 88 7F FF FF 80 FF FF FF 80 0F FF FF 80 1F'
'FF FF 80 3F FF FF 80 7F FF FF 80 FF FF FF 81 FF'
'FF FF 83 FF FF FF 87 FF FF FF 8F FF FF FF 9F FF'
'FF FF FF FF FF FF'
}
/*
* Everything specific to any language goes
* in one of the specific files.
* Note that you can and may override resources
* which also have a neutral version. This is to
* get localized bitmaps for example.
*/