ReactOS  0.4.14-dev-49-gfb4591c
imgedwnd.c File Reference
#include "precomp.h"
Include dependency graph for imgedwnd.c:

Go to the source code of this file.

Macros

#define IMAGE_FRAME_SIZE   1
 

Functions

static VOID EditWndUpdateScrollInfo (PEDIT_WND_INFO Info)
 
static BOOL LoadBlankCanvas (PEDIT_WND_INFO Info)
 
static BOOL LoadDIBImage (PEDIT_WND_INFO Info)
 
static BOOL InitEditWnd (PEDIT_WND_INFO Info)
 
static VOID DestroyEditWnd (PEDIT_WND_INFO Info)
 
static VOID ImageEditWndRepaint (PEDIT_WND_INFO Info, HDC hDC, LPPAINTSTRUCT lpps)
 
static LRESULT CALLBACK ImageEditWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
VOID SetImageEditorEnvironment (PEDIT_WND_INFO Info, BOOL Setup)
 
BOOL CreateImageEditWindow (PMAIN_WND_INFO MainWnd, POPEN_IMAGE_EDIT_INFO OpenInfo)
 
BOOL InitImageEditWindowImpl (VOID)
 
VOID UninitImageEditWindowImpl (VOID)
 

Variables

static const TCHAR szImageEditWndClass [] = TEXT("ImageSoftEditWndClass")
 

Macro Definition Documentation

◆ IMAGE_FRAME_SIZE

#define IMAGE_FRAME_SIZE   1

Definition at line 5 of file imgedwnd.c.

Function Documentation

◆ CreateImageEditWindow()

BOOL CreateImageEditWindow ( PMAIN_WND_INFO  MainWnd,
POPEN_IMAGE_EDIT_INFO  OpenInfo 
)

Definition at line 459 of file imgedwnd.c.

461 {
463  HWND hWndEditor;
464  LONG Width, Height;
465 
467  0,
468  sizeof(EDIT_WND_INFO));
469  if (Info != NULL)
470  {
472  sizeof(EDIT_WND_INFO));
473  Info->MainWnd = MainWnd;
474  Info->MdiEditorType = metImageEditor;
475  Info->OpenInfo = OpenInfo;
476 
477  if (OpenInfo->CreateNew)
478  {
479  Width = OpenInfo->New.Width;
480  Height = OpenInfo->New.Height;
481  }
482  else
483  {
484  Width = CW_USEDEFAULT;
485  Height = CW_USEDEFAULT;
486  }
487 
489  OpenInfo->lpImageName,
491  200,
492  200,
493  Width,
494  Height,
495  MainWnd->hMdiClient,
496  hInstance,
497  (LPARAM)Info);
498 
499  if (hWndEditor != NULL)
500  {
501  return TRUE;
502  }
503 
505  0,
506  Info);
507  }
508 
509  return FALSE;
510 }
#define TRUE
Definition: types.h:120
struct _OPEN_IMAGE_EDIT_INFO::@1505::@1507 New
static const TCHAR szImageEditWndClass[]
Definition: imgedwnd.c:3
#define ZeroMemory
Definition: winbase.h:1635
struct TraceInfo Info
HINSTANCE hInstance
Definition: charmap.c:20
HWND hMdiClient
Definition: precomp.h:43
long LONG
Definition: pedump.c:60
#define CW_USEDEFAULT
Definition: winuser.h:225
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define WS_HSCROLL
Definition: pedump.c:628
#define CreateMDIWindow
Definition: winuser.h:5654
HANDLE ProcessHeap
Definition: servman.c:15
#define WS_VSCROLL
Definition: pedump.c:627
#define HeapFree(x, y, z)
Definition: compat.h:394
#define WS_MAXIMIZE
Definition: pedump.c:623

Referenced by MainWndCommand().

◆ DestroyEditWnd()

static VOID DestroyEditWnd ( PEDIT_WND_INFO  Info)
static

Definition at line 175 of file imgedwnd.c.

176 {
177  PEDIT_WND_INFO *PrevEditor;
178  PEDIT_WND_INFO Editor;
179 
180  DeleteDC(Info->hDCMem);
181 
182  /* FIXME - free resources and run down editor */
184  0,
185  Info->pbmi);
187  0,
188  Info->pBits);
189 
190  /* Remove the image editor from the list */
191  PrevEditor = &Info->MainWnd->ImageEditors;
192  Editor = Info->MainWnd->ImageEditors;
193  do
194  {
195  if (Editor == Info)
196  {
197  *PrevEditor = Info->Next;
198  break;
199  }
200  PrevEditor = &Editor->Next;
201  Editor = Editor->Next;
202  } while (Editor != NULL);
203 }
struct _EDIT_WND_INFO * Next
Definition: imgedwnd.h:72
struct TraceInfo Info
smooth NULL
Definition: ftsmooth.c:416
HRESULT Next([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] STATPROPSETSTG *rgelt, [out] ULONG *pceltFetched)
HANDLE ProcessHeap
Definition: servman.c:15
BOOL WINAPI DeleteDC(_In_ HDC)
#define HeapFree(x, y, z)
Definition: compat.h:394

Referenced by ImageEditWndProc().

◆ EditWndUpdateScrollInfo()

static VOID EditWndUpdateScrollInfo ( PEDIT_WND_INFO  Info)
static

Definition at line 8 of file imgedwnd.c.

9 {
10  SCROLLINFO si;
11  RECT rcClient;
12 
13  GetClientRect(Info->hSelf,
14  &rcClient);
15 
16  si.cbSize = sizeof(si);
17  si.fMask = SIF_PAGE | SIF_RANGE;
18  si.nPage = rcClient.right - (2 * IMAGE_FRAME_SIZE);
19  si.nMin = 0;
20  si.nMax = Info->Width;
21 
22  SetScrollInfo(Info->hSelf,
23  SB_HORZ,
24  &si,
25  TRUE);
26 
27  si.nPage = rcClient.bottom - (2 * IMAGE_FRAME_SIZE);
28  si.nMax = Info->Height;
29  SetScrollInfo(Info->hSelf,
30  SB_VERT,
31  &si,
32  TRUE);
33 }
#define TRUE
Definition: types.h:120
#define SIF_RANGE
Definition: winuser.h:1221
#define SB_VERT
Definition: winuser.h:553
#define SB_HORZ
Definition: winuser.h:552
LONG right
Definition: windef.h:293
#define SIF_PAGE
Definition: winuser.h:1219
struct TraceInfo Info
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
LONG bottom
Definition: windef.h:294
#define IMAGE_FRAME_SIZE
Definition: imgedwnd.c:5
int WINAPI SetScrollInfo(_In_ HWND, _In_ int, _In_ LPCSCROLLINFO, _In_ BOOL)

Referenced by ImageEditWndProc(), and InitEditWnd().

◆ ImageEditWndProc()

static LRESULT CALLBACK ImageEditWndProc ( HWND  hwnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 232 of file imgedwnd.c.

236 {
238  LRESULT Ret = 0;
239  HDC hDC;
240  static INT xMouse, yMouse;
241  static BOOL bLeftButtonDown, bRightButtonDown;
242 
243  /* Get the window context */
245  GWLP_USERDATA);
246  if (Info == NULL && uMsg != WM_CREATE)
247  {
248  goto HandleDefaultMessage;
249  }
250 
251  switch (uMsg)
252  {
253  case WM_CREATE:
254  {
255  Info = (PEDIT_WND_INFO)(((LPMDICREATESTRUCT)((LPCREATESTRUCT)lParam)->lpCreateParams)->lParam);
256  Info->hSelf = hwnd;
257 
260  (LONG_PTR)Info);
261 
262  if (!InitEditWnd(Info))
263  {
264  Ret = (LRESULT)-1;
265  break;
266  }
267  break;
268  }
269 /*
270  case WM_ERASEBKGND:
271  if (Info->Width != 0 && Info->Height != 0)
272  {
273  Ret = TRUE;
274  }
275  break;
276 */
277  case WM_LBUTTONDOWN:
278  if (! bRightButtonDown)
279  SetCapture(Info->hSelf);
280 
281  bLeftButtonDown = TRUE;
282  xMouse = LOWORD(lParam);
283  yMouse = HIWORD(lParam);
284 
287  break;
288 
289  case WM_LBUTTONUP:
290  if (bLeftButtonDown)
291  SetCapture(NULL);
292 
293  bLeftButtonDown = FALSE;
294 
295  break;
296 
297  case WM_RBUTTONDOWN:
298  if (! bLeftButtonDown)
299  SetCapture(Info->hSelf);
300 
301  bRightButtonDown = TRUE;
302  xMouse = LOWORD(lParam);
303  yMouse = HIWORD(lParam);
304 
307  break;
308 
309  case WM_RBUTTONUP:
310  if (bRightButtonDown)
311  SetCapture(NULL);
312 
313  bRightButtonDown = FALSE;
314 
315  break;
316 
317  case WM_MOUSEMOVE:
318  {
319  HPEN hPen, hPenOld;
320 
321  if (!bLeftButtonDown && !bRightButtonDown)
322  break;
323 
324  hDC = GetDC(Info->hSelf);
325 
326  SelectObject(Info->hDCMem,
327  Info->hBitmap);
328 
329  if (bLeftButtonDown)
330  hPen = CreatePen(PS_SOLID,
331  3,
332  RGB(0, 0, 0));
333  else
334  hPen = CreatePen(PS_SOLID,
335  3,
336  RGB(255, 255, 255));
337 
338  hPenOld = SelectObject(hDC,
339  hPen);
340  SelectObject(Info->hDCMem,
341  hPen);
342 
343  MoveToEx(hDC,
344  xMouse,
345  yMouse,
346  NULL);
347 
348  MoveToEx(Info->hDCMem,
349  xMouse,
350  yMouse,
351  NULL);
352 
353  xMouse = LOWORD(lParam);
354  yMouse = HIWORD(lParam);
355 
356  LineTo(hDC,
357  xMouse,
358  yMouse);
359 
360  LineTo(Info->hDCMem,
361  xMouse,
362  yMouse);
363 
365  hPenOld);
367  hPenOld));
368 
369  ReleaseDC(Info->hSelf,
370  hDC);
371  }
372  break;
373 
374  case WM_PAINT:
375  {
376  if (Info->Width != 0 && Info->Height != 0)
377  {
378  PAINTSTRUCT ps;
379  HDC hDC;
380 
381  hDC = BeginPaint(hwnd,
382  &ps);
383  if (hDC != NULL)
384  {
386  hDC,
387  &ps);
388 
389  EndPaint(hwnd,
390  &ps);
391  }
392  }
393  break;
394  }
395 
396  case WM_SIZE:
397  {
399  goto HandleDefaultMessage;
400  }
401 
402  case WM_MENUSELECT:
403  case WM_ENTERMENULOOP:
404  case WM_EXITMENULOOP:
405  /* forward these messages to the main window procedure */
406  Ret = SendMessage(Info->MainWnd->hSelf,
407  uMsg,
408  wParam,
409  lParam);
410  break;
411 
412  case WM_MDIACTIVATE:
413  /* Switch the main window context if neccessary */
415  (HWND)wParam,
416  (HWND)lParam);
417  break;
418 
419  case WM_DESTROY:
420  {
422 
424  0,
425  Info);
428  0);
429  break;
430  }
431 
432  default:
433 HandleDefaultMessage:
434  Ret = DefMDIChildProc(hwnd,
435  uMsg,
436  wParam,
437  lParam);
438  break;
439  }
440 
441  return Ret;
442 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define TRUE
Definition: types.h:120
HPEN WINAPI CreatePen(_In_ int, _In_ int, _In_ COLORREF)
#define WM_LBUTTONDOWN
Definition: winuser.h:1758
HDC WINAPI GetDC(_In_opt_ HWND)
static HDC
Definition: imagelist.c:92
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
BOOL WINAPI LineTo(_In_ HDC, _In_ int, _In_ int)
static VOID ImageEditWndRepaint(PEDIT_WND_INFO Info, HDC hDC, LPPAINTSTRUCT lpps)
Definition: imgedwnd.c:206
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
CREATESTRUCTA * LPCREATESTRUCT
Definition: winuser.h:5627
int32_t INT
Definition: typedefs.h:56
#define SetWindowLongPtr
Definition: treelist.c:70
WPARAM wParam
Definition: combotst.c:138
struct TraceInfo Info
#define IDC_PAINTBRUSHCURSORMOUSEDOWN
Definition: resource.h:247
BOOL WINAPI MoveToEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
#define PS_SOLID
Definition: wingdi.h:585
HINSTANCE hInstance
Definition: charmap.c:20
unsigned int BOOL
Definition: ntddk_ex.h:94
#define WM_ENTERMENULOOP
Definition: winuser.h:1786
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
static BOOL InitEditWnd(PEDIT_WND_INFO Info)
Definition: imgedwnd.c:128
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define WM_MENUSELECT
Definition: winuser.h:1729
#define GWLP_USERDATA
Definition: treelist.c:63
#define WM_EXITMENULOOP
Definition: winuser.h:1787
smooth NULL
Definition: ftsmooth.c:416
#define DefMDIChildProc
Definition: ros2win.h:33
#define WM_DESTROY
Definition: winuser.h:1591
#define WM_RBUTTONDOWN
Definition: winuser.h:1761
#define WM_SIZE
Definition: winuser.h:1593
#define RGB(r, g, b)
Definition: wingdi.h:2935
#define WM_RBUTTONUP
Definition: winuser.h:1762
#define WM_PAINT
Definition: winuser.h:1602
#define LRESULT
Definition: ole.h:14
#define WM_MDIACTIVATE
Definition: winuser.h:1796
#define LoadCursor
Definition: winuser.h:5713
HANDLE ProcessHeap
Definition: servman.c:15
static HDC hDC
Definition: 3dtext.c:33
HWND WINAPI SetCapture(_In_ HWND hWnd)
static VOID EditWndUpdateScrollInfo(PEDIT_WND_INFO Info)
Definition: imgedwnd.c:8
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
struct _EDIT_WND_INFO * PEDIT_WND_INFO
#define WM_LBUTTONUP
Definition: winuser.h:1759
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define WM_MOUSEMOVE
Definition: winuser.h:1757
#define SendMessage
Definition: winuser.h:5744
#define WM_CREATE
Definition: winuser.h:1590
#define HIWORD(l)
Definition: typedefs.h:246
#define GetWindowLongPtr
Definition: treelist.c:73
LONG_PTR LRESULT
Definition: windef.h:209
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define HeapFree(x, y, z)
Definition: compat.h:394
VOID MainWndSwitchEditorContext(PMAIN_WND_INFO Info, HWND hDeactivate, HWND hActivate)
Definition: mainwnd.c:1313
static VOID DestroyEditWnd(PEDIT_WND_INFO Info)
Definition: imgedwnd.c:175

Referenced by InitImageEditWindowImpl().

◆ ImageEditWndRepaint()

static VOID ImageEditWndRepaint ( PEDIT_WND_INFO  Info,
HDC  hDC,
LPPAINTSTRUCT  lpps 
)
static

Definition at line 206 of file imgedwnd.c.

209 {
210  HBITMAP hOldBitmap;
211 
212  if (Info->hBitmap)
213  {
214  hOldBitmap = (HBITMAP) SelectObject(Info->hDCMem,
215  Info->hBitmap);
216 
217  BitBlt(hDC,
218  lpps->rcPaint.left,
219  lpps->rcPaint.top,
220  lpps->rcPaint.right - lpps->rcPaint.left,
221  lpps->rcPaint.bottom - lpps->rcPaint.top,
222  Info->hDCMem,
223  lpps->rcPaint.left,
224  lpps->rcPaint.top,
225  SRCCOPY);
226 
227  Info->hBitmap = SelectObject(Info->hDCMem, hOldBitmap);
228  }
229 }
LONG top
Definition: windef.h:292
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
LONG left
Definition: windef.h:291
LONG right
Definition: windef.h:293
static VOID NTAPI BitBlt(IN ULONG Left, IN ULONG Top, IN ULONG Width, IN ULONG Height, IN PUCHAR Buffer, IN ULONG BitsPerPixel, IN ULONG Delta)
Definition: vga.c:410
struct TraceInfo Info
static HDC hDC
Definition: 3dtext.c:33
LONG bottom
Definition: windef.h:294
static HBITMAP
Definition: button.c:44
#define SRCCOPY
Definition: wingdi.h:332

Referenced by ImageEditWndProc().

◆ InitEditWnd()

static BOOL InitEditWnd ( PEDIT_WND_INFO  Info)
static

Definition at line 128 of file imgedwnd.c.

129 {
130  //BOOL bRet = FALSE;
131 
132  Info->Zoom = 100;
133 
134  if (Info->OpenInfo != NULL)
135  {
136  HDC hDC;
137 
138  if (Info->hDCMem)
139  {
140  DeleteObject(Info->hDCMem);
141  Info->hDCMem = NULL;
142  }
143 
144  hDC = GetDC(Info->hSelf);
145  Info->hDCMem = CreateCompatibleDC(hDC);
146  ReleaseDC(Info->hSelf, hDC);
147 
148  if (Info->OpenInfo->CreateNew)
149  {
151  }
152  else
153  {
155  }
156 
157  Info->OpenInfo = NULL;
158  }
159 
161 
162  /* Add image editor to the list */
163  Info->Next = Info->MainWnd->ImageEditors;
164  Info->MainWnd->ImageEditors = Info;
165 
166  InvalidateRect(Info->hSelf,
167  NULL,
168  TRUE);
169 
170  /* FIXME - if returning FALSE, remove the image editor from the list! */
171  return TRUE;
172 }
#define TRUE
Definition: types.h:120
HDC WINAPI GetDC(_In_opt_ HWND)
static HDC
Definition: imagelist.c:92
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
struct TraceInfo Info
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
smooth NULL
Definition: ftsmooth.c:416
static BOOL LoadBlankCanvas(PEDIT_WND_INFO Info)
Definition: imgedwnd.c:37
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
HRESULT Next([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] STATPROPSETSTG *rgelt, [out] ULONG *pceltFetched)
static BOOL LoadDIBImage(PEDIT_WND_INFO Info)
Definition: imgedwnd.c:48
static HDC hDC
Definition: 3dtext.c:33
static VOID EditWndUpdateScrollInfo(PEDIT_WND_INFO Info)
Definition: imgedwnd.c:8

Referenced by ImageEditWndProc().

◆ InitImageEditWindowImpl()

BOOL InitImageEditWindowImpl ( VOID  )

Definition at line 513 of file imgedwnd.c.

514 {
515  WNDCLASSEX wc = {0};
516 
517  wc.cbSize = sizeof(WNDCLASSEX);
518  wc.style = CS_HREDRAW | CS_VREDRAW;
520  wc.hInstance = hInstance;
521  wc.hIcon = LoadIcon(hInstance,
529  IMAGE_ICON,
530  16,
531  16,
532  LR_SHARED);
533 
534  return RegisterClassEx(&wc) != (ATOM)0;
535 }
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define IDC_PAINTBRUSHCURSOR
Definition: resource.h:246
UINT style
Definition: winuser.h:3176
#define MAKEINTRESOURCE
Definition: winuser.h:591
static HICON
Definition: imagelist.c:84
#define LR_SHARED
Definition: winuser.h:1090
#define IMAGE_ICON
Definition: winuser.h:212
#define RegisterClassEx
Definition: winuser.h:5738
static const TCHAR szImageEditWndClass[]
Definition: imgedwnd.c:3
HCURSOR hCursor
Definition: winuser.h:3182
WNDPROC lpfnWndProc
Definition: winuser.h:3177
LPCSTR lpszClassName
Definition: winuser.h:3185
WORD ATOM
Definition: dimm.idl:113
#define CS_HREDRAW
Definition: winuser.h:648
#define WHITE_BRUSH
Definition: wingdi.h:901
HICON hIconSm
Definition: winuser.h:3186
HINSTANCE hInstance
Definition: charmap.c:20
HINSTANCE hInstance
Definition: winuser.h:3180
#define IDI_IMAGESOFTICON
Definition: resource.h:13
UINT cbSize
Definition: winuser.h:3175
HBRUSH hbrBackground
Definition: winuser.h:3183
#define CS_VREDRAW
Definition: winuser.h:653
HICON hIcon
Definition: winuser.h:3181
#define LoadCursor
Definition: winuser.h:5713
#define LoadImage
Definition: winuser.h:5716
WNDCLASSEXA WNDCLASSEX
Definition: winuser.h:5620
#define LoadIcon
Definition: winuser.h:5714
static LRESULT CALLBACK ImageEditWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: imgedwnd.c:232

Referenced by _tWinMain().

◆ LoadBlankCanvas()

static BOOL LoadBlankCanvas ( PEDIT_WND_INFO  Info)
static

Definition at line 37 of file imgedwnd.c.

38 {
39  /* FIXME: convert this to a DIB Section */
40  /* set bitmap dimensions */
41  Info->Width = Info->OpenInfo->New.Width;
42  Info->Height = Info->OpenInfo->New.Height;
43 
44  return TRUE;
45 }
#define TRUE
Definition: types.h:120
struct TraceInfo Info

Referenced by InitEditWnd().

◆ LoadDIBImage()

static BOOL LoadDIBImage ( PEDIT_WND_INFO  Info)
static

Definition at line 48 of file imgedwnd.c.

49 {
50  BITMAPFILEHEADER bmfh;
51  HANDLE hFile;
52  BITMAP bitmap;
54  BOOL bSuccess, bRet = FALSE;
55 
56  hFile = CreateFile(Info->OpenInfo->Open.lpImagePath,
59  NULL,
62  NULL);
64  return bRet;
65 
67  &bmfh,
68  sizeof(BITMAPFILEHEADER),
69  &BytesRead,
70  NULL);
71 
72  if (bSuccess && (BytesRead == sizeof(BITMAPFILEHEADER))
73  && (bmfh.bfType == *(WORD *)"BM"))
74  {
75  DWORD InfoSize = bmfh.bfOffBits - sizeof(BITMAPFILEHEADER);
76 
77  Info->pbmi = HeapAlloc(ProcessHeap,
78  0,
79  InfoSize);
80  if (Info->pbmi)
81  {
83  Info->pbmi,
84  InfoSize,
85  &BytesRead,
86  NULL);
87 
88  if (bSuccess && (BytesRead == InfoSize))
89  {
90  Info->hBitmap = CreateDIBSection(NULL,
91  Info->pbmi,
93  (VOID *)&Info->pBits,
94  NULL,
95  0);
96  if (Info->hBitmap != NULL)
97  {
99  Info->pBits,
100  bmfh.bfSize - bmfh.bfOffBits,
101  &BytesRead,
102  NULL);
103 
104  GetObject(Info->hBitmap,
105  sizeof(BITMAP),
106  &bitmap);
107 
108  Info->Width = bitmap.bmWidth;
109  Info->Height = bitmap.bmHeight;
110 
111  bRet = TRUE;
112  }
113  }
114  }
115  }
116  else if (!bSuccess)
117  {
118  GetError(0);
119  }
120 
122 
123  return bRet;
124 }
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:398
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
static BOOLEAN bSuccess
Definition: drive.cpp:417
struct TraceInfo Info
#define FILE_SHARE_READ
Definition: compat.h:125
VOID GetError(VOID)
Definition: misc.c:192
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
#define OPEN_EXISTING
Definition: compat.h:426
Definition: uimain.c:88
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
#define GetObject
Definition: wingdi.h:4463
#define GENERIC_READ
Definition: compat.h:124
_In_ HANDLE hFile
Definition: mswsock.h:90
HANDLE ProcessHeap
Definition: servman.c:15
IN OUT PVCB OUT PDIRENT OUT PBCB IN BOOLEAN CreateFile
Definition: fatprocs.h:904
#define FILE_FLAG_SEQUENTIAL_SCAN
Definition: disk.h:43
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
Definition: bitmap.c:197
struct tagBITMAPFILEHEADER BITMAPFILEHEADER
Definition: bl.h:1331
static HBITMAP bitmap
Definition: clipboard.c:1344
#define DIB_RGB_COLORS
Definition: wingdi.h:366
BOOL WINAPI ReadFile(IN HANDLE hFile, IN LPVOID lpBuffer, IN DWORD nNumberOfBytesToRead, OUT LPDWORD lpNumberOfBytesRead OPTIONAL, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:123
_Must_inspect_result_ _In_ PFILE_OBJECT _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ FLT_IO_OPERATION_FLAGS _Out_opt_ PULONG BytesRead
Definition: fltkernel.h:1255

Referenced by InitEditWnd().

◆ SetImageEditorEnvironment()

VOID SetImageEditorEnvironment ( PEDIT_WND_INFO  Info,
BOOL  Setup 
)

Definition at line 445 of file imgedwnd.c.

447 {
448  if (Setup)
449  {
450  /* FIXME - setup editor environment (e.g. show toolbars, enable menus etc) */
451  }
452  else
453  {
454  /* FIXME - cleanup editor environment (e.g. hide toolbars, disable menus etc) */
455  }
456 }
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn BOOLEAN Physical UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER void *Data ACPI_OBJECT_HANDLER void **Data ACPI_STRING ACPI_OBJECT_LIST ACPI_BUFFER *ReturnObjectBuffer ACPI_DEVICE_INFO **ReturnBuffer ACPI_HANDLE ACPI_HANDLE ACPI_HANDLE *OutHandle ACPI_HANDLE *OutHandle void *Context void *Context ACPI_EVENT_HANDLER Handler UINT32 UINT32 ACPI_GPE_HANDLER void *Context UINT32 ACPI_NOTIFY_HANDLER void *Context ACPI_ADR_SPACE_TYPE ACPI_ADR_SPACE_HANDLER ACPI_ADR_SPACE_SETUP Setup
Definition: acpixf.h:822

Referenced by MainWndSwitchEditorContext().

◆ UninitImageEditWindowImpl()

VOID UninitImageEditWindowImpl ( VOID  )

Definition at line 538 of file imgedwnd.c.

539 {
541  hInstance);
542 }
static const TCHAR szImageEditWndClass[]
Definition: imgedwnd.c:3
HINSTANCE hInstance
Definition: charmap.c:20
#define UnregisterClass
Definition: winuser.h:5762

Referenced by _tWinMain().

Variable Documentation

◆ szImageEditWndClass

const TCHAR szImageEditWndClass[] = TEXT("ImageSoftEditWndClass")
static