ReactOS  0.4.15-dev-5615-gc3644fd
CImgAreaWindow Class Reference

#include <imgarea.h>

Inheritance diagram for CImgAreaWindow:
Collaboration diagram for CImgAreaWindow:

Public Member Functions

 CImgAreaWindow ()
 
void cancelDrawing ()
 
void finishDrawing ()
 
- Public Member Functions inherited from ATL::CWindowImpl< CMainWindow >
HWND Create (HWND hWndParent, _U_RECT rect=NULL, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
 
- Public Member Functions inherited from ATL::CWindowImplBaseT< CWindow, CControlWinTraits >
 CWindowImplBaseT ()
 
virtual void OnFinalMessage (HWND)
 
BOOL SubclassWindow (HWND hWnd)
 
HWND UnsubclassWindow (BOOL bForce=FALSE)
 
virtual WNDPROC GetWindowProc ()
 
LRESULT DefWindowProc (UINT uMsg, WPARAM wParam, LPARAM lParam)
 
HWND Create (HWND hWndParent, _U_RECT rect, LPCTSTR szWindowName, DWORD dwStyle, DWORD dwExStyle, _U_MENUorID MenuOrID, ATOM atom, LPVOID lpCreateParam)
 
- Public Member Functions inherited from ATL::CWindowImplRoot< CWindow >
 CWindowImplRoot ()
 
virtual ~CWindowImplRoot ()
 
- Public Member Functions inherited from ATL::CWindow
 CWindow (HWND hWnd=NULL)
 
 operator HWND () const
 
UINT ArrangeIconicWindows ()
 
void Attach (HWND hWndNew)
 
HDC BeginPaint (LPPAINTSTRUCT lpPaint)
 
BOOL BringWindowToTop ()
 
BOOL CenterWindow (HWND hWndCenter=NULL)
 
BOOL ChangeClipboardChain (HWND hWndNewNext)
 
BOOL CheckDlgButton (int nIDButton, UINT nCheck)
 
BOOL CheckRadioButton (int nIDFirstButton, int nIDLastButton, int nIDCheckButton)
 
HWND ChildWindowFromPoint (POINT point) const
 
HWND ChildWindowFromPointEx (POINT point, UINT uFlags) const
 
BOOL ClientToScreen (LPPOINT lpPoint) const
 
BOOL ClientToScreen (LPRECT lpRect) const
 
HWND Create (LPCTSTR lpstrWndClass, HWND hWndParent, _U_RECT rect=NULL, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
 
BOOL CreateCaret (HBITMAP pBitmap)
 
BOOL CreateGrayCaret (int nWidth, int nHeight)
 
BOOL CreateSolidCaret (int nWidth, int nHeight)
 
HDWP DeferWindowPos (HDWP hWinPosInfo, HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT uFlags)
 
BOOL DestroyWindow ()
 
HWND Detach ()
 
int DlgDirList (LPTSTR lpPathSpec, int nIDListBox, int nIDStaticPath, UINT nFileType)
 
int DlgDirListComboBox (LPTSTR lpPathSpec, int nIDComboBox, int nIDStaticPath, UINT nFileType)
 
BOOL DlgDirSelect (LPTSTR lpString, int nCount, int nIDListBox)
 
BOOL DlgDirSelectComboBox (LPTSTR lpString, int nCount, int nIDComboBox)
 
void DragAcceptFiles (BOOL bAccept=TRUE)
 
BOOL DrawMenuBar ()
 
BOOL EnableScrollBar (UINT uSBFlags, UINT uArrowFlags=ESB_ENABLE_BOTH)
 
BOOL EnableWindow (BOOL bEnable=TRUE)
 
void EndPaint (LPPAINTSTRUCT lpPaint)
 
BOOL FlashWindow (BOOL bInvert)
 
BOOL GetClientRect (LPRECT lpRect) const
 
HDC GetDC ()
 
HDC GetDCEx (HRGN hRgnClip, DWORD flags)
 
HWND GetDescendantWindow (int nID) const
 
HRESULT GetDlgControl (int nID, REFIID iid, void **ppCtrl)
 
int GetDlgCtrlID () const
 
HRESULT GetDlgHost (int nID, REFIID iid, void **ppHost)
 
HWND GetDlgItem (_In_ int nID) const
 
UINT GetDlgItemInt (_In_ int nID, _Out_opt_ BOOL *lpTrans=NULL, _In_ BOOL bSigned=TRUE) const
 
UINT GetDlgItemText (_In_ int nID, _Out_writes_to_(nMaxCount, return+1) LPTSTR lpStr, _In_ int nMaxCount) const
 
BOOL GetDlgItemText (_In_ int nID, _Inout_ _Outref_result_maybenull_ _Post_z_ BSTR &bstrText) const
 
DWORD GetExStyle () const
 
HFONT GetFont () const
 
DWORD GetHotKey () const
 
HICON GetIcon (BOOL bBigIcon=TRUE) const
 
HWND GetLastActivePopup () const
 
HMENU GetMenu () const
 
HWND GetNextDlgGroupItem (HWND hWndCtl, BOOL bPrevious=FALSE) const
 
HWND GetNextDlgTabItem (HWND hWndCtl, BOOL bPrevious=FALSE) const
 
CWindow GetParent () const
 
BOOL GetScrollInfo (int nBar, LPSCROLLINFO lpScrollInfo)
 
BOOL GetScrollPos (int nBar)
 
BOOL GetScrollRange (int nBar, LPINT lpMinPos, LPINT lpMaxPos) const
 
DWORD GetStyle () const
 
HMENU GetSystemMenu (BOOL bRevert)
 
HWND GetTopLevelParent () const
 
HWND GetTopLevelWindow () const
 
HWND GetTopWindow () const
 
BOOL GetUpdateRect (LPRECT lpRect, BOOL bErase=FALSE)
 
int GetUpdateRgn (HRGN hRgn, BOOL bErase=FALSE)
 
HWND GetWindow (UINT nCmd) const
 
DWORD GetWindowContextHelpId () const
 
HDC GetWindowDC ()
 
LONG GetWindowLong (int nIndex) const
 
LONG_PTR GetWindowLongPtr (int nIndex) const
 
BOOL GetWindowPlacement (WINDOWPLACEMENT *lpwndpl) const
 
DWORD GetWindowProcessID ()
 
BOOL GetWindowRect (LPRECT lpRect) const
 
int GetWindowRgn (HRGN hRgn)
 
int GetWindowText (_Out_writes_to_(nMaxCount, return+1) LPTSTR lpszStringBuf, _In_ int nMaxCount) const
 
BOOL GetWindowText (_Inout_ _Outref_result_maybenull_ _Post_z_ BSTR &bstrText) const
 
int GetWindowTextLength () const
 
DWORD GetWindowThreadID ()
 
WORD GetWindowWord (int nIndex) const
 
void GotoDlgCtrl (HWND hWndCtrl) const
 
BOOL HideCaret ()
 
BOOL HiliteMenuItem (HMENU hMenu, UINT uHiliteItem, UINT uHilite)
 
BOOL Invalidate (BOOL bErase=TRUE)
 
BOOL InvalidateRect (LPCRECT lpRect, BOOL bErase=TRUE)
 
void InvalidateRgn (HRGN hRgn, BOOL bErase=TRUE)
 
BOOL IsChild (const HWND hWnd) const
 
BOOL IsDialogMessage (LPMSG lpMsg)
 
UINT IsDlgButtonChecked (int nIDButton) const
 
BOOL IsIconic () const
 
BOOL IsParentDialog ()
 
BOOL IsWindow () const
 
BOOL IsWindowEnabled () const
 
BOOL IsWindowVisible () const
 
BOOL IsWindowUnicode ()
 
BOOL IsZoomed () const
 
BOOL KillTimer (UINT_PTR nIDEvent)
 
BOOL LockWindowUpdate (BOOL bLock=TRUE)
 
int MapWindowPoints (HWND hWndTo, LPPOINT lpPoint, UINT nCount) const
 
int MapWindowPoints (HWND hWndTo, LPRECT lpRect) const
 
int MessageBox (LPCTSTR lpszText, LPCTSTR lpszCaption=NULL, UINT nType=MB_OK)
 
BOOL ModifyStyle (DWORD dwRemove, DWORD dwAdd, UINT nFlags=0)
 
BOOL ModifyStyleEx (DWORD dwRemove, DWORD dwAdd, UINT nFlags=0)
 
BOOL MoveWindow (int x, int y, int nWidth, int nHeight, BOOL bRepaint=TRUE)
 
void NextDlgCtrl () const
 
BOOL OpenClipboard ()
 
BOOL PostMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
void PrevDlgCtrl () const
 
void Print (HDC hDC, DWORD dwFlags) const
 
void PrintClient (HDC hDC, DWORD dwFlags) const
 
BOOL RedrawWindow (LPCRECT lpRectUpdate=NULL, HRGN hRgnUpdate=NULL, UINT flags=RDW_INVALIDATE|RDW_UPDATENOW|RDW_ERASE)
 
int ReleaseDC (HDC hDC)
 
BOOL ResizeClient (int nWidth, int nHeight, BOOL bRedraw=FALSE)
 
BOOL ScreenToClient (LPPOINT lpPoint) const
 
BOOL ScrollWindow (int xAmount, int yAmount, LPCRECT lpRect=NULL, LPCRECT lpClipRect=NULL)
 
int ScrollWindowEx (int dx, int dy, LPCRECT lpRectScroll, LPCRECT lpRectClip, HRGN hRgnUpdate, LPRECT lpRectUpdate, UINT flags)
 
LRESULT SendDlgItemMessage (int nID, UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
LRESULT SendMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
void SendMessageToDescendants (UINT message, WPARAM wParam=0, LPARAM lParam=0, BOOL bDeep=TRUE)
 
BOOL SendNotifyMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
HWND SetActiveWindow ()
 
HWND SetCapture ()
 
HWND SetClipboardViewer ()
 
int SetDlgCtrlID (int nID)
 
BOOL SetDlgItemInt (int nID, UINT nValue, BOOL bSigned=TRUE)
 
BOOL SetDlgItemText (int nID, LPCTSTR lpszString)
 
HWND SetFocus ()
 
void SetFont (HFONT hFont, BOOL bRedraw=TRUE)
 
int SetHotKey (WORD wVirtualKeyCode, WORD wModifiers)
 
HICON SetIcon (HICON hIcon, BOOL bBigIcon=TRUE)
 
BOOL SetMenu (HMENU hMenu)
 
HWND SetParent (HWND hWndNewParent)
 
void SetRedraw (BOOL bRedraw=TRUE)
 
int SetScrollInfo (int nBar, LPSCROLLINFO lpScrollInfo, BOOL bRedraw=TRUE)
 
int SetScrollPos (int nBar, int nPos, BOOL bRedraw=TRUE)
 
BOOL SetScrollRange (int nBar, int nMinPos, int nMaxPos, BOOL bRedraw=TRUE)
 
UINT_PTR SetTimer (UINT_PTR nIDEvent, UINT nElapse, void(CALLBACK *lpfnTimer)(HWND, UINT, UINT_PTR, DWORD)=NULL)
 
BOOL SetWindowContextHelpId (DWORD dwContextHelpId)
 
LONG SetWindowLong (int nIndex, LONG dwNewLong)
 
LONG_PTR SetWindowLongPtr (int nIndex, LONG_PTR dwNewLong)
 
BOOL SetWindowPlacement (const WINDOWPLACEMENT *lpwndpl)
 
BOOL SetWindowPos (HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags)
 
int SetWindowRgn (HRGN hRgn, BOOL bRedraw=FALSE)
 
BOOL SetWindowText (LPCTSTR lpszString)
 
WORD SetWindowWord (int nIndex, WORD wNewWord)
 
BOOL ShowCaret ()
 
BOOL ShowOwnedPopups (BOOL bShow=TRUE)
 
BOOL ShowScrollBar (UINT nBar, BOOL bShow=TRUE)
 
BOOL ShowWindow (int nCmdShow)
 
BOOL ShowWindowAsync (int nCmdShow)
 
BOOL UpdateWindow ()
 
BOOL ValidateRect (LPCRECT lpRect)
 
BOOL ValidateRgn (HRGN hRgn)
 
BOOL WinHelp (LPCTSTR lpszHelp, UINT nCmd=HELP_CONTEXT, DWORD dwData=0)
 
- Public Member Functions inherited from ATL::CMessageMap
virtual BOOL ProcessWindowMessage (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult, DWORD dwMsgMapID)=0
 

Public Attributes

BOOL drawing
 
- Public Attributes inherited from ATL::CWindowImplBaseT< CWindow, CControlWinTraits >
WNDPROC m_pfnSuperWindowProc
 
- Public Attributes inherited from ATL::CWindowImplRoot< CWindow >
CWndProcThunk m_thunk
 
const _ATL_MSGm_pCurrentMsg
 
DWORD m_dwState
 
- Public Attributes inherited from ATL::CWindow
HWND m_hWnd
 

Private Member Functions

LRESULT OnSize (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnEraseBkGnd (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnPaint (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSetCursor (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnLButtonDown (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnLButtonDblClk (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnRButtonDown (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnRButtonDblClk (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnLButtonUp (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnRButtonUp (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnMouseMove (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnMouseWheel (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnMouseLeave (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnImageModelDimensionsChanged (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnImageModelImageChanged (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnCaptureChanged (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnKeyDown (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnCtlColorEdit (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
void drawZoomFrame (int mouseX, int mouseY)
 

Additional Inherited Members

- Public Types inherited from ATL::CWindowImplRoot< CWindow >
enum  
 
- Static Public Member Functions inherited from ATL::CWindowImpl< CMainWindow >
static LPCTSTR GetWndCaption ()
 
- Static Public Member Functions inherited from ATL::CWindowImplBaseT< CWindow, CControlWinTraits >
static DWORD GetWndStyle (DWORD dwStyle)
 
static DWORD GetWndExStyle (DWORD dwExStyle)
 
static LRESULT CALLBACK StartWindowProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static LRESULT CALLBACK WindowProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
- Static Public Member Functions inherited from ATL::CWindow
static LPCTSTR GetWndClassName ()
 
static LRESULT SendMessage (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 
- Static Public Attributes inherited from ATL::CWindow
static RECT rcDefault
 

Detailed Description

Definition at line 13 of file imgarea.h.

Constructor & Destructor Documentation

◆ CImgAreaWindow()

CImgAreaWindow::CImgAreaWindow ( )
inline

Definition at line 16 of file imgarea.h.

16  : drawing(FALSE)
17  {
18  }
#define FALSE
Definition: types.h:117
BOOL drawing
Definition: imgarea.h:20

Member Function Documentation

◆ cancelDrawing()

void CImgAreaWindow::cancelDrawing ( )

Definition at line 238 of file imgarea.cpp.

239 {
240  drawing = FALSE;
242  Invalidate(FALSE);
243 }
ToolsModel toolsModel
Definition: main.cpp:18
void OnCancelDraw()
Definition: toolsmodel.cpp:215
#define FALSE
Definition: types.h:117
BOOL drawing
Definition: imgarea.h:20
BOOL Invalidate(BOOL bErase=TRUE)
Definition: atlwin.h:890

Referenced by CSelectionWindow::OnCaptureChanged(), OnCaptureChanged(), CMainWindow::OnCommand(), and OnKeyDown().

◆ drawZoomFrame()

void CImgAreaWindow::drawZoomFrame ( int  mouseX,
int  mouseY 
)
private

Definition at line 33 of file imgarea.cpp.

34 {
35  HDC hdc;
36  HPEN oldPen;
37  HBRUSH oldBrush;
38  LOGBRUSH logbrush;
39  int rop;
40 
41  RECT clientRectScrollbox;
42  RECT clientRectImageArea;
43  int x, y, w, h;
44  scrollboxWindow.GetClientRect(&clientRectScrollbox);
45  GetClientRect(&clientRectImageArea);
46  w = clientRectImageArea.right * 2;
47  h = clientRectImageArea.bottom * 2;
48  if (!w || !h)
49  {
50  return;
51  }
52  w = clientRectImageArea.right * clientRectScrollbox.right / w;
53  h = clientRectImageArea.bottom * clientRectScrollbox.bottom / h;
54  x = max(0, min(clientRectImageArea.right - w, mouseX - w / 2));
55  y = max(0, min(clientRectImageArea.bottom - h, mouseY - h / 2));
56 
57  hdc = GetDC();
58  oldPen = (HPEN) SelectObject(hdc, CreatePen(PS_SOLID, 0, 0));
59  logbrush.lbStyle = BS_HOLLOW;
60  oldBrush = (HBRUSH) SelectObject(hdc, CreateBrushIndirect(&logbrush));
61  rop = SetROP2(hdc, R2_NOT);
62  Rectangle(hdc, x, y, x + w, y + h);
63  SetROP2(hdc, rop);
64  DeleteObject(SelectObject(hdc, oldBrush));
65  DeleteObject(SelectObject(hdc, oldPen));
66  ReleaseDC(hdc);
67 }
#define max(a, b)
Definition: svc.c:63
HPEN WINAPI CreatePen(_In_ int, _In_ int, _In_ COLORREF)
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
#define R2_NOT
Definition: wingdi.h:347
UINT lbStyle
Definition: wingdi.h:1747
BOOL WINAPI Rectangle(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
static HDC
Definition: imagelist.c:92
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1539
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
LONG right
Definition: windef.h:308
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
#define PS_SOLID
Definition: wingdi.h:586
int WINAPI SetROP2(_In_ HDC, _In_ int)
Definition: dc.c:1107
static int rop(int rop, int src, int dst)
Definition: nanoxwin.c:124
BOOL GetClientRect(LPRECT lpRect) const
Definition: atlwin.h:535
#define BS_HOLLOW
Definition: wingdi.h:1088
HDC hdc
Definition: main.c:9
HBRUSH WINAPI CreateBrushIndirect(_In_ const LOGBRUSH *plb)
int ReleaseDC(HDC hDC)
Definition: atlwin.h:1068
#define min(a, b)
Definition: monoChain.cc:55
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
CScrollboxWindow scrollboxWindow
Definition: main.cpp:69
LONG bottom
Definition: windef.h:309
HDC GetDC()
Definition: atlwin.h:541

Referenced by OnMouseMove().

◆ finishDrawing()

void CImgAreaWindow::finishDrawing ( )

Definition at line 415 of file imgarea.cpp.

416 {
418  drawing = FALSE;
419  Invalidate(FALSE);
420 }
ToolsModel toolsModel
Definition: main.cpp:18
#define FALSE
Definition: types.h:117
void OnFinishDraw()
Definition: toolsmodel.cpp:223
BOOL drawing
Definition: imgarea.h:20
BOOL Invalidate(BOOL bErase=TRUE)
Definition: atlwin.h:890

Referenced by CMainWindow::ConfirmSave(), CMainWindow::OnCommand(), and CMainWindow::saveImage().

◆ OnCaptureChanged()

LRESULT CImgAreaWindow::OnCaptureChanged ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 245 of file imgarea.cpp.

246 {
247  if (drawing)
248  cancelDrawing();
249  return 0;
250 }
BOOL drawing
Definition: imgarea.h:20
void cancelDrawing()
Definition: imgarea.cpp:238

◆ OnCtlColorEdit()

LRESULT CImgAreaWindow::OnCtlColorEdit ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 408 of file imgarea.cpp.

409 {
410  HDC hdc = (HDC)wParam;
413 }
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define NULL_BRUSH
Definition: wingdi.h:901
static HDC
Definition: imagelist.c:92
WPARAM wParam
Definition: combotst.c:138
int WINAPI SetBkMode(_In_ HDC, _In_ int)
Definition: dc.c:1056
#define TRANSPARENT
Definition: wingdi.h:950
HDC hdc
Definition: main.c:9
LONG_PTR LRESULT
Definition: windef.h:209

◆ OnEraseBkGnd()

LRESULT CImgAreaWindow::OnEraseBkGnd ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 105 of file imgarea.cpp.

106 {
107  HDC hdc = (HDC)wParam;
108 
111  {
112  // Do clipping
114  RECT rcChild;
115  ::GetWindowRect(hChild, &rcChild);
116  ::MapWindowPoints(NULL, m_hWnd, (LPPOINT)&rcChild, 2);
117  ExcludeClipRect(hdc, rcChild.left, rcChild.top, rcChild.right, rcChild.bottom);
118  }
119 
120  return DefWindowProc(nMsg, wParam, lParam);
121 }
int MapWindowPoints(HWND hWndTo, LPPOINT lpPoint, UINT nCount) const
Definition: atlwin.h:984
ToolsModel toolsModel
Definition: main.cpp:18
static HTREEITEM hChild
Definition: treeview.c:381
static HDC
Definition: imagelist.c:92
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
LONG right
Definition: windef.h:308
WPARAM wParam
Definition: combotst.c:138
LRESULT DefWindowProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: atlwin.h:1606
BOOL GetWindowRect(LPRECT lpRect) const
Definition: atlwin.h:810
TOOLTYPE GetActiveTool() const
Definition: toolsmodel.cpp:76
HDC hdc
Definition: main.c:9
HWND m_hWnd
Definition: atlwin.h:267
int WINAPI ExcludeClipRect(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
#define NULL
Definition: types.h:112
LONG bottom
Definition: windef.h:309
CTextEditWindow textEditWindow
Definition: main.cpp:81
LPARAM lParam
Definition: combotst.c:139
BOOL IsWindowVisible() const
Definition: atlwin.h:952
BOOL IsBackgroundTransparent() const
Definition: toolsmodel.cpp:135

◆ OnImageModelDimensionsChanged()

LRESULT CImgAreaWindow::OnImageModelDimensionsChanged ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 391 of file imgarea.cpp.

392 {
394  return 0;
395 }
void updateCanvasAndScrollbars()
Definition: imgarea.cpp:18

◆ OnImageModelImageChanged()

LRESULT CImgAreaWindow::OnImageModelImageChanged ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 397 of file imgarea.cpp.

398 {
399  Invalidate(FALSE);
400  return 0;
401 }
#define FALSE
Definition: types.h:117
BOOL Invalidate(BOOL bErase=TRUE)
Definition: atlwin.h:890

◆ OnKeyDown()

LRESULT CImgAreaWindow::OnKeyDown ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 252 of file imgarea.cpp.

253 {
254  if (wParam == VK_ESCAPE)
255  {
256  if (GetCapture() == m_hWnd)
257  {
258  ReleaseCapture();
259  }
260  else
261  {
262  if (drawing || ToolBase::pointSP != 0 || selectionWindow.IsWindowVisible())
263  cancelDrawing();
264  }
265  }
266  return 0;
267 }
#define VK_ESCAPE
Definition: winuser.h:2204
WPARAM wParam
Definition: combotst.c:138
HWND WINAPI GetCapture(void)
Definition: message.c:2881
static INT pointSP
Definition: toolsmodel.h:39
HWND m_hWnd
Definition: atlwin.h:267
BOOL drawing
Definition: imgarea.h:20
void cancelDrawing()
Definition: imgarea.cpp:238
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2890
CSelectionWindow selectionWindow
Definition: main.cpp:71

◆ OnLButtonDblClk()

LRESULT CImgAreaWindow::OnLButtonDblClk ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 192 of file imgarea.cpp.

193 {
194  drawing = FALSE;
195  ReleaseCapture();
199  Invalidate(FALSE);
200  return 0;
201 }
ToolsModel toolsModel
Definition: main.cpp:18
void resetTool()
Definition: toolsmodel.cpp:231
#define TRUE
Definition: types.h:120
#define GET_X_LPARAM(lp)
Definition: windowsx.h:299
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
int32_t INT
Definition: typedefs.h:58
void OnButtonDown(BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick)
Definition: toolsmodel.cpp:191
#define FALSE
Definition: types.h:117
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
BOOL drawing
Definition: imgarea.h:20
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:300
BOOL Invalidate(BOOL bErase=TRUE)
Definition: atlwin.h:890
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2890
LPARAM lParam
Definition: combotst.c:139
static int UnZoomed(int xy)
Definition: common.h:42

◆ OnLButtonDown()

LRESULT CImgAreaWindow::OnLButtonDown ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 182 of file imgarea.cpp.

183 {
184  drawing = TRUE;
185  SetCapture();
188  Invalidate(FALSE);
189  return 0;
190 }
ToolsModel toolsModel
Definition: main.cpp:18
#define TRUE
Definition: types.h:120
#define GET_X_LPARAM(lp)
Definition: windowsx.h:299
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
int32_t INT
Definition: typedefs.h:58
void OnButtonDown(BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick)
Definition: toolsmodel.cpp:191
#define FALSE
Definition: types.h:117
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
BOOL drawing
Definition: imgarea.h:20
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:300
BOOL Invalidate(BOOL bErase=TRUE)
Definition: atlwin.h:890
LPARAM lParam
Definition: combotst.c:139
HWND SetCapture()
Definition: atlwin.h:1162
static int UnZoomed(int xy)
Definition: common.h:42

◆ OnLButtonUp()

LRESULT CImgAreaWindow::OnLButtonUp ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 224 of file imgarea.cpp.

225 {
226  if (drawing)
227  {
228  drawing = FALSE;
231  Invalidate(FALSE);
233  }
234  ReleaseCapture();
235  return 0;
236 }
ToolsModel toolsModel
Definition: main.cpp:18
#define TRUE
Definition: types.h:120
#define GET_X_LPARAM(lp)
Definition: windowsx.h:299
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
int32_t INT
Definition: typedefs.h:58
#define FALSE
Definition: types.h:117
LONG_PTR LPARAM
Definition: windef.h:208
void OnButtonUp(BOOL bLeftButton, LONG x, LONG y)
Definition: toolsmodel.cpp:207
HWND hStatusBar
Definition: main.cpp:35
#define SB_SETTEXT
Definition: commctrl.h:1949
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
BOOL drawing
Definition: imgarea.h:20
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:300
BOOL Invalidate(BOOL bErase=TRUE)
Definition: atlwin.h:890
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2890
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1110
LPARAM lParam
Definition: combotst.c:139
static int UnZoomed(int xy)
Definition: common.h:42

◆ OnMouseLeave()

LRESULT CImgAreaWindow::OnMouseLeave ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 383 of file imgarea.cpp.

384 {
387  Invalidate(FALSE);
388  return 0;
389 }
ToolsModel toolsModel
Definition: main.cpp:18
#define FALSE
Definition: types.h:117
LONG_PTR LPARAM
Definition: windef.h:208
#define _T(x)
Definition: vfdio.h:22
HWND hStatusBar
Definition: main.cpp:35
TOOLTYPE GetActiveTool() const
Definition: toolsmodel.cpp:76
#define SB_SETTEXT
Definition: commctrl.h:1949
BOOL Invalidate(BOOL bErase=TRUE)
Definition: atlwin.h:890
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1110

◆ OnMouseMove()

LRESULT CImgAreaWindow::OnMouseMove ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 283 of file imgarea.cpp.

284 {
285  LONG xNow = UnZoomed(GET_X_LPARAM(lParam));
286  LONG yNow = UnZoomed(GET_Y_LPARAM(lParam));
288  {
289  TRACKMOUSEEVENT tme;
290 
292  {
293  Invalidate(FALSE);
294  UpdateWindow();
296  }
297 
298  tme.cbSize = sizeof(TRACKMOUSEEVENT);
299  tme.dwFlags = TME_LEAVE;
300  tme.hwndTrack = m_hWnd;
301  tme.dwHoverTime = 0;
302  TrackMouseEvent(&tme);
303 
304  if (!drawing)
305  {
306  CString strCoord;
307  strCoord.Format(_T("%ld, %ld"), xNow, yNow);
308  SendMessage(hStatusBar, SB_SETTEXT, 1, (LPARAM) (LPCTSTR) strCoord);
309  }
310  }
311  if (drawing)
312  {
313  /* values displayed in statusbar */
314  LONG xRel = xNow - start.x;
315  LONG yRel = yNow - start.y;
316  /* freesel, rectsel and text tools always show numbers limited to fit into image area */
318  {
319  if (xRel < 0)
320  xRel = (xNow < 0) ? -start.x : xRel;
321  else if (xNow > imageModel.GetWidth())
322  xRel = imageModel.GetWidth() - start.x;
323  if (yRel < 0)
324  yRel = (yNow < 0) ? -start.y : yRel;
325  else if (yNow > imageModel.GetHeight())
326  yRel = imageModel.GetHeight() - start.y;
327  }
328  /* rectsel and shape tools always show non-negative numbers when drawing */
330  {
331  if (xRel < 0)
332  xRel = -xRel;
333  if (yRel < 0)
334  yRel = -yRel;
335  }
336  /* while drawing, update cursor coordinates only for tools 3, 7, 8, 9, 14 */
337  switch(toolsModel.GetActiveTool())
338  {
339  case TOOL_RUBBER:
340  case TOOL_PEN:
341  case TOOL_BRUSH:
342  case TOOL_AIRBRUSH:
343  case TOOL_SHAPE:
344  {
345  CString strCoord;
346  strCoord.Format(_T("%ld, %ld"), xNow, yNow);
347  SendMessage(hStatusBar, SB_SETTEXT, 1, (LPARAM) (LPCTSTR) strCoord);
348  break;
349  }
350  default:
351  break;
352  }
353  if (wParam & MK_LBUTTON)
354  {
355  toolsModel.OnMouseMove(TRUE, xNow, yNow);
356  Invalidate(FALSE);
358  {
359  CString strSize;
361  yRel = xRel;
362  strSize.Format(_T("%ld x %ld"), xRel, yRel);
363  SendMessage(hStatusBar, SB_SETTEXT, 2, (LPARAM) (LPCTSTR) strSize);
364  }
365  }
366  if (wParam & MK_RBUTTON)
367  {
368  toolsModel.OnMouseMove(FALSE, xNow, yNow);
369  Invalidate(FALSE);
371  {
372  CString strSize;
374  yRel = xRel;
375  strSize.Format(_T("%ld x %ld"), xRel, yRel);
376  SendMessage(hStatusBar, SB_SETTEXT, 2, (LPARAM) (LPCTSTR) strSize);
377  }
378  }
379  }
380  return 0;
381 }
ToolsModel toolsModel
Definition: main.cpp:18
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
#define MK_LBUTTON
Definition: winuser.h:2357
#define TRUE
Definition: types.h:120
void drawZoomFrame(int mouseX, int mouseY)
Definition: imgarea.cpp:33
#define GET_X_LPARAM(lp)
Definition: windowsx.h:299
void __cdecl Format(UINT nFormatID,...)
Definition: cstringt.h:753
if(dx==0 &&dy==0)
Definition: linetemp.h:174
WPARAM wParam
Definition: combotst.c:138
void OnMouseMove(BOOL bLeftButton, LONG x, LONG y)
Definition: toolsmodel.cpp:199
BOOL WINAPI TrackMouseEvent(_Inout_ LPTRACKMOUSEEVENT)
#define FALSE
Definition: types.h:117
long LONG
Definition: pedump.c:60
#define VK_SHIFT
Definition: winuser.h:2192
LONG_PTR LPARAM
Definition: windef.h:208
#define MK_RBUTTON
Definition: winuser.h:2358
int GetWidth() const
Definition: history.cpp:215
#define _T(x)
Definition: vfdio.h:22
BOOL UpdateWindow()
Definition: atlwin.h:1339
HWND hStatusBar
Definition: main.cpp:35
TOOLTYPE GetActiveTool() const
Definition: toolsmodel.cpp:76
struct tagTRACKMOUSEEVENT TRACKMOUSEEVENT
#define SB_SETTEXT
Definition: commctrl.h:1949
SHORT WINAPI GetAsyncKeyState(_In_ int)
ImageModel imageModel
Definition: main.cpp:32
HWND m_hWnd
Definition: atlwin.h:267
int GetHeight() const
Definition: history.cpp:220
GLuint start
Definition: gl.h:1545
#define TME_LEAVE
Definition: commctrl.h:4981
BOOL drawing
Definition: imgarea.h:20
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:300
BOOL Invalidate(BOOL bErase=TRUE)
Definition: atlwin.h:890
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1110
LPARAM lParam
Definition: combotst.c:139
static int UnZoomed(int xy)
Definition: common.h:42

◆ OnMouseWheel()

LRESULT CImgAreaWindow::OnMouseWheel ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 403 of file imgarea.cpp.

404 {
406 }
WPARAM wParam
Definition: combotst.c:138
#define SendMessage
Definition: winuser.h:5833
CWindow GetParent() const
Definition: atlwin.h:694
LPARAM lParam
Definition: combotst.c:139

◆ OnPaint()

LRESULT CImgAreaWindow::OnPaint ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 123 of file imgarea.cpp.

124 {
125  PAINTSTRUCT ps;
126  HDC hdc = BeginPaint(&ps);
127  int imgXRes = imageModel.GetWidth();
128  int imgYRes = imageModel.GetHeight();
129  StretchBlt(hdc, 0, 0, Zoomed(imgXRes), Zoomed(imgYRes), imageModel.GetDC(), 0, 0, imgXRes,
130  imgYRes, SRCCOPY);
131  if (showGrid && (toolsModel.GetZoom() >= 4000))
132  {
133  HPEN oldPen = (HPEN) SelectObject(hdc, CreatePen(PS_SOLID, 1, 0x00a0a0a0));
134  int counter;
135  for(counter = 0; counter <= imgYRes; counter++)
136  {
137  MoveToEx(hdc, 0, Zoomed(counter), NULL);
138  LineTo(hdc, Zoomed(imgXRes), Zoomed(counter));
139  }
140  for(counter = 0; counter <= imgXRes; counter++)
141  {
142  MoveToEx(hdc, Zoomed(counter), 0, NULL);
143  LineTo(hdc, Zoomed(counter), Zoomed(imgYRes));
144  }
145  DeleteObject(SelectObject(hdc, oldPen));
146  }
147  EndPaint(&ps);
148  if (selectionWindow.IsWindow())
149  selectionWindow.Invalidate(FALSE);
150  if (miniature.IsWindow())
151  miniature.Invalidate(FALSE);
152  if (textEditWindow.IsWindow())
153  textEditWindow.Invalidate(FALSE);
154  return 0;
155 }
static int Zoomed(int xy)
Definition: common.h:37
ToolsModel toolsModel
Definition: main.cpp:18
HPEN WINAPI CreatePen(_In_ int, _In_ int, _In_ COLORREF)
BOOL showGrid
Definition: main.cpp:60
static HDC
Definition: imagelist.c:92
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1539
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
BOOL WINAPI LineTo(_In_ HDC, _In_ int, _In_ int)
void EndPaint(LPPAINTSTRUCT lpPaint)
Definition: atlwin.h:523
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)
BOOL WINAPI MoveToEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
#define PS_SOLID
Definition: wingdi.h:586
#define FALSE
Definition: types.h:117
HDC GetDC()
Definition: history.cpp:239
CMiniatureWindow miniature
Definition: main.cpp:65
GLuint counter
Definition: glext.h:11116
int GetWidth() const
Definition: history.cpp:215
HDC BeginPaint(LPPAINTSTRUCT lpPaint)
Definition: atlwin.h:297
int GetZoom() const
Definition: toolsmodel.cpp:148
HDC hdc
Definition: main.c:9
ImageModel imageModel
Definition: main.cpp:32
int GetHeight() const
Definition: history.cpp:220
#define NULL
Definition: types.h:112
CTextEditWindow textEditWindow
Definition: main.cpp:81
#define SRCCOPY
Definition: wingdi.h:333
CSelectionWindow selectionWindow
Definition: main.cpp:71

◆ OnRButtonDblClk()

LRESULT CImgAreaWindow::OnRButtonDblClk ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 213 of file imgarea.cpp.

214 {
215  drawing = FALSE;
216  ReleaseCapture();
220  Invalidate(FALSE);
221  return 0;
222 }
ToolsModel toolsModel
Definition: main.cpp:18
void resetTool()
Definition: toolsmodel.cpp:231
#define TRUE
Definition: types.h:120
#define GET_X_LPARAM(lp)
Definition: windowsx.h:299
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
int32_t INT
Definition: typedefs.h:58
void OnButtonDown(BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick)
Definition: toolsmodel.cpp:191
#define FALSE
Definition: types.h:117
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
BOOL drawing
Definition: imgarea.h:20
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:300
BOOL Invalidate(BOOL bErase=TRUE)
Definition: atlwin.h:890
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2890
LPARAM lParam
Definition: combotst.c:139
static int UnZoomed(int xy)
Definition: common.h:42

◆ OnRButtonDown()

LRESULT CImgAreaWindow::OnRButtonDown ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 203 of file imgarea.cpp.

204 {
205  drawing = TRUE;
206  SetCapture();
209  Invalidate(FALSE);
210  return 0;
211 }
ToolsModel toolsModel
Definition: main.cpp:18
#define TRUE
Definition: types.h:120
#define GET_X_LPARAM(lp)
Definition: windowsx.h:299
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
int32_t INT
Definition: typedefs.h:58
void OnButtonDown(BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick)
Definition: toolsmodel.cpp:191
#define FALSE
Definition: types.h:117
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
BOOL drawing
Definition: imgarea.h:20
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:300
BOOL Invalidate(BOOL bErase=TRUE)
Definition: atlwin.h:890
LPARAM lParam
Definition: combotst.c:139
HWND SetCapture()
Definition: atlwin.h:1162
static int UnZoomed(int xy)
Definition: common.h:42

◆ OnRButtonUp()

LRESULT CImgAreaWindow::OnRButtonUp ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 269 of file imgarea.cpp.

270 {
271  if (drawing)
272  {
273  drawing = FALSE;
276  Invalidate(FALSE);
278  }
279  ReleaseCapture();
280  return 0;
281 }
ToolsModel toolsModel
Definition: main.cpp:18
#define GET_X_LPARAM(lp)
Definition: windowsx.h:299
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
int32_t INT
Definition: typedefs.h:58
#define FALSE
Definition: types.h:117
LONG_PTR LPARAM
Definition: windef.h:208
void OnButtonUp(BOOL bLeftButton, LONG x, LONG y)
Definition: toolsmodel.cpp:207
HWND hStatusBar
Definition: main.cpp:35
#define SB_SETTEXT
Definition: commctrl.h:1949
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
BOOL drawing
Definition: imgarea.h:20
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:300
BOOL Invalidate(BOOL bErase=TRUE)
Definition: atlwin.h:890
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2890
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1110
LPARAM lParam
Definition: combotst.c:139
static int UnZoomed(int xy)
Definition: common.h:42

◆ OnSetCursor()

LRESULT CImgAreaWindow::OnSetCursor ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 157 of file imgarea.cpp.

158 {
159  switch (toolsModel.GetActiveTool())
160  {
161  case TOOL_FILL:
163  break;
164  case TOOL_COLOR:
166  break;
167  case TOOL_ZOOM:
169  break;
170  case TOOL_PEN:
172  break;
173  case TOOL_AIRBRUSH:
175  break;
176  default:
178  }
179  return 0;
180 }
HCURSOR hCurFill
Definition: main.cpp:42
ToolsModel toolsModel
Definition: main.cpp:18
HCURSOR hCurPen
Definition: main.cpp:45
HCURSOR hCurAirbrush
Definition: main.cpp:46
HCURSOR hCurZoom
Definition: main.cpp:44
TOOLTYPE GetActiveTool() const
Definition: toolsmodel.cpp:76
#define LoadCursor
Definition: winuser.h:5802
#define IDC_CROSS
Definition: winuser.h:685
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define NULL
Definition: types.h:112
HCURSOR hCurColor
Definition: main.cpp:43

◆ OnSize()

LRESULT CImgAreaWindow::OnSize ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 69 of file imgarea.cpp.

70 {
71  if (!IsWindow() || !sizeboxLeftTop.IsWindow())
72  return 0;
73  int imgXRes = imageModel.GetWidth();
74  int imgYRes = imageModel.GetHeight();
75  sizeboxLeftTop.MoveWindow(
76  0,
77  0, GRIP_SIZE, GRIP_SIZE, TRUE);
78  sizeboxCenterTop.MoveWindow(
79  GRIP_SIZE + (Zoomed(imgXRes) - GRIP_SIZE) / 2,
80  0, GRIP_SIZE, GRIP_SIZE, TRUE);
81  sizeboxRightTop.MoveWindow(
82  GRIP_SIZE + Zoomed(imgXRes),
83  0, GRIP_SIZE, GRIP_SIZE, TRUE);
84  sizeboxLeftCenter.MoveWindow(
85  0,
86  GRIP_SIZE + (Zoomed(imgYRes) - GRIP_SIZE) / 2,
88  sizeboxRightCenter.MoveWindow(
89  GRIP_SIZE + Zoomed(imgXRes),
90  GRIP_SIZE + (Zoomed(imgYRes) - GRIP_SIZE) / 2,
92  sizeboxLeftBottom.MoveWindow(
93  0,
94  GRIP_SIZE + Zoomed(imgYRes), GRIP_SIZE, GRIP_SIZE, TRUE);
95  sizeboxCenterBottom.MoveWindow(
96  GRIP_SIZE + (Zoomed(imgXRes) - GRIP_SIZE) / 2,
97  GRIP_SIZE + Zoomed(imgYRes), GRIP_SIZE, GRIP_SIZE, TRUE);
98  sizeboxRightBottom.MoveWindow(
99  GRIP_SIZE + Zoomed(imgXRes),
100  GRIP_SIZE + Zoomed(imgYRes), GRIP_SIZE, GRIP_SIZE, TRUE);
101  UpdateScrollbox();
102  return 0;
103 }
static int Zoomed(int xy)
Definition: common.h:37
#define TRUE
Definition: types.h:120
BOOL IsWindow() const
Definition: atlwin.h:941
CSizeboxWindow sizeboxRightCenter
Definition: main.cpp:77
CSizeboxWindow sizeboxCenterTop
Definition: main.cpp:74
CSizeboxWindow sizeboxRightTop
Definition: main.cpp:75
CSizeboxWindow sizeboxCenterBottom
Definition: main.cpp:79
CSizeboxWindow sizeboxRightBottom
Definition: main.cpp:80
int GetWidth() const
Definition: history.cpp:215
#define GRIP_SIZE
Definition: common.h:13
CSizeboxWindow sizeboxLeftCenter
Definition: main.cpp:76
ImageModel imageModel
Definition: main.cpp:32
CSizeboxWindow sizeboxLeftBottom
Definition: main.cpp:78
int GetHeight() const
Definition: history.cpp:220
void UpdateScrollbox()
Definition: scrollbox.cpp:53
CSizeboxWindow sizeboxLeftTop
Definition: main.cpp:73

Member Data Documentation

◆ drawing


The documentation for this class was generated from the following files: