Go to the source code of this file.
|
void | ShowLastWin32Error (HWND hwndParent) |
|
void | BringWindowToFront (HWND hWnd) |
|
int | MessageBoxRes (HWND hWnd, HINSTANCE hInstance, UINT uText, UINT uCaption, UINT uType) |
|
void | DrawTextFromResource (HINSTANCE hInstance, UINT uID, HDC hDC, LPRECT lpRect, UINT uFormat) |
|
void | DrawTextFromClipboard (UINT uFormat, PAINTSTRUCT ps, SCROLLSTATE state) |
|
void | BitBltFromClipboard (PAINTSTRUCT ps, SCROLLSTATE state, DWORD dwRop) |
|
void | SetDIBitsToDeviceFromClipboard (UINT uFormat, PAINTSTRUCT ps, SCROLLSTATE state, UINT fuColorUse) |
|
void | PlayMetaFileFromClipboard (HDC hdc, const RECT *lpRect) |
|
void | PlayEnhMetaFileFromClipboard (HDC hdc, const RECT *lpRect) |
|
static LPWSTR | AllocStrCat (LPWSTR psz, LPCWSTR cat) |
|
void | HDropFromClipboard (HDC hdc, const RECT *lpRect) |
|
BOOL | RealizeClipboardPalette (HDC hdc) |
|
◆ AllocStrCat()
Definition at line 334 of file winutils.c.
335{
338
341
344 if (!pszNew)
345 return psz;
346
348 return pszNew;
349}
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
static DWORD DWORD void LPSTR DWORD cch
_Check_return_ _CRTIMP wchar_t *__cdecl _wcsdup(_In_z_ const wchar_t *_Str)
Referenced by HDropFromClipboard().
◆ BitBltFromClipboard()
Definition at line 155 of file winutils.c.
156{
160 LONG bmWidth, bmHeight;
161
164 return;
165
168
170
173
177 bmWidth,
178 bmHeight,
182 dwRop);
183
185}
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
BOOL WINAPI DeleteDC(_In_ HDC)
HANDLE WINAPI GetClipboardData(_In_ UINT)
Referenced by OnPaint().
◆ BringWindowToFront()
Definition at line 36 of file winutils.c.
37{
39 {
42 }
43 else
44 {
46 }
47}
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI SetForegroundWindow(_In_ HWND)
BOOL WINAPI IsIconic(_In_ HWND)
Referenced by wWinMain().
◆ DrawTextFromClipboard()
Definition at line 75 of file winutils.c.
76{
81 INT FirstLine, LastLine;
82
84 if (!hGlobal)
85 return;
86
88 if (!lpText)
89 return;
90
91
93
94
96
97
99 {
101 {
103 break;
105 }
106 else
107 {
109 break;
111 }
112
113 --FirstLine;
114 --LastLine;
115
117 }
118
122
123
124 ++LastLine;
125 while (LastLine >= 0)
126 {
128 {
130 break;
133 lpText, lineSize, 0,
NULL,
135 }
136 else
137 {
139 break;
142 lpText, lineSize, 0,
NULL,
144 }
145
146 --LastLine;
147
150 }
151
153}
while(CdLookupNextInitialFileDirent(IrpContext, Fcb, FileContext))
CLIPBOARD_GLOBALS Globals
SIZE_T GetLineExtentA(IN LPCSTR lpText, OUT LPCSTR *lpNextLine)
SIZE_T GetLineExtentW(IN LPCWSTR lpText, OUT LPCWSTR *lpNextLine)
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
LONG WINAPI TabbedTextOutA(_In_ HDC hdc, _In_ int x, _In_ int y, _In_reads_(chCount) LPCSTR lpString, _In_ int chCount, _In_ int nTabPositions, _In_reads_opt_(nTabPositions) CONST INT *lpnTabStopPositions, _In_ int nTabOrigin)
LONG WINAPI TabbedTextOutW(_In_ HDC hdc, _In_ int x, _In_ int y, _In_reads_(chCount) LPCWSTR lpString, _In_ int chCount, _In_ int nTabPositions, _In_reads_opt_(nTabPositions) CONST INT *lpnTabStopPositions, _In_ int nTabOrigin)
Referenced by OnPaint().
◆ DrawTextFromResource()
Definition at line 65 of file winutils.c.
66{
68 int nCount;
69
71 if (nCount)
73}
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
Referenced by OnPaint().
◆ HDropFromClipboard()
Definition at line 351 of file winutils.c.
352{
358
360
362 {
366 }
367
371}
UINT WINAPI DragQueryFileW(HDROP hDrop, UINT lFile, LPWSTR lpszwFile, UINT lLength)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
#define DT_EXTERNALLEADING
static LPWSTR AllocStrCat(LPWSTR psz, LPCWSTR cat)
Referenced by OnPaint().
◆ MessageBoxRes()
◆ PlayEnhMetaFileFromClipboard()
Definition at line 326 of file winutils.c.
327{
328 HENHMETAFILE hEmf;
329
332}
BOOL WINAPI PlayEnhMetaFile(_In_ HDC, _In_ HENHMETAFILE, _In_ LPCRECT)
Referenced by OnPaint().
◆ PlayMetaFileFromClipboard()
Definition at line 306 of file winutils.c.
307{
310
312 if (!hGlobal)
313 return;
314
316 if (!mp)
317 return;
318
324}
int WINAPI SetMapMode(_In_ HDC, _In_ int)
BOOL WINAPI SetViewportExtEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPSIZE)
struct tagMETAFILEPICT * LPMETAFILEPICT
BOOL WINAPI SetViewportOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
BOOL WINAPI PlayMetaFile(_In_ HDC, _In_ HMETAFILE)
Referenced by OnPaint().
◆ RealizeClipboardPalette()
BOOL RealizeClipboardPalette |
( |
HDC |
hdc | ) |
|
Definition at line 373 of file winutils.c.
374{
376 HPALETTE hPalette, hOldPalette;
377
380
382 if (!hPalette)
384
386 if (!hOldPalette)
388
390
392
394}
UINT WINAPI RealizePalette(_In_ HDC)
HPALETTE WINAPI SelectPalette(_In_ HDC, _In_ HPALETTE, _In_ BOOL)
BOOL WINAPI IsClipboardFormatAvailable(_In_ UINT)
Referenced by MainWndProc(), and OnPaint().
◆ SetDIBitsToDeviceFromClipboard()
Definition at line 187 of file winutils.c.
188{
192 LONG bmWidth, bmHeight;
194
196 if (!hGlobal)
197 return;
198
200 if (!lpInfoHeader)
201 return;
202
204 {
206
207 dwPalSize = 0;
208
210 {
212
215 else
216 dwPalSize *=
sizeof(
WORD);
217 }
218
219 bmWidth = lpCoreHeader->
bcWidth;
221 }
224 (lpInfoHeader->
biSize ==
sizeof(BITMAPV5HEADER)))
225 {
227
228 if ((dwPalSize == 0) && (lpInfoHeader->
biBitCount <= 8))
230
233 else
234 dwPalSize *=
sizeof(
WORD);
235
236 if (
238 {
239 dwPalSize += 3 *
sizeof(
DWORD);
240 }
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264#if 0
267 {
268 dwPalSize += 3 *
sizeof(
DWORD);
269 }
270#endif
271
272 bmWidth = lpInfoHeader->
biWidth;
273
275 }
276 else
277 {
278
280 return;
281 }
282
283 lpBits = (
LPBYTE)lpInfoHeader + lpInfoHeader->
biSize + dwPalSize;
284
285
286
287
288
289
293 bmWidth,
294 bmHeight,
295 0,
296 0,
297 0,
298 bmHeight,
299 lpBits,
301 fuColorUse);
302
304}
int WINAPI SetDIBitsToDevice(_In_ HDC, _In_ int, _In_ int, _In_ DWORD, _In_ DWORD, _In_ int, _In_ int, _In_ UINT, _In_ UINT, _In_ CONST VOID *, _In_ CONST BITMAPINFO *, _In_ UINT)
struct tagRGBTRIPLE RGBTRIPLE
struct tagBITMAPCOREHEADER * LPBITMAPCOREHEADER
Referenced by OnPaint().
◆ ShowLastWin32Error()
void ShowLastWin32Error |
( |
HWND |
hwndParent | ) |
|
Definition at line 11 of file winutils.c.
12{
15
18 return;
19
24 dwError,
28 {
29 return;
30 }
31
34}
HLOCAL NTAPI LocalFree(HLOCAL hMem)
#define LANG_USER_DEFAULT
DWORD WINAPI GetLastError(void)
#define FORMAT_MESSAGE_IGNORE_INSERTS
#define FORMAT_MESSAGE_FROM_SYSTEM
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
Referenced by DeleteClipboardContent(), LoadClipboardDataFromFile(), LoadRecoveryOptions(), OnInitDialog(), ReadClipboardFile(), ReadPageFileSettings(), SaveClipboardToFile(), WriteClipboardFile(), WritePageFileSettings(), WriteStartupRecoveryOptions(), and wWinMain().