23 ZeroMemory(&szFilterMask,
sizeof(szFilterMask));
80 ZeroMemory(&szFilterMask,
sizeof(szFilterMask));
271 COLORREF crOldBkColor, crOldTextColor;
697 wndclass.
cbSize =
sizeof(wndclass);
755 return (
int)
msg.wParam;
void WriteClipboardFile(LPCWSTR lpFileName, WORD wFileIdentifier)
void ReadClipboardFile(LPCWSTR lpFileName)
#define STRING_DELETE_MSG
#define STRING_FORMAT_GEN
#define STRING_DELETE_TITLE
#define ERROR_UNSUPPORTED_FORMAT
#define CF_DSPENHMETAFILE
#define CF_DSPMETAFILEPICT
static void OnPaint(HWND hWnd, WPARAM wParam, LPARAM lParam)
static void SetDisplayFormat(UINT uFormat)
static int OnCommand(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
static void LoadClipboardFromDrop(HDROP hDrop)
static void LoadClipboardDataFromFile(LPWSTR lpszFileName)
static void InitMenuPopup(HMENU hMenu, LPARAM index)
static void UpdateDisplayMenu(void)
static void LoadClipboardFromFile(void)
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)
static LRESULT WINAPI MainWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
static const WCHAR szClassName[]
static void SaveClipboardToFile(void)
CLIPBOARD_GLOBALS Globals
UINT GetAutomaticClipboardFormat(void)
void RetrieveClipboardFormatName(HINSTANCE hInstance, UINT uFormat, BOOL Unicode, PVOID lpszFormat, UINT cch)
void DeleteClipboardContent(void)
BOOL IsClipboardFormatSupported(UINT uFormat)
BOOL GetClipboardDataDimensions(UINT uFormat, PRECT pRc)
LRESULT SendClipboardOwnerMessage(IN BOOL bUnicode, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
#define OFN_OVERWRITEPROMPT
#define OFN_FILEMUSTEXIST
#define OFN_PATHMUSTEXIST
BOOL WINAPI GetOpenFileNameW(OPENFILENAMEW *ofn)
BOOL WINAPI GetSaveFileNameW(LPOPENFILENAMEW ofn)
LANGID WINAPI GetUserDefaultUILanguage(void)
void WINAPI DragFinish(HDROP h)
UINT WINAPI DragQueryFileW(HDROP hDrop, UINT lFile, LPWSTR lpszwFile, UINT lLength)
void WINAPI DragAcceptFiles(HWND hWnd, BOOL b)
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR data)
_CRTIMP wchar_t ** __wargv
TCHAR szTitle[MAX_LOADSTRING]
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
#define WS_OVERLAPPEDWINDOW
#define WS_EX_ACCEPTFILES
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
BOOL WINAPI ShellAboutW(HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
BOOL WINAPI SetProcessDefaultLayout(DWORD dwDefaultLayout)
BOOL WINAPI GetTextMetricsW(_In_ HDC, _Out_ LPTEXTMETRICW)
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define WM_QUERYNEWPALETTE
DWORD WINAPI GetSysColor(_In_ int)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
#define WM_DESTROYCLIPBOARD
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
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)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define WM_PALETTECHANGED
BOOL WINAPI CloseClipboard(void)
BOOL WINAPI DeleteMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
BOOL WINAPI OpenClipboard(_In_opt_ HWND)
UINT WINAPI GetMenuItemID(_In_ HMENU, _In_ int)
UINT WINAPI EnumClipboardFormats(_In_ UINT)
#define WM_SYSCOLORCHANGE
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
DWORD WINAPI CheckMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
HWND WINAPI SetClipboardViewer(_In_ HWND)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
BOOL WINAPI DrawMenuBar(_In_ HWND)
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
BOOL WINAPI ChangeClipboardChain(_In_ HWND, _In_ HWND)
BOOL WINAPI EmptyClipboard(void)
BOOL WINAPI UpdateWindow(_In_ HWND)
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
HDC WINAPI GetDC(_In_opt_ HWND)
int WINAPI CountClipboardFormats(void)
BOOL WINAPI SetRectEmpty(_Out_ LPRECT)
HACCEL WINAPI LoadAcceleratorsW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
int WINAPI TranslateAcceleratorW(_In_ HWND, _In_ HACCEL, _In_ LPMSG)
HWND WINAPI FindWindowW(_In_opt_ LPCWSTR, _In_opt_ LPCWSTR)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define MAKEINTRESOURCEW(i)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
#define WM_PAINTCLIPBOARD
#define WM_RENDERALLFORMATS
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HMENU WINAPI GetMenu(_In_ HWND)
BOOL WINAPI AppendMenuW(_In_ HMENU, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCWSTR)
void HDropFromClipboard(HDC hdc, const RECT *lpRect)
int MessageBoxRes(HWND hWnd, HINSTANCE hInstance, UINT uText, UINT uCaption, UINT uType)
void DrawTextFromClipboard(UINT uFormat, PAINTSTRUCT ps, SCROLLSTATE state)
void BringWindowToFront(HWND hWnd)
BOOL RealizeClipboardPalette(HDC hdc)
void PlayEnhMetaFileFromClipboard(HDC hdc, const RECT *lpRect)
void DrawTextFromResource(HINSTANCE hInstance, UINT uID, HDC hDC, LPRECT lpRect, UINT uFormat)
void SetDIBitsToDeviceFromClipboard(UINT uFormat, PAINTSTRUCT ps, SCROLLSTATE state, UINT fuColorUse)
void BitBltFromClipboard(PAINTSTRUCT ps, SCROLLSTATE state, DWORD dwRop)
void ShowLastWin32Error(HWND hwndParent)
void PlayMetaFileFromClipboard(HDC hdc, const RECT *lpRect)
#define SPI_SETWHEELSCROLLLINES