22#define NONAMELESSUNION
57#define PS_FLAG_ENTRY(p) {p, #p}
72 char flagstr[1000] =
"";
90 TRACE(
"hwnd %p caption %s hook %p custdata %lx\n",
96 TRACE(
"dataobj %p arrpasteent %p cpasteent %d arrlinktype %p clinktype %d\n",
99 TRACE(
"cclsidex %d lpclsidex %p nselect %d flink %d hmetapict %p size(%d,%d)\n",
104 TRACE(
"arrPasteEntries[%d]: cFormat %08x pTargetDevice %p dwAspect %d lindex %d tymed %d\n",
145 fmtetc.tymed = TYMED_HGLOBAL;
146 fmtetc.dwAspect = DVASPECT_CONTENT;
153 OBJECTDESCRIPTOR *obj_desc =
GlobalLock(stg.u.hGlobal);
154 if(obj_desc->dwSrcOfCopy)
156 if(obj_desc->dwFullUserTypeName)
172 OBJECTDESCRIPTOR *obj_desc =
GlobalLock(stg.u.hGlobal);
173 if(obj_desc->dwSrcOfCopy)
175 if(obj_desc->dwFullUserTypeName)
220 DWORD fetched, items_added = 0;
222 hr = IDataObject_EnumFormatEtc(ps->
lpSrcDataObj, DATADIR_GET, &penum);
225 WARN(
"Unable to create IEnumFORMATETC\n");
231 TRACE(
"got %d formats hr %08x\n", fetched,
hr);
235 DWORD src_fmt, req_fmt;
241 for(src_fmt = 0; src_fmt < fetched; src_fmt++)
243 TRACE(
"\tenum'ed fmt %x\n",
fmts[src_fmt].cfFormat);
254 IEnumFORMATETC_Release(penum);
262 DWORD supported_mask = 0;
263 DWORD items_added = 0;
265 FORMATETC
fmt = {0,
NULL, DVASPECT_CONTENT, -1, -1};
272 supported_mask |= 1 <<
link;
274 TRACE(
"supported_mask %02x\n", supported_mask);
283 if(linktypes & supported_mask)
304 if(old_pos == -1) old_pos = 0;
326 UINT check_id, list_id;
331 if(!pastes_added && !links_added)
335 ps_struct->
flags &= ~PSF_SELECTPASTE;
340 ps_struct->
flags &= ~PSF_SELECTPASTELINK;
395 ps_struct->
flags &= ~PSF_CHECKDISPLAYASICON;
407 WCHAR resource_txt[200];
411 static const WCHAR percent_s[] = {
'%',
's',0};
415 if(cur_sel == -1)
return;
434 if((
ptr =
wcsstr(resource_txt, percent_s)))
440 memcpy(result_txt, resource_txt, offs);
445 result_txt = resource_txt;
449 if(result_txt != resource_txt)
464 ps_struct->
flags &= ~PSF_SELECTPASTELINK;
469 ps_struct->
flags &= ~PSF_SELECTPASTE;
515 static const WCHAR prop_name[] = {
'W',
'i',
'n',
'e',
'_',
'S',
't',
'r',
'u',
'c',
't',
'u',
'r',
'e',0};
518 TRACE(
"(%p, %04x, %08lx, %08lx)\n", hdlg,
msg, wp, lp);
520 ps_struct =
GetPropW(hdlg, prop_name);
547 SetPropW(hdlg, prop_name, ps_struct);
639 TRACE(
"(%p)\n", psA);
char * strcat(char *DstString, const char *SrcString)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define HeapFree(x, y, z)
#define MultiByteToWideChar
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
HRESULT WINAPI OleGetClipboard(IDataObject **obj)
HRESULT WINAPI OleRegGetUserType(REFCLSID clsid, DWORD form, LPOLESTR *usertype)
#define IDS_PS_PASTE_DATA
#define IDS_PS_UNKNOWN_SRC
#define IDS_PS_PASTE_OBJECT_AS_ICON
#define IDS_PS_PASTE_LINK_DATA
#define IDS_PS_UNKNOWN_TYPE
#define IDS_PS_PASTE_LINK_OBJECT_AS_ICON
__kernel_ptrdiff_t ptrdiff_t
GLuint GLuint GLsizei count
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
VOID WINAPI CoTaskMemFree(LPVOID ptr)
_CONST_RETURN wchar_t *__cdecl wcsstr(_In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_SubStr)
HINSTANCE OLEDLG_hInstance
#define memcpy(s1, s2, n)
#define PSF_HIDECHANGEICON
#define PSF_NOREFRESHDATAOBJECT
#define IDC_PS_SOURCETEXT
#define IDC_PS_DISPLAYLIST
#define IDC_PS_PASTELINKLIST
#define IDC_PS_ICONDISPLAY
#define OLEUI_ERR_FINDTEMPLATEFAILURE
#define PSF_CHECKDISPLAYASICON
#define PSF_STAYONCLIPBOARDCHANGE
#define IDC_PS_DISPLAYASICON
#define IDC_PS_RESULTTEXT
#define OLEUI_ERR_LPSZTEMPLATEINVALID
#define PSF_DISABLEDISPLAYASICON
#define OLEUI_ERR_LOADTEMPLATEFAILURE
#define PSF_SELECTPASTELINK
#define IDD_PASTESPECIAL4
#define IDC_PS_CHANGEICON
UINT cf_link_src_descriptor
UINT cf_object_descriptor
static void get_descriptors(HWND hdlg, ps_struct_t *ps_struct)
static void init_lists(HWND hdlg, ps_struct_t *ps_struct)
static void update_structure(HWND hdlg, ps_struct_t *ps_struct)
static DWORD init_linklist(HWND hdlg, OLEUIPASTESPECIALW *ps)
static const struct ps_flag ps_flags[]
static void free_structure(ps_struct_t *ps_struct)
static void mode_change(HWND hdlg, ps_struct_t *ps_struct, UINT id)
static INT_PTR CALLBACK ps_dlg_proc(HWND hdlg, UINT msg, WPARAM wp, LPARAM lp)
static void dump_pastespecial(const OLEUIPASTESPECIALW *ps)
static void update_src_text(HWND hdlg, const ps_struct_t *ps_struct)
static WCHAR * strdupW(const WCHAR *str)
UINT WINAPI OleUIPasteSpecialA(LPOLEUIPASTESPECIALA psA)
static void update_as_icon(HWND hdlg, ps_struct_t *ps_struct)
static void selection_change(HWND hdlg, ps_struct_t *ps_struct)
static void dump_ps_flags(DWORD flags)
static void update_display_list(HWND hdlg, UINT src_list_id)
static BOOL add_entry_to_lb(HWND hdlg, UINT id, OLEUIPASTEENTRYW *pe)
static void post_help_msg(HWND hdlg, ps_struct_t *ps_struct)
static WCHAR * strdupAtoW(const char *str)
static void send_end_dialog_msg(HWND hdlg, ps_struct_t *ps_struct, UINT id)
UINT WINAPI OleUIPasteSpecialW(LPOLEUIPASTESPECIALW ps)
static void update_result_text(HWND hdlg, const ps_struct_t *ps_struct)
static DWORD init_pastelist(HWND hdlg, OLEUIPASTESPECIALW *ps)
LPOLEUIPASTEENTRYA arrPasteEntries
LPDATAOBJECT lpSrcDataObj
LPDATAOBJECT lpSrcDataObj
LPOLEUIPASTEENTRYW arrPasteEntries
const DLGTEMPLATE * LPCDLGTEMPLATEW
INT_PTR WINAPI DialogBoxIndirectParamW(_In_opt_ HINSTANCE, _In_ LPCDLGTEMPLATE, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
HANDLE WINAPI RemovePropW(_In_ HWND, _In_ LPCWSTR)
BOOL WINAPI CheckDlgButton(_In_ HWND, _In_ int, _In_ UINT)
HWND WINAPI GetForegroundWindow(void)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define IS_INTRESOURCE(i)
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI SetPropW(_In_ HWND, _In_ LPCWSTR, _In_opt_ HANDLE)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
BOOL WINAPI CheckRadioButton(_In_ HWND, _In_ int, _In_ int, _In_ int)
#define MAKEINTRESOURCEW(i)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)