ReactOS  0.4.12-dev-18-gf469aca
imgarea.cpp
Go to the documentation of this file.
1 /*
2  * PROJECT: PAINT for ReactOS
3  * LICENSE: LGPL
4  * FILE: base/applications/mspaint/imgarea.cpp
5  * PURPOSE: Window procedure of the main window and all children apart from
6  * hPalWin, hToolSettings and hSelection
7  * PROGRAMMERS: Benedikt Freisen
8  * Katayama Hirofumi MZ
9  */
10 
11 /* INCLUDES *********************************************************/
12 
13 #include "precomp.h"
14 
15 #include "dialogs.h"
16 
17 /* FUNCTIONS ********************************************************/
18 
19 void
21 {
22  selectionWindow.ShowWindow(SW_HIDE);
24  scrollboxWindow.Invalidate(TRUE);
26 
27  scrollboxWindow.SetScrollPos(SB_HORZ, 0, TRUE);
28  scrollboxWindow.SetScrollPos(SB_VERT, 0, TRUE);
29 }
30 
31 void CImgAreaWindow::drawZoomFrame(int mouseX, int mouseY)
32 {
33  HDC hdc;
34  HPEN oldPen;
35  HBRUSH oldBrush;
36  LOGBRUSH logbrush;
37  int rop;
38 
39  RECT clientRectScrollbox;
40  RECT clientRectImageArea;
41  int x, y, w, h;
42  scrollboxWindow.GetClientRect(&clientRectScrollbox);
43  GetClientRect(&clientRectImageArea);
44  w = clientRectImageArea.right * 2;
45  h = clientRectImageArea.bottom * 2;
46  if (!w || !h)
47  {
48  return;
49  }
50  w = clientRectImageArea.right * clientRectScrollbox.right / w;
51  h = clientRectImageArea.bottom * clientRectScrollbox.bottom / h;
52  x = max(0, min(clientRectImageArea.right - w, mouseX - w / 2));
53  y = max(0, min(clientRectImageArea.bottom - h, mouseY - h / 2));
54 
55  hdc = GetDC();
56  oldPen = (HPEN) SelectObject(hdc, CreatePen(PS_SOLID, 0, 0));
57  logbrush.lbStyle = BS_HOLLOW;
58  oldBrush = (HBRUSH) SelectObject(hdc, CreateBrushIndirect(&logbrush));
59  rop = SetROP2(hdc, R2_NOT);
60  Rectangle(hdc, x, y, x + w, y + h);
61  SetROP2(hdc, rop);
62  DeleteObject(SelectObject(hdc, oldBrush));
63  DeleteObject(SelectObject(hdc, oldPen));
64  ReleaseDC(hdc);
65 }
66 
68 {
69  int imgXRes = imageModel.GetWidth();
70  int imgYRes = imageModel.GetHeight();
71  sizeboxLeftTop.MoveWindow(
72  0,
73  0, 3, 3, TRUE);
74  sizeboxCenterTop.MoveWindow(
75  imgXRes * toolsModel.GetZoom() / 2000 + 3 * 3 / 4,
76  0, 3, 3, TRUE);
77  sizeboxRightTop.MoveWindow(
78  imgXRes * toolsModel.GetZoom() / 1000 + 3,
79  0, 3, 3, TRUE);
80  sizeboxLeftCenter.MoveWindow(
81  0,
82  imgYRes * toolsModel.GetZoom() / 2000 + 3 * 3 / 4, 3, 3, TRUE);
83  sizeboxRightCenter.MoveWindow(
84  imgXRes * toolsModel.GetZoom() / 1000 + 3,
85  imgYRes * toolsModel.GetZoom() / 2000 + 3 * 3 / 4, 3, 3, TRUE);
86  sizeboxLeftBottom.MoveWindow(
87  0,
88  imgYRes * toolsModel.GetZoom() / 1000 + 3, 3, 3, TRUE);
89  sizeboxCenterBottom.MoveWindow(
90  imgXRes * toolsModel.GetZoom() / 2000 + 3 * 3 / 4,
91  imgYRes * toolsModel.GetZoom() / 1000 + 3, 3, 3, TRUE);
92  sizeboxRightBottom.MoveWindow(
93  imgXRes * toolsModel.GetZoom() / 1000 + 3,
94  imgYRes * toolsModel.GetZoom() / 1000 + 3, 3, 3, TRUE);
96  return 0;
97 }
98 
100 {
101  DefWindowProc(WM_PAINT, wParam, lParam);
102  HDC hdc = GetDC();
103  int imgXRes = imageModel.GetWidth();
104  int imgYRes = imageModel.GetHeight();
105  StretchBlt(hdc, 0, 0, imgXRes * toolsModel.GetZoom() / 1000, imgYRes * toolsModel.GetZoom() / 1000, imageModel.GetDC(), 0, 0, imgXRes,
106  imgYRes, SRCCOPY);
107  if (showGrid && (toolsModel.GetZoom() >= 4000))
108  {
109  HPEN oldPen = (HPEN) SelectObject(hdc, CreatePen(PS_SOLID, 1, 0x00a0a0a0));
110  int counter;
111  for(counter = 0; counter <= imgYRes; counter++)
112  {
113  MoveToEx(hdc, 0, counter * toolsModel.GetZoom() / 1000, NULL);
114  LineTo(hdc, imgXRes * toolsModel.GetZoom() / 1000, counter * toolsModel.GetZoom() / 1000);
115  }
116  for(counter = 0; counter <= imgXRes; counter++)
117  {
118  MoveToEx(hdc, counter * toolsModel.GetZoom() / 1000, 0, NULL);
119  LineTo(hdc, counter * toolsModel.GetZoom() / 1000, imgYRes * toolsModel.GetZoom() / 1000);
120  }
121  DeleteObject(SelectObject(hdc, oldPen));
122  }
123  ReleaseDC(hdc);
124  selectionWindow.Invalidate(FALSE);
125  miniature.Invalidate(FALSE);
126  return 0;
127 }
128 
130 {
131  switch (toolsModel.GetActiveTool())
132  {
133  case TOOL_FILL:
135  break;
136  case TOOL_COLOR:
138  break;
139  case TOOL_ZOOM:
141  break;
142  case TOOL_PEN:
144  break;
145  case TOOL_AIRBRUSH:
147  break;
148  default:
150  }
151  return 0;
152 }
153 
155 {
156  if ((!drawing) || (toolsModel.GetActiveTool() == TOOL_COLOR))
157  {
158  SetCapture();
159  drawing = TRUE;
160  startPaintingL(imageModel.GetDC(), GET_X_LPARAM(lParam) * 1000 / toolsModel.GetZoom(), GET_Y_LPARAM(lParam) * 1000 / toolsModel.GetZoom(),
162  }
163  else
164  {
165  SendMessage(WM_LBUTTONUP, wParam, lParam);
166  imageModel.Undo();
167  }
168  Invalidate(FALSE);
169  if ((toolsModel.GetActiveTool() == TOOL_ZOOM) && (toolsModel.GetZoom() < 8000))
170  zoomTo(toolsModel.GetZoom() * 2, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
171  return 0;
172 }
173 
175 {
176  if ((!drawing) || (toolsModel.GetActiveTool() == TOOL_COLOR))
177  {
178  SetCapture();
179  drawing = TRUE;
180  startPaintingR(imageModel.GetDC(), GET_X_LPARAM(lParam) * 1000 / toolsModel.GetZoom(), GET_Y_LPARAM(lParam) * 1000 / toolsModel.GetZoom(),
182  }
183  else
184  {
185  SendMessage(WM_RBUTTONUP, wParam, lParam);
186  imageModel.Undo();
187  }
188  Invalidate(FALSE);
189  if ((toolsModel.GetActiveTool() == TOOL_ZOOM) && (toolsModel.GetZoom() > 125))
190  zoomTo(toolsModel.GetZoom() / 2, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
191  return 0;
192 }
193 
195 {
196  if (drawing)
197  {
200  Invalidate(FALSE);
202  {
203  COLORREF tempColor =
204  GetPixel(imageModel.GetDC(), GET_X_LPARAM(lParam) * 1000 / toolsModel.GetZoom(), GET_Y_LPARAM(lParam) * 1000 / toolsModel.GetZoom());
205  if (tempColor != CLR_INVALID)
206  paletteModel.SetFgColor(tempColor);
207  }
209  }
210  drawing = FALSE;
211  ReleaseCapture();
212  return 0;
213 }
214 
216 {
217  POINT pt;
218  switch (toolsModel.GetActiveTool())
219  {
220  case TOOL_FREESEL: case TOOL_RECTSEL:
221  case TOOL_TEXT: case TOOL_ZOOM: case TOOL_SHAPE:
224  pointSP = 0;
225  Invalidate(FALSE);
226  break;
227  default:
228  GetCursorPos(&pt);
229  ScreenToClient(&pt);
230  // FIXME: dirty hack
231  if (GetKeyState(VK_LBUTTON) < 0)
232  {
235  }
236  else if (GetKeyState(VK_RBUTTON) < 0)
237  {
240  }
241  imageModel.Undo();
242  pointSP = 0;
244  }
245 }
246 
248 {
249  if (drawing)
250  {
251  cancelDrawing();
252  drawing = FALSE;
253  }
254  return 0;
255 }
256 
258 {
259  if (wParam == VK_ESCAPE)
260  {
261  if (GetCapture() == m_hWnd)
262  {
263  ReleaseCapture();
264  }
265  else
266  {
267  switch (toolsModel.GetActiveTool())
268  {
269  case TOOL_SHAPE: case TOOL_BEZIER:
270  cancelDrawing();
271  break;
272  }
273  }
274  }
275  return 0;
276 }
277 
279 {
280  if (drawing)
281  {
284  Invalidate(FALSE);
286  {
287  COLORREF tempColor =
288  GetPixel(imageModel.GetDC(), GET_X_LPARAM(lParam) * 1000 / toolsModel.GetZoom(), GET_Y_LPARAM(lParam) * 1000 / toolsModel.GetZoom());
289  if (tempColor != CLR_INVALID)
290  paletteModel.SetBgColor(tempColor);
291  }
293  }
294  drawing = FALSE;
295  ReleaseCapture();
296  return 0;
297 }
298 
300 {
301  LONG xNow = GET_X_LPARAM(lParam) * 1000 / toolsModel.GetZoom();
302  LONG yNow = GET_Y_LPARAM(lParam) * 1000 / toolsModel.GetZoom();
304  {
305  TRACKMOUSEEVENT tme;
306 
308  {
309  Invalidate(FALSE);
310  UpdateWindow();
311  drawZoomFrame(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
312  }
313 
314  tme.cbSize = sizeof(TRACKMOUSEEVENT);
315  tme.dwFlags = TME_LEAVE;
316  tme.hwndTrack = m_hWnd;
317  tme.dwHoverTime = 0;
318  TrackMouseEvent(&tme);
319 
320  if (!drawing)
321  {
322  CString strCoord;
323  strCoord.Format(_T("%ld, %ld"), xNow, yNow);
324  SendMessage(hStatusBar, SB_SETTEXT, 1, (LPARAM) (LPCTSTR) strCoord);
325  }
326  }
327  if (drawing)
328  {
329  /* values displayed in statusbar */
330  LONG xRel = xNow - start.x;
331  LONG yRel = yNow - start.y;
332  /* freesel, rectsel and text tools always show numbers limited to fit into image area */
334  {
335  if (xRel < 0)
336  xRel = (xNow < 0) ? -start.x : xRel;
337  else if (xNow > imageModel.GetWidth())
338  xRel = imageModel.GetWidth() - start.x;
339  if (yRel < 0)
340  yRel = (yNow < 0) ? -start.y : yRel;
341  else if (yNow > imageModel.GetHeight())
342  yRel = imageModel.GetHeight() - start.y;
343  }
344  /* rectsel and shape tools always show non-negative numbers when drawing */
346  {
347  if (xRel < 0)
348  xRel = -xRel;
349  if (yRel < 0)
350  yRel = -yRel;
351  }
352  /* while drawing, update cursor coordinates only for tools 3, 7, 8, 9, 14 */
353  switch(toolsModel.GetActiveTool())
354  {
355  case TOOL_RUBBER:
356  case TOOL_PEN:
357  case TOOL_BRUSH:
358  case TOOL_AIRBRUSH:
359  case TOOL_SHAPE:
360  {
361  CString strCoord;
362  strCoord.Format(_T("%ld, %ld"), xNow, yNow);
363  SendMessage(hStatusBar, SB_SETTEXT, 1, (LPARAM) (LPCTSTR) strCoord);
364  break;
365  }
366  }
367  if ((wParam & MK_LBUTTON) != 0)
368  {
370  Invalidate(FALSE);
372  {
373  CString strSize;
375  yRel = xRel;
376  strSize.Format(_T("%ld x %ld"), xRel, yRel);
377  SendMessage(hStatusBar, SB_SETTEXT, 2, (LPARAM) (LPCTSTR) strSize);
378  }
379  }
380  if ((wParam & MK_RBUTTON) != 0)
381  {
383  Invalidate(FALSE);
385  {
386  CString strSize;
388  yRel = xRel;
389  strSize.Format(_T("%ld x %ld"), xRel, yRel);
390  SendMessage(hStatusBar, SB_SETTEXT, 2, (LPARAM) (LPCTSTR) strSize);
391  }
392  }
393  }
394  return 0;
395 }
396 
398 {
401  Invalidate(FALSE);
402  return 0;
403 }
404 
406 {
408  return 0;
409 }
410 
412 {
413  Invalidate(FALSE);
414  return 0;
415 }
#define TOOL_FILL
Definition: definitions.h:138
#define HDC
Definition: msvc.h:22
HCURSOR hCurFill
Definition: main.cpp:42
ToolsModel toolsModel
Definition: main.cpp:18
#define max(a, b)
Definition: svc.c:63
#define TRUE
Definition: types.h:120
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
HPEN WINAPI CreatePen(_In_ int, _In_ int, _In_ COLORREF)
BOOL MoveWindow(int x, int y, int nWidth, int nHeight, BOOL bRepaint=TRUE)
Definition: atlwin.h:949
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
long y
Definition: polytest.cpp:48
#define TOOL_TEXT
Definition: definitions.h:144
#define R2_NOT
Definition: wingdi.h:345
#define MK_LBUTTON
Definition: winuser.h:2321
long x
Definition: polytest.cpp:48
UINT lbStyle
Definition: wingdi.h:1724
BOOL WINAPI Rectangle(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
#define SB_VERT
Definition: winuser.h:553
#define VK_LBUTTON
Definition: winuser.h:2144
#define TOOL_LINE
Definition: definitions.h:145
#define pt(x, y)
Definition: drawing.c:79
void endPaintingL(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg)
Definition: mouse.cpp:218
BOOL showGrid
Definition: main.cpp:59
#define SW_HIDE
Definition: winuser.h:762
BOOL zoomTo(int, int, int)
Definition: winproc.cpp:21
#define SB_HORZ
Definition: winuser.h:552
#define CLR_INVALID
Definition: wingdi.h:881
void drawZoomFrame(int mouseX, int mouseY)
Definition: imgarea.cpp:31
#define TOOL_RUBBER
Definition: definitions.h:137
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
CSizeboxWindow sizeboxRightCenter
Definition: main.cpp:76
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
BOOL WINAPI LineTo(_In_ HDC, _In_ int, _In_ int)
void __cdecl Format(UINT nFormatID,...)
Definition: cstringt.h:668
#define TOOL_SHAPE
Definition: definitions.h:148
SelectionModel selectionModel
Definition: main.cpp:20
#define VK_ESCAPE
Definition: winuser.h:2168
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
Definition: cursoricon.c:2635
DWORD GetPixel(LPDIRECTDRAWSURFACE7 Surface, UINT x, UINT y)
Definition: blt.cpp:2
LONG right
Definition: windef.h:298
BOOL WINAPI StretchBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
WPARAM wParam
Definition: combotst.c:138
void SetBgColor(int newColor)
LRESULT DefWindowProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: atlwin.h:1512
#define TOOL_PEN
Definition: definitions.h:141
void whilePaintingL(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg)
Definition: mouse.cpp:125
LRESULT OnRButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: imgarea.cpp:174
BOOL WINAPI TrackMouseEvent(_Inout_ LPTRACKMOUSEEVENT)
HCURSOR hCurPen
Definition: main.cpp:45
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
int GetZoom()
Definition: toolsmodel.cpp:104
UINT_PTR WPARAM
Definition: windef.h:207
INT INT y
Definition: msvc.h:62
CImgAreaWindow imageArea
Definition: main.cpp:71
BOOL WINAPI MoveToEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
#define PS_SOLID
Definition: wingdi.h:584
CSizeboxWindow sizeboxCenterTop
Definition: main.cpp:73
CSizeboxWindow sizeboxRightTop
Definition: main.cpp:74
CSizeboxWindow sizeboxCenterBottom
Definition: main.cpp:78
#define VK_RBUTTON
Definition: winuser.h:2145
void startPaintingL(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg)
Definition: mouse.cpp:56
LRESULT OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: imgarea.cpp:67
long LONG
Definition: pedump.c:60
#define TOOL_BEZIER
Definition: definitions.h:146
int WINAPI SetROP2(_In_ HDC, _In_ int)
Definition: dc.c:1083
LONG_PTR LPARAM
Definition: windef.h:208
HCURSOR hCurAirbrush
Definition: main.cpp:46
HDC GetDC()
Definition: history.cpp:219
static int rop(int rop, int src, int dst)
Definition: nanoxwin.c:124
BOOL GetClientRect(LPRECT lpRect) const
Definition: atlwin.h:498
HWND WINAPI GetCapture(void)
Definition: message.c:2855
#define VK_SHIFT
Definition: winuser.h:2156
HDC hdc
Definition: msvc.h:53
CMiniatureWindow miniature
Definition: main.cpp:64
#define TOOL_AIRBRUSH
Definition: definitions.h:143
smooth NULL
Definition: ftsmooth.c:416
CSizeboxWindow sizeboxRightBottom
Definition: main.cpp:79
#define GET_X_LPARAM(lp)
Definition: precomp.h:67
GLuint counter
Definition: glext.h:11116
HCURSOR hCurZoom
Definition: main.cpp:44
#define MK_RBUTTON
Definition: winuser.h:2322
SHORT WINAPI GetKeyState(_In_ int)
#define _T(x)
Definition: vfdio.h:22
LRESULT OnLButtonUp(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: imgarea.cpp:194
unsigned int BOOL
Definition: ntddk_ex.h:94
if(!(yy_init))
Definition: macro.lex.yy.c:717
short pointSP
Definition: mouse.cpp:53
BOOL UpdateWindow()
Definition: atlwin.h:1268
unsigned int UINT
Definition: ndis.h:50
void updateCanvasAndScrollbars()
Definition: imgarea.cpp:20
HWND hStatusBar
Definition: main.cpp:35
#define WM_RBUTTONUP
Definition: winuser.h:1756
#define BS_HOLLOW
Definition: wingdi.h:1069
#define TOOL_COLOR
Definition: definitions.h:139
#define WM_PAINT
Definition: winuser.h:1602
int GetWidth()
Definition: history.cpp:195
int GetHeight()
Definition: history.cpp:200
BOOL ScreenToClient(LPPOINT lpPoint) const
Definition: atlwin.h:1015
struct tagTRACKMOUSEEVENT TRACKMOUSEEVENT
#define SB_SETTEXT
Definition: commctrl.h:1919
CSizeboxWindow sizeboxLeftCenter
Definition: main.cpp:75
SHORT WINAPI GetAsyncKeyState(_In_ int)
void SetFgColor(int newColor)
ImageModel imageModel
Definition: main.cpp:32
HWND m_hWnd
Definition: atlwin.h:259
#define TOOL_FREESEL
Definition: definitions.h:135
#define TOOL_BRUSH
Definition: definitions.h:142
LRESULT OnLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: imgarea.cpp:154
#define TOOL_RECTSEL
Definition: definitions.h:136
#define LoadCursor
Definition: winuser.h:5678
HBRUSH WINAPI CreateBrushIndirect(_In_ const LOGBRUSH *plb)
LRESULT OnImageModelImageChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: imgarea.cpp:411
int ReleaseDC(HDC hDC)
Definition: atlwin.h:997
#define IDC_CROSS
Definition: winuser.h:685
CSizeboxWindow sizeboxLeftBottom
Definition: main.cpp:77
PaletteModel paletteModel
Definition: main.cpp:28
LRESULT OnImageModelDimensionsChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: imgarea.cpp:405
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
INT x
Definition: msvc.h:62
#define TOOL_ZOOM
Definition: definitions.h:140
GLuint start
Definition: gl.h:1545
int GetActiveTool()
Definition: toolsmodel.cpp:60
#define TME_LEAVE
Definition: commctrl.h:4941
#define WM_LBUTTONUP
Definition: winuser.h:1753
LRESULT OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: imgarea.cpp:129
LRESULT OnKeyDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: imgarea.cpp:257
#define min(a, b)
Definition: monoChain.cc:55
LRESULT OnMouseLeave(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: imgarea.cpp:397
#define GET_Y_LPARAM(lp)
Definition: precomp.h:68
BOOL drawing
Definition: imgarea.h:34
CScrollboxWindow scrollboxWindow
Definition: main.cpp:68
void UpdateScrollbox()
Definition: scrollbox.cpp:53
void cancelDrawing()
Definition: imgarea.cpp:215
BOOL Invalidate(BOOL bErase=TRUE)
Definition: atlwin.h:819
void Undo(void)
Definition: history.cpp:57
LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: imgarea.cpp:99
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2864
CSizeboxWindow sizeboxLeftTop
Definition: main.cpp:72
void startPaintingR(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg)
Definition: mouse.cpp:329
LRESULT OnMouseMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: imgarea.cpp:299
LRESULT OnRButtonUp(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: imgarea.cpp:278
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1039
LONG bottom
Definition: windef.h:299
void endPaintingR(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg)
Definition: mouse.cpp:464
LONG_PTR LRESULT
Definition: windef.h:209
DWORD COLORREF
Definition: windef.h:290
void ResetToPrevious(void)
Definition: history.cpp:93
LPARAM lParam
Definition: combotst.c:139
HCURSOR hCurColor
Definition: main.cpp:43
HDC GetDC()
Definition: atlwin.h:504
#define SRCCOPY
Definition: wingdi.h:331
void whilePaintingR(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg)
Definition: mouse.cpp:389
HWND SetCapture()
Definition: atlwin.h:1091
CSelectionWindow selectionWindow
Definition: main.cpp:70
LRESULT OnCaptureChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: imgarea.cpp:247