mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
oledlg: Register a bunch of clipboard formats.
This commit is contained in:
parent
9ce684b987
commit
bed39b45ee
@ -27,13 +27,47 @@
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "oledlg.h"
|
||||
#include "wine/debug.h"
|
||||
#include "ole2.h"
|
||||
#include "oledlg_private.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
||||
|
||||
HINSTANCE OLEDLG_hInstance = 0;
|
||||
|
||||
UINT cf_embed_source;
|
||||
UINT cf_embedded_object;
|
||||
UINT cf_link_source;
|
||||
UINT cf_object_descriptor;
|
||||
UINT cf_link_src_descriptor;
|
||||
UINT cf_ownerlink;
|
||||
UINT cf_filename;
|
||||
UINT cf_filenamew;
|
||||
|
||||
static void register_clipboard_formats(void)
|
||||
{
|
||||
/* These used to be declared in olestd.h, but that seems to have been removed from the api */
|
||||
static const WCHAR CF_EMBEDSOURCEW[] = { 'E','m','b','e','d',' ','S','o','u','r','c','e',0 };
|
||||
static const WCHAR CF_EMBEDDEDOBJECTW[] = { 'E','m','b','e','d','d','e','d',' ','O','b','j','e','c','t',0 };
|
||||
static const WCHAR CF_LINKSOURCEW[] = { 'L','i','n','k',' ','S','o','u','r','c','e',0 };
|
||||
static const WCHAR CF_OBJECTDESCRIPTORW[] = { 'O','b','j','e','c','t',' ','D','e','s','c','r','i','p','t','o','r',0 };
|
||||
static const WCHAR CF_LINKSRCDESCRIPTORW[] = { 'L','i','n','k',' ','S','o','u','r','c','e',' ','D','e','s','c','r','i','p','t','o','r',0 };
|
||||
static const WCHAR CF_OWNERLINKW[] = { 'O','w','n','e','r','L','i','n','k',0 };
|
||||
static const WCHAR CF_FILENAMEW[] = { 'F','i','l','e','N','a','m','e',0 };
|
||||
static const WCHAR CF_FILENAMEWW[] = { 'F','i','l','e','N','a','m','e','W',0 };
|
||||
|
||||
/* Load in the same order as native to make debugging easier */
|
||||
cf_object_descriptor = RegisterClipboardFormatW(CF_OBJECTDESCRIPTORW);
|
||||
cf_link_src_descriptor = RegisterClipboardFormatW(CF_LINKSRCDESCRIPTORW);
|
||||
cf_embed_source = RegisterClipboardFormatW(CF_EMBEDSOURCEW);
|
||||
cf_embedded_object = RegisterClipboardFormatW(CF_EMBEDDEDOBJECTW);
|
||||
cf_link_source = RegisterClipboardFormatW(CF_LINKSOURCEW);
|
||||
cf_ownerlink = RegisterClipboardFormatW(CF_OWNERLINKW);
|
||||
cf_filename = RegisterClipboardFormatW(CF_FILENAMEW);
|
||||
cf_filenamew = RegisterClipboardFormatW(CF_FILENAMEWW);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllMain
|
||||
*/
|
||||
@ -45,6 +79,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
|
||||
case DLL_PROCESS_ATTACH:
|
||||
DisableThreadLibraryCalls(hinstDLL);
|
||||
OLEDLG_hInstance = hinstDLL;
|
||||
register_clipboard_formats();
|
||||
break;
|
||||
|
||||
case DLL_PROCESS_DETACH:
|
||||
|
33
dlls/oledlg/oledlg_private.h
Normal file
33
dlls/oledlg/oledlg_private.h
Normal file
@ -0,0 +1,33 @@
|
||||
/*
|
||||
* oledlg internal header file
|
||||
*
|
||||
* Copyright (C) 2006 Huw Davies
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef __OLEDLG_PRIVATE_H__
|
||||
#define __OLEDLG_PRIVATE_H__
|
||||
|
||||
extern UINT cf_embed_source;
|
||||
extern UINT cf_embedded_object;
|
||||
extern UINT cf_link_source;
|
||||
extern UINT cf_object_descriptor;
|
||||
extern UINT cf_link_src_descriptor;
|
||||
extern UINT cf_ownerlink;
|
||||
extern UINT cf_filename;
|
||||
extern UINT cf_filenamew;
|
||||
|
||||
#endif /* __OLEDLG_PRIVATE_H__ */
|
Loading…
Reference in New Issue
Block a user