ReactOS  0.4.14-dev-337-gf981a68
CMainWindow Class Reference

#include <winproc.h>

Inheritance diagram for CMainWindow:
Collaboration diagram for CMainWindow:

Public Member Functions

LRESULT OnDropFiles (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnCreate (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnDestroy (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnClose (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnInitMenuPopup (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSize (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnGetMinMaxInfo (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSetCursor (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnKeyDown (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSysColorChange (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnCommand (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
void alignChildrenToMainWindow ()
 
void saveImage (BOOL overwrite)
 
void UpdateApplicationProperties (HBITMAP bitmap, LPCTSTR newfilepathname)
 
void InsertSelectionFromHBITMAP (HBITMAP bitmap, HWND window)
 
 CMainWindow ()
 
HWND Create ()
 
- Public Member Functions inherited from ATL::CWindowImpl< CMainWindow, CWindow, CFrameWinTraits >
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, CFrameWinTraits >
 CWindowImplBaseT ()
 
virtual void OnFinalMessage (HWND)
 
BOOL SubclassWindow (HWND hWnd)
 
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 (int nID)
 
UINT GetDlgItemInt (int nID, BOOL *lpTrans=NULL, BOOL bSigned=TRUE) const
 
UINT GetDlgItemText (int nID, LPTSTR lpStr, int nMaxCount) const
 
BOOL GetDlgItemText (int nID, 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 (LPTSTR lpszStringBuf, int nMaxCount) const
 
BOOL GetWindowText (BSTR &bstrText)
 
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::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)
 
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)
 

Static Public Member Functions

static ATL::CWndClassInfoGetWndClassInfo ()
 
- Static Public Member Functions inherited from ATL::CWindowImpl< CMainWindow, CWindow, CFrameWinTraits >
static LPCTSTR GetWndCaption ()
 
- Static Public Member Functions inherited from ATL::CWindowImplBaseT< CWindow, CFrameWinTraits >
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 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)
 

Private Member Functions

VOID InitApplicationsList ()
 
VOID InitCategoriesList ()
 
BOOL CreateStatusBar ()
 
BOOL CreateToolbar ()
 
BOOL CreateTreeView ()
 
BOOL CreateListView ()
 
BOOL CreateRichEdit ()
 
BOOL CreateVSplitter ()
 
BOOL CreateHSplitter ()
 
BOOL CreateSearchBar ()
 
BOOL CreateLayout ()
 
BOOL InitControls ()
 
VOID ShowAppInfo (INT Index)
 
VOID OnSize (HWND hwnd, WPARAM wParam, LPARAM lParam)
 
VOID RemoveSelectedAppFromRegistry ()
 
BOOL UninstallSelectedApp (BOOL bModify)
 
BOOL ProcessWindowMessage (HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam, LRESULT &theResult, DWORD dwMapId)
 
virtual VOID OnLink (ENLINK *Link)
 
BOOL IsSelectedNodeInstalled ()
 
VOID OnCommand (WPARAM wParam, LPARAM lParam)
 
VOID FreeInstalledAppList ()
 
BOOL CALLBACK EnumInstalledAppProc (INT ItemIndex, ATL::CStringW &m_szName, PINSTALLED_INFO Info)
 
BOOL EnumAvailableAppProc (CAvailableApplicationInfo *Info, LPCWSTR szFolderPath)
 
VOID UpdateStatusBarText ()
 
VOID UpdateApplicationsList (INT EnumType)
 

Static Private Member Functions

static BOOL SearchPatternMatch (LPCWSTR szHaystack, LPCWSTR szNeedle)
 
static BOOL CALLBACK s_EnumInstalledAppProc (INT ItemIndex, ATL::CStringW &m_szName, PINSTALLED_INFO Info, PVOID param)
 
static BOOL CALLBACK s_EnumAvailableAppProc (CAvailableApplicationInfo *Info, LPCWSTR szFolderPath, PVOID param)
 

Private Attributes

CUiPanelm_ClientPanel
 
CUiSplitPanelm_VSplitter
 
CUiSplitPanelm_HSplitter
 
CMainToolbarm_Toolbar
 
CAppsListViewm_ListView
 
CSideTreeViewm_TreeView
 
CUiWindow< CStatusBar > * m_StatusBar
 
CAppRichEditm_RichEdit
 
CUiWindow< CSearchBar > * m_SearchBar
 
CAvailableApps m_AvailableApps
 
LPWSTR pLink
 
INT nSelectedApps
 
BOOL bSearchEnabled
 
BOOL bUpdating
 
ATL::CStringW szSearchPattern
 
INT SelectedEnumType
 

Additional Inherited Members

- Public Types inherited from ATL::CWindowImplRoot< CWindow >
enum  
 
- Public Attributes inherited from ATL::CWindowImplBaseT< CWindow, CFrameWinTraits >
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
 
- Public Attributes inherited from ATL::CWindowImplBaseT< CWindow, CControlWinTraits >
WNDPROC m_pfnSuperWindowProc
 
- Static Public Attributes inherited from ATL::CWindow
static RECT rcDefault
 

Detailed Description

Definition at line 12 of file winproc.h.

Constructor & Destructor Documentation

◆ CMainWindow()

CMainWindow::CMainWindow ( )
inline

Definition at line 778 of file gui.cpp.

778  :
780  pLink(NULL),
783  {
784  }
INT SelectedEnumType
Definition: gui.cpp:775
BOOL bSearchEnabled
Definition: gui.cpp:771
LPWSTR pLink
Definition: gui.cpp:767
smooth NULL
Definition: ftsmooth.c:416
CUiPanel * m_ClientPanel
Definition: gui.cpp:753

Member Function Documentation

◆ alignChildrenToMainWindow()

void CMainWindow::alignChildrenToMainWindow ( )

Definition at line 51 of file winproc.cpp.

52 {
53  int x, y, w, h;
54  RECT clientRect;
55  GetClientRect(&clientRect);
56 
58  {
59  x = 56;
60  w = clientRect.right - 56;
61  }
62  else
63  {
64  x = 0;
65  w = clientRect.right;
66  }
67  if (paletteWindow.IsWindowVisible())
68  {
69  y = 49;
70  h = clientRect.bottom - 49;
71  }
72  else
73  {
74  y = 3;
75  h = clientRect.bottom - 3;
76  }
77 
78  RECT statusBarRect0;
79  SendMessage(hStatusBar, SB_GETRECT, 0, (LPARAM)&statusBarRect0);
80  int statusBarBorders[3];
81  SendMessage(hStatusBar, SB_GETBORDERS, 0, (LPARAM)&statusBarBorders);
82  int statusBarHeight = statusBarRect0.bottom - statusBarRect0.top + statusBarBorders[1];
83 
84  scrollboxWindow.MoveWindow(x, y, w, ::IsWindowVisible(hStatusBar) ? h - statusBarHeight : h, TRUE);
85  paletteWindow.MoveWindow(x, 9, 255, 32, TRUE);
86 }
#define TRUE
Definition: types.h:120
CToolBox toolBoxContainer
Definition: main.cpp:65
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
LONG top
Definition: windef.h:292
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
LONG right
Definition: windef.h:293
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
#define SB_GETRECT
Definition: commctrl.h:1955
BOOL GetClientRect(LPRECT lpRect) const
Definition: atlwin.h:507
#define SB_GETBORDERS
Definition: commctrl.h:1952
LONG_PTR LPARAM
Definition: windef.h:208
HWND hStatusBar
Definition: main.cpp:35
CPaletteWindow paletteWindow
Definition: main.cpp:67
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
CScrollboxWindow scrollboxWindow
Definition: main.cpp:68
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1048
LONG bottom
Definition: windef.h:294
BOOL IsWindowVisible() const
Definition: atlwin.h:890

Referenced by OnCommand(), and OnSize().

◆ Create()

HWND CMainWindow::Create ( )
inline

Definition at line 1837 of file gui.cpp.

1838  {
1839  ATL::CStringW szWindowName;
1840  szWindowName.LoadStringW(IDS_APPTITLE);
1841 
1842  RECT r = {
1847  };
1848  r.right += r.left;
1849  r.bottom += r.top;
1850 
1852  }
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define WS_EX_WINDOWEDGE
Definition: winuser.h:407
#define IDS_APPTITLE
Definition: resource.h:3
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
_In_ BOOLEAN Create
Definition: pstypes.h:511
INT Height
Definition: winmain.h:17
#define WS_CLIPCHILDREN
Definition: pedump.c:619
LONG right
Definition: windef.h:293
#define CW_USEDEFAULT
Definition: winuser.h:225
smooth NULL
Definition: ftsmooth.c:416
SETTINGS_INFO SettingsInfo
Definition: winmain.cpp:18
PCXSTR GetString() const
Definition: atlsimpstr.h:361
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
BOOL bSaveWndPos
Definition: winmain.h:7

Referenced by _tWinMain(), and ShowMainWindow().

◆ CreateHSplitter()

BOOL CMainWindow::CreateHSplitter ( )
inlineprivate

Definition at line 904 of file gui.cpp.

905  {
906  m_HSplitter = new CUiSplitPanel();
911  m_HSplitter->m_Pos = INT_MAX; //set INT_MAX to use lowest possible position (m_MinSecond)
912  m_HSplitter->m_MinFirst = 10;
913  m_HSplitter->m_MinSecond = 140;
915 
916  return m_HSplitter->Create(m_hWnd) != NULL;
917  }
CUiSplitPanel * m_VSplitter
Definition: gui.cpp:754
#define TRUE
Definition: types.h:120
CUiCollection & Second()
Definition: rosui.h:555
#define INT_MAX
Definition: limits.h:40
INT m_MinFirst
Definition: rosui.h:531
INT Append(T *ptr)
Definition: rosui.h:79
CUiAlignment m_HorizontalAlignment
Definition: rosui.h:238
smooth NULL
Definition: ftsmooth.c:416
INT m_MinSecond
Definition: rosui.h:532
CUiSplitPanel * m_HSplitter
Definition: gui.cpp:755
HWND Create(HWND hwndParent)
Definition: rosui.h:790
BOOL m_DynamicFirst
Definition: rosui.h:530
BOOL m_Horizontal
Definition: rosui.h:529
HWND m_hWnd
Definition: atlwin.h:268
CUiAlignment m_VerticalAlignment
Definition: rosui.h:239
INT m_Pos
Definition: rosui.h:528

Referenced by CreateLayout().

◆ CreateLayout()

BOOL CMainWindow::CreateLayout ( )
inlineprivate

Definition at line 930 of file gui.cpp.

931  {
932  BOOL b = TRUE;
933  bUpdating = TRUE;
934 
935  m_ClientPanel = new CUiPanel();
938 
939  // Top level
940  b = b && CreateStatusBar();
941  b = b && CreateToolbar();
942  b = b && CreateSearchBar();
943  b = b && CreateVSplitter();
944 
945  // Inside V Splitter
946  b = b && CreateHSplitter();
947  b = b && CreateTreeView();
948 
949  // Inside H Splitter
950  b = b && CreateListView();
951  b = b && CreateRichEdit();
952 
953  if (b)
954  {
955  RECT rTop;
956  RECT rBottom;
957 
958  /* Size status bar */
959  m_StatusBar->SendMessageW(WM_SIZE, 0, 0);
960 
961  /* Size tool bar */
962  m_Toolbar->AutoSize();
963 
964  ::GetWindowRect(m_Toolbar->m_hWnd, &rTop);
965  ::GetWindowRect(m_StatusBar->m_hWnd, &rBottom);
966 
967  m_VSplitter->m_Margin.top = rTop.bottom - rTop.top;
968  m_VSplitter->m_Margin.bottom = rBottom.bottom - rBottom.top;
969  }
970 
971  bUpdating = FALSE;
972  return b;
973  }
CUiSplitPanel * m_VSplitter
Definition: gui.cpp:754
#define TRUE
Definition: types.h:120
BOOL CreateStatusBar()
Definition: gui.cpp:839
BOOL bUpdating
Definition: gui.cpp:772
BOOL CreateTreeView()
Definition: gui.cpp:859
LONG top
Definition: windef.h:292
BOOL CreateHSplitter()
Definition: gui.cpp:904
BOOL CreateSearchBar()
Definition: gui.cpp:919
unsigned int BOOL
Definition: ntddk_ex.h:94
CUiAlignment m_HorizontalAlignment
Definition: rosui.h:238
BOOL GetWindowRect(LPRECT lpRect) const
Definition: atlwin.h:764
DWORD AutoSize()
Definition: rosctrls.h:371
BOOL CreateToolbar()
Definition: gui.cpp:849
#define b
Definition: ke_i.h:79
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define WM_SIZE
Definition: winuser.h:1593
CUiAlignment m_VerticalAlignment
Definition: rosui.h:239
BOOL CreateListView()
Definition: gui.cpp:869
CMainToolbar * m_Toolbar
Definition: gui.cpp:757
LONG bottom
Definition: windef.h:294
CUiMargin m_Margin
Definition: rosui.h:236
BOOL CreateVSplitter()
Definition: gui.cpp:889
BOOL CreateRichEdit()
Definition: gui.cpp:879
CUiPanel * m_ClientPanel
Definition: gui.cpp:753
CUiWindow< CStatusBar > * m_StatusBar
Definition: gui.cpp:761

Referenced by InitControls().

◆ CreateListView()

BOOL CMainWindow::CreateListView ( )
inlineprivate

Definition at line 869 of file gui.cpp.

870  {
871  m_ListView = new CAppsListView();
875 
876  return m_ListView->Create(m_hWnd) != NULL;
877  }
INT Append(T *ptr)
Definition: rosui.h:79
CUiAlignment m_HorizontalAlignment
Definition: rosui.h:238
smooth NULL
Definition: ftsmooth.c:416
CUiSplitPanel * m_HSplitter
Definition: gui.cpp:755
CUiCollection & First()
Definition: rosui.h:554
HWND m_hWnd
Definition: atlwin.h:268
CUiAlignment m_VerticalAlignment
Definition: rosui.h:239
HWND Create(HWND hwndParent)
Definition: gui.cpp:571
CAppsListView * m_ListView
Definition: gui.cpp:758

Referenced by CreateLayout().

◆ CreateRichEdit()

BOOL CMainWindow::CreateRichEdit ( )
inlineprivate

Definition at line 879 of file gui.cpp.

880  {
881  m_RichEdit = new CAppRichEdit();
885 
886  return m_RichEdit->Create(m_hWnd) != NULL;
887  }
CUiCollection & Second()
Definition: rosui.h:555
INT Append(T *ptr)
Definition: rosui.h:79
CUiAlignment m_HorizontalAlignment
Definition: rosui.h:238
smooth NULL
Definition: ftsmooth.c:416
CUiSplitPanel * m_HSplitter
Definition: gui.cpp:755
HWND m_hWnd
Definition: atlwin.h:268
HWND Create(HWND hwndParent)
Definition: crichedit.h:95
CUiAlignment m_VerticalAlignment
Definition: rosui.h:239
CAppRichEdit * m_RichEdit
Definition: gui.cpp:762

Referenced by CreateLayout().

◆ CreateSearchBar()

BOOL CMainWindow::CreateSearchBar ( )
inlineprivate

Definition at line 919 of file gui.cpp.

920  {
924  m_SearchBar->m_Margin.top = 4;
926 
927  return m_SearchBar->Create(m_Toolbar->m_hWnd) != NULL;
928  }
LONG top
Definition: windef.h:292
LONG right
Definition: windef.h:293
CUiAlignment m_HorizontalAlignment
Definition: rosui.h:238
smooth NULL
Definition: ftsmooth.c:416
HWND Create(HWND hwndParent)
Definition: gui.cpp:733
CUiWindow< CSearchBar > * m_SearchBar
Definition: gui.cpp:764
CUiAlignment m_VerticalAlignment
Definition: rosui.h:239
CMainToolbar * m_Toolbar
Definition: gui.cpp:757
CUiMargin m_Margin
Definition: rosui.h:236

Referenced by CreateLayout().

◆ CreateStatusBar()

BOOL CMainWindow::CreateStatusBar ( void  )
inlineprivate

Definition at line 839 of file gui.cpp.

840  {
845 
847  }
#define IDC_STATUSBAR
Definition: resource.h:14
INT Append(T *ptr)
Definition: rosui.h:79
CUiAlignment m_HorizontalAlignment
Definition: rosui.h:238
smooth NULL
Definition: ftsmooth.c:416
HWND Create(HWND hwndParent, HMENU hMenu)
Definition: rosctrls.h:455
HWND m_hWnd
Definition: atlwin.h:268
CUiAlignment m_VerticalAlignment
Definition: rosui.h:239
CUiCollection & Children()
Definition: rosui.h:355
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
CUiPanel * m_ClientPanel
Definition: gui.cpp:753
CUiWindow< CStatusBar > * m_StatusBar
Definition: gui.cpp:761

Referenced by CreateLayout().

◆ CreateToolbar()

BOOL CMainWindow::CreateToolbar ( )
inlineprivate

Definition at line 849 of file gui.cpp.

850  {
851  m_Toolbar = new CMainToolbar();
855 
856  return m_Toolbar->Create(m_hWnd) != NULL;
857  }
HWND Create(HWND hwndParent)
Definition: gui.cpp:357
INT Append(T *ptr)
Definition: rosui.h:79
CUiAlignment m_HorizontalAlignment
Definition: rosui.h:238
smooth NULL
Definition: ftsmooth.c:416
HWND m_hWnd
Definition: atlwin.h:268
CUiAlignment m_VerticalAlignment
Definition: rosui.h:239
CMainToolbar * m_Toolbar
Definition: gui.cpp:757
CUiCollection & Children()
Definition: rosui.h:355
CUiPanel * m_ClientPanel
Definition: gui.cpp:753

Referenced by CreateLayout().

◆ CreateTreeView()

BOOL CMainWindow::CreateTreeView ( )
inlineprivate

Definition at line 859 of file gui.cpp.

860  {
861  m_TreeView = new CSideTreeView();
865 
866  return m_TreeView->Create(m_hWnd) != NULL;
867  }
CUiSplitPanel * m_VSplitter
Definition: gui.cpp:754
INT Append(T *ptr)
Definition: rosui.h:79
CUiAlignment m_HorizontalAlignment
Definition: rosui.h:238
smooth NULL
Definition: ftsmooth.c:416
CUiCollection & First()
Definition: rosui.h:554
HWND m_hWnd
Definition: atlwin.h:268
CUiAlignment m_VerticalAlignment
Definition: rosui.h:239
HWND Create(HWND hwndParent)
Definition: rosctrls.h:476
CSideTreeView * m_TreeView
Definition: gui.cpp:760

Referenced by CreateLayout().

◆ CreateVSplitter()

BOOL CMainWindow::CreateVSplitter ( )
inlineprivate

Definition at line 889 of file gui.cpp.

890  {
891  m_VSplitter = new CUiSplitPanel();
896  m_VSplitter->m_MinFirst = 0;
897  m_VSplitter->m_MinSecond = 320;
898  m_VSplitter->m_Pos = 240;
900 
901  return m_VSplitter->Create(m_hWnd) != NULL;
902  }
CUiSplitPanel * m_VSplitter
Definition: gui.cpp:754
INT m_MinFirst
Definition: rosui.h:531
INT Append(T *ptr)
Definition: rosui.h:79
CUiAlignment m_HorizontalAlignment
Definition: rosui.h:238
smooth NULL
Definition: ftsmooth.c:416
INT m_MinSecond
Definition: rosui.h:532
HWND Create(HWND hwndParent)
Definition: rosui.h:790
BOOL m_DynamicFirst
Definition: rosui.h:530
BOOL m_Horizontal
Definition: rosui.h:529
HWND m_hWnd
Definition: atlwin.h:268
CUiAlignment m_VerticalAlignment
Definition: rosui.h:239
INT m_Pos
Definition: rosui.h:528
CUiCollection & Children()
Definition: rosui.h:355
CUiPanel * m_ClientPanel
Definition: gui.cpp:753

Referenced by CreateLayout().

◆ EnumAvailableAppProc()

BOOL CMainWindow::EnumAvailableAppProc ( CAvailableApplicationInfo Info,
LPCWSTR  szFolderPath 
)
inlineprivate

Definition at line 1674 of file gui.cpp.

1675  {
1676  INT Index;
1677  HICON hIcon = NULL;
1678 
1679  HIMAGELIST hImageListView = (HIMAGELIST)m_ListView->SendMessage(LVM_GETIMAGELIST, LVSIL_SMALL, 0);
1680 
1681  if (!SearchPatternMatch(Info->m_szName.GetString(), szSearchPattern) &&
1683  {
1684  return TRUE;
1685  }
1686 
1687  /* Load icon from file */
1688  ATL::CStringW szIconPath;
1689  szIconPath.Format(L"%lsicons\\%ls.ico", szFolderPath, Info->m_szName.GetString());
1690  hIcon = (HICON) LoadImageW(NULL,
1691  szIconPath.GetString(),
1692  IMAGE_ICON,
1695  LR_LOADFROMFILE);
1696 
1697  if (!hIcon || GetLastError() != ERROR_SUCCESS)
1698  {
1699  /* Load default icon */
1701  }
1702 
1703  Index = ImageList_AddIcon(hImageListView, hIcon);
1704  DestroyIcon(hIcon);
1705 
1706  Index = m_ListView->AddItem(Info->m_Category, Index, Info->m_szName.GetString(), (LPARAM) Info);
1707  m_ListView->SetImageList(hImageListView, LVSIL_SMALL);
1708  m_ListView->SetItemText(Index, 1, Info->m_szVersion.GetString());
1709  m_ListView->SetItemText(Index, 2, Info->m_szDesc.GetString());
1710  m_ListView->SetCheckState(Index, Info->m_IsSelected);
1711 
1712  return TRUE;
1713  }
static HICON
Definition: imagelist.c:84
#define TRUE
Definition: types.h:120
#define IMAGE_ICON
Definition: winuser.h:212
#define LVSIL_SMALL
Definition: commctrl.h:2295
ATL::CStringW szSearchPattern
Definition: gui.cpp:774
#define ERROR_SUCCESS
Definition: deptool.c:10
#define LVM_GETIMAGELIST
Definition: commctrl.h:2291
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2022
#define LR_LOADFROMFILE
Definition: winuser.h:1082
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
void __cdecl Format(UINT nFormatID,...)
Definition: cstringt.h:668
int32_t INT
Definition: typedefs.h:56
struct TraceInfo Info
BOOL SetItemText(int i, int subItem, LPCWSTR text)
Definition: rosctrls.h:186
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
Definition: cursoricon.c:2172
INT AddItem(INT ItemIndex, INT IconIndex, LPCWSTR lpText, LPARAM lParam)
Definition: gui.cpp:529
#define LISTVIEW_ICON_SIZE
Definition: gui.cpp:26
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
VOID SetCheckState(INT item, BOOL fCheck)
Definition: gui.cpp:592
PCXSTR GetString() const
Definition: atlsimpstr.h:361
static const UCHAR Index[8]
Definition: usbohci.c:18
INT WINAPI ImageList_AddIcon(HIMAGELIST himl, HICON hIcon)
Definition: imagelist.c:540
static const WCHAR L[]
Definition: oid.c:1250
static BOOL SearchPatternMatch(LPCWSTR szHaystack, LPCWSTR szNeedle)
Definition: gui.cpp:1634
#define IDI_MAIN
Definition: resource.h:4
struct _IMAGELIST * HIMAGELIST
Definition: commctrl.h:320
HINSTANCE hInst
Definition: dxdiag.c:13
HICON hIcon
Definition: msconfig.c:44
HRESULT GetString(REFGUID guidKey, [out, size_is(cchBufSize)] LPWSTR pwszValue, UINT32 cchBufSize, [in, out, ptr] UINT32 *pcchLength)
CAppsListView * m_ListView
Definition: gui.cpp:758
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2044
HIMAGELIST SetImageList(HIMAGELIST himl, int iImageList)
Definition: rosctrls.h:91
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582

Referenced by s_EnumAvailableAppProc().

◆ EnumInstalledAppProc()

BOOL CALLBACK CMainWindow::EnumInstalledAppProc ( INT  ItemIndex,
ATL::CStringW m_szName,
PINSTALLED_INFO  Info 
)
inlineprivate

Definition at line 1642 of file gui.cpp.

1643  {
1644  PINSTALLED_INFO ItemInfo;
1646  INT Index;
1647 
1648  if (!SearchPatternMatch(m_szName.GetString(), szSearchPattern))
1649  {
1650  RegCloseKey(Info->hSubKey);
1651  return TRUE;
1652  }
1653 
1654  ItemInfo = new INSTALLED_INFO(*Info);
1655  if (!ItemInfo)
1656  {
1657  RegCloseKey(Info->hSubKey);
1658  return FALSE;
1659  }
1660 
1661  Index = m_ListView->AddItem(ItemIndex, 0, m_szName.GetString(), (LPARAM) ItemInfo);
1662 
1663  /* Get version info */
1664  ItemInfo->GetApplicationString(L"DisplayVersion", szText);
1665  m_ListView->SetItemText(Index, 1, szText.GetString());
1666 
1667  /* Get comments */
1668  ItemInfo->GetApplicationString(L"Comments", szText);
1669  m_ListView->SetItemText(Index, 2, szText.GetString());
1670 
1671  return TRUE;
1672  }
#define TRUE
Definition: types.h:120
ATL::CStringW szSearchPattern
Definition: gui.cpp:774
BOOL GetApplicationString(LPCWSTR lpKeyName, ATL::CStringW &String)
Definition: installed.cpp:15
int32_t INT
Definition: typedefs.h:56
struct TraceInfo Info
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
BOOL SetItemText(int i, int subItem, LPCWSTR text)
Definition: rosctrls.h:186
static const WCHAR szText[]
Definition: dialog.c:139
INT AddItem(INT ItemIndex, INT IconIndex, LPCWSTR lpText, LPARAM lParam)
Definition: gui.cpp:529
LONG_PTR LPARAM
Definition: windef.h:208
PCXSTR GetString() const
Definition: atlsimpstr.h:361
static const UCHAR Index[8]
Definition: usbohci.c:18
static const WCHAR L[]
Definition: oid.c:1250
static BOOL SearchPatternMatch(LPCWSTR szHaystack, LPCWSTR szNeedle)
Definition: gui.cpp:1634
CAppsListView * m_ListView
Definition: gui.cpp:758

Referenced by s_EnumInstalledAppProc().

◆ FreeInstalledAppList()

VOID CMainWindow::FreeInstalledAppList ( )
inlineprivate

Definition at line 1617 of file gui.cpp.

1618  {
1619  INT Count = m_ListView->GetItemCount() - 1;
1621 
1622  while (Count >= 0)
1623  {
1625  if (Info)
1626  {
1627  RegCloseKey(Info->hSubKey);
1628  delete Info;
1629  }
1630  Count--;
1631  }
1632  }
DWORD_PTR GetItemData(int i)
Definition: rosctrls.h:204
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
int GetItemCount()
Definition: rosctrls.h:121
int32_t INT
Definition: typedefs.h:56
struct TraceInfo Info
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
INSTALLED_INFO * PINSTALLED_INFO
Definition: installed.h:15
CAppsListView * m_ListView
Definition: gui.cpp:758

Referenced by ProcessWindowMessage(), and UpdateApplicationsList().

◆ GetWndClassInfo()

static ATL::CWndClassInfo& CMainWindow::GetWndClassInfo ( )
inlinestatic

Definition at line 1813 of file gui.cpp.

1814  {
1815  DWORD csStyle = CS_VREDRAW | CS_HREDRAW;
1816  static ATL::CWndClassInfo wc =
1817  {
1818  {
1819  sizeof(WNDCLASSEX),
1820  csStyle,
1822  0,
1823  0,
1824  NULL,
1825  LoadIconW(_AtlBaseModule.GetModuleInstance(), MAKEINTRESOURCEW(IDI_MAIN)),
1827  (HBRUSH) (COLOR_BTNFACE + 1),
1829  L"RAppsWnd",
1830  NULL
1831  },
1832  NULL, NULL, IDC_ARROW, TRUE, 0, _T("")
1833  };
1834  return wc;
1835  }
#define IDR_MAINMENU
Definition: resource.h:40
#define TRUE
Definition: types.h:120
#define CS_HREDRAW
Definition: winuser.h:648
smooth NULL
Definition: ftsmooth.c:416
#define CS_VREDRAW
Definition: winuser.h:653
#define _T(x)
Definition: vfdio.h:22
unsigned long DWORD
Definition: ntddk_ex.h:95
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2074
static const WCHAR L[]
Definition: oid.c:1250
#define IDI_MAIN
Definition: resource.h:4
#define COLOR_BTNFACE
Definition: winuser.h:918
static LRESULT CALLBACK StartWindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: atlwin.h:1529
#define IDC_ARROW
Definition: winuser.h:682
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2044
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
WNDCLASSEXA WNDCLASSEX
Definition: winuser.h:5620

◆ InitApplicationsList()

VOID CMainWindow::InitApplicationsList ( )
inlineprivate

Definition at line 787 of file gui.cpp.

788  {
790 
791  /* Add columns to ListView */
792  szText.LoadStringW(IDS_APP_NAME);
794 
795  szText.LoadStringW(IDS_APP_INST_VERSION);
797 
798  szText.LoadStringW(IDS_APP_DESCRIPTION);
800 
801  // Unnesesary since the list updates on every TreeView selection
802  // UpdateApplicationsList(ENUM_ALL_COMPONENTS);
803  }
#define LVCFMT_RIGHT
Definition: commctrl.h:2595
#define LVCFMT_LEFT
Definition: commctrl.h:2594
static const WCHAR szText[]
Definition: dialog.c:139
#define IDS_APP_DESCRIPTION
Definition: resource.h:129
BOOL AddColumn(INT Index, ATL::CStringW &Text, INT Width, INT Format)
Definition: gui.cpp:509
CAppsListView * m_ListView
Definition: gui.cpp:758
#define IDS_APP_NAME
Definition: resource.h:127
#define IDS_APP_INST_VERSION
Definition: resource.h:128

Referenced by InitControls().

◆ InitCategoriesList()

VOID CMainWindow::InitCategoriesList ( )
inlineprivate

Definition at line 805 of file gui.cpp.

806  {
807  HTREEITEM hRootItemInstalled, hRootItemAvailable;
808 
809  hRootItemInstalled = m_TreeView->AddCategory(TVI_ROOT, IDS_INSTALLED, IDI_CATEGORY);
810  m_TreeView->AddCategory(hRootItemInstalled, IDS_APPLICATIONS, IDI_APPS);
811  m_TreeView->AddCategory(hRootItemInstalled, IDS_UPDATES, IDI_APPUPD);
812 
814 
816  m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_AUDIO, IDI_CAT_AUDIO);
817  m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_VIDEO, IDI_CAT_VIDEO);
819  m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_GAMES, IDI_CAT_GAMES);
821  m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_OFFICE, IDI_CAT_OFFICE);
822  m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_DEVEL, IDI_CAT_DEVEL);
823  m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_EDU, IDI_CAT_EDU);
825  m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_FINANCE, IDI_CAT_FINANCE);
826  m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_SCIENCE, IDI_CAT_SCIENCE);
827  m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_TOOLS, IDI_CAT_TOOLS);
828  m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_DRIVERS, IDI_CAT_DRIVERS);
829  m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_LIBS, IDI_CAT_LIBS);
830  m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_THEMES, IDI_CAT_THEMES);
831  m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_OTHER, IDI_CAT_OTHER);
832 
834  m_TreeView->Expand(hRootItemInstalled, TVE_EXPAND);
835  m_TreeView->Expand(hRootItemAvailable, TVE_EXPAND);
836  m_TreeView->SelectItem(hRootItemAvailable);
837  }
#define IDS_CAT_DEVEL
Definition: resource.h:166
HTREEITEM AddCategory(HTREEITEM hRootItem, UINT TextIndex, UINT IconIndex)
Definition: gui.cpp:678
#define IDS_CAT_OFFICE
Definition: resource.h:175
#define IDI_CAT_DEVEL
Definition: resource.h:20
#define IDI_CATEGORY
Definition: resource.h:13
#define IDS_CAT_VIDEO
Definition: resource.h:179
#define IDS_CAT_FINANCE
Definition: resource.h:170
#define IDS_AVAILABLEFORINST
Definition: resource.h:96
#define IDS_INSTALLED
Definition: resource.h:95
#define IDI_CAT_ENGINEER
Definition: resource.h:23
#define IDI_CAT_OFFICE
Definition: resource.h:29
#define IDI_CAT_VIDEO
Definition: resource.h:33
BOOL Expand(HTREEITEM item, DWORD action)
Definition: rosctrls.h:592
#define IDS_SELECTEDFORINST
Definition: resource.h:114
#define IDS_CAT_INTERNET
Definition: resource.h:173
HIMAGELIST SetImageList()
Definition: gui.cpp:700
#define IDS_CAT_DRIVERS
Definition: resource.h:167
#define IDI_CAT_OTHER
Definition: resource.h:30
BOOL SelectItem(HTREEITEM item, DWORD action=TVGN_CARET)
Definition: rosctrls.h:597
#define IDS_CAT_OTHER
Definition: resource.h:176
#define IDI_CAT_TOOLS
Definition: resource.h:32
#define IDI_CAT_EDU
Definition: resource.h:22
#define IDI_CAT_INTERNET
Definition: resource.h:27
#define TVE_EXPAND
Definition: commctrl.h:3419
#define TVI_ROOT
Definition: commctrl.h:3364
#define IDS_CAT_LIBS
Definition: resource.h:174
#define IDS_CAT_THEMES
Definition: resource.h:180
#define IDS_CAT_SCIENCE
Definition: resource.h:177
#define IDS_CAT_GRAPHICS
Definition: resource.h:172
#define IDS_CAT_AUDIO
Definition: resource.h:165
#define IDS_CAT_EDU
Definition: resource.h:168
#define IDS_CAT_ENGINEER
Definition: resource.h:169
#define IDS_APPLICATIONS
Definition: resource.h:98
#define IDI_CAT_LIBS
Definition: resource.h:28
#define IDI_CAT_GRAPHICS
Definition: resource.h:26
#define IDI_CAT_THEMES
Definition: resource.h:34
#define IDI_CAT_FINANCE
Definition: resource.h:24
#define IDS_UPDATES
Definition: resource.h:97
#define IDI_CAT_DRIVERS
Definition: resource.h:21
#define IDI_CAT_AUDIO
Definition: resource.h:19
#define IDI_CAT_GAMES
Definition: resource.h:25
#define IDS_CAT_TOOLS
Definition: resource.h:178
#define IDI_CAT_SCIENCE
Definition: resource.h:31
#define IDI_APPS
Definition: resource.h:11
#define IDS_CAT_GAMES
Definition: resource.h:171
#define IDI_SELECTEDFORINST
Definition: resource.h:16
#define IDI_APPUPD
Definition: resource.h:12
CSideTreeView * m_TreeView
Definition: gui.cpp:760

Referenced by InitControls().

◆ InitControls()

BOOL CMainWindow::InitControls ( )
inlineprivate

Definition at line 975 of file gui.cpp.

976  {
977  if (CreateLayout())
978  {
979 
982 
983  nSelectedApps = 0;
985 
986  return TRUE;
987  }
988 
989  return FALSE;
990  }
#define TRUE
Definition: types.h:120
VOID InitApplicationsList()
Definition: gui.cpp:787
INT nSelectedApps
Definition: gui.cpp:769
BOOL CreateLayout()
Definition: gui.cpp:930
VOID UpdateStatusBarText()
Definition: gui.cpp:1727
VOID InitCategoriesList()
Definition: gui.cpp:805

Referenced by ProcessWindowMessage().

◆ InsertSelectionFromHBITMAP()

void CMainWindow::InsertSelectionFromHBITMAP ( HBITMAP  bitmap,
HWND  window 
)

Definition at line 120 of file winproc.cpp.

121 {
122  int width = GetDIBWidth(bitmap);
123  int height = GetDIBHeight(bitmap);
124  int curWidth = imageModel.GetWidth();
125  int curHeight = imageModel.GetHeight();
126 
127  if (width > curWidth || height > curHeight)
128  {
129  BOOL shouldEnlarge = TRUE;
130 
131  if (askBeforeEnlarging)
132  {
133  TCHAR programname[20];
134  TCHAR shouldEnlargePromptText[100];
135 
136  LoadString(hProgInstance, IDS_PROGRAMNAME, programname, SIZEOF(programname));
137  LoadString(hProgInstance, IDS_ENLARGEPROMPTTEXT, shouldEnlargePromptText, SIZEOF(shouldEnlargePromptText));
138 
139  switch (MessageBox(shouldEnlargePromptText, programname, MB_YESNOCANCEL | MB_ICONQUESTION))
140  {
141  case IDYES:
142  break;
143  case IDNO:
144  shouldEnlarge = FALSE;
145  break;
146  case IDCANCEL:
147  return;
148  }
149  }
150 
151  if (shouldEnlarge)
152  {
153  if (width > curWidth)
154  curWidth = width;
155 
156  if (height > curHeight)
157  curHeight = height;
158 
159  imageModel.Crop(curWidth, curHeight, 0, 0);
160  }
161  }
162 
166 
169 
170  placeSelWin();
171  selectionWindow.ShowWindow(SW_SHOW);
173 }
GLint GLint GLsizei width
Definition: gl.h:1546
void CopyPrevious(void)
Definition: history.cpp:45
#define TRUE
Definition: types.h:120
CToolBox toolBoxContainer
Definition: main.cpp:65
#define IDYES
Definition: winuser.h:829
#define IDS_PROGRAMNAME
Definition: definitions.h:203
#define MAKELPARAM(l, h)
Definition: winuser.h:3947
int GetDIBHeight(HBITMAP hBitmap)
Definition: dib.cpp:38
SelectionModel selectionModel
Definition: main.cpp:20
BOOL askBeforeEnlarging
Definition: main.cpp:33
void Crop(int nWidth, int nHeight, int nOffsetX=0, int nOffsetY=0)
Definition: history.cpp:124
int GetDIBWidth(HBITMAP hBitmap)
Definition: dib.cpp:30
#define SIZEOF(_ar)
Definition: calc.h:97
unsigned int BOOL
Definition: ntddk_ex.h:94
#define IDS_ENLARGEPROMPTTEXT
Definition: definitions.h:239
#define TOOLBARCLASSNAME
Definition: commctrl.h:942
smooth NULL
Definition: ftsmooth.c:416
#define MB_ICONQUESTION
Definition: winuser.h:783
#define MB_YESNOCANCEL
Definition: winuser.h:812
#define SW_SHOW
Definition: winuser.h:769
Definition: uimain.c:88
char TCHAR
Definition: xmlstorage.h:189
#define ID_RECTSEL
Definition: definitions.h:118
#define FindWindowEx
Definition: winuser.h:5679
void placeSelWin()
Definition: mouse.cpp:16
int GetWidth()
Definition: history.cpp:195
int GetHeight()
Definition: history.cpp:200
#define TB_CHECKBUTTON
Definition: commctrl.h:1039
ImageModel imageModel
Definition: main.cpp:32
HWND m_hWnd
Definition: atlwin.h:268
#define WM_COMMAND
Definition: winuser.h:1722
HINSTANCE hProgInstance
Definition: main.cpp:50
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
void ForceRefreshSelectionContents()
Definition: selection.cpp:56
void InsertFromHBITMAP(HBITMAP hBm)
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1048
#define IDNO
Definition: winuser.h:830
#define IDCANCEL
Definition: winuser.h:825
int MessageBox(LPCTSTR lpszText, LPCTSTR lpszCaption=NULL, UINT nType=MB_OK)
Definition: atlwin.h:934
#define LoadString
Definition: winuser.h:5720
CSelectionWindow selectionWindow
Definition: main.cpp:70

Referenced by OnCommand().

◆ IsSelectedNodeInstalled()

BOOL CMainWindow::IsSelectedNodeInstalled ( )
inlineprivate

Definition at line 1453 of file gui.cpp.

1454  {
1455  HTREEITEM hSelectedItem = m_TreeView->GetSelection();
1456  TV_ITEM tItem;
1457 
1458  tItem.mask = TVIF_PARAM | TVIF_HANDLE;
1459  tItem.hItem = hSelectedItem;
1460  m_TreeView->GetItem(&tItem);
1461  switch (tItem.lParam)
1462  {
1463  case IDS_INSTALLED:
1464  case IDS_APPLICATIONS:
1465  case IDS_UPDATES:
1466  return TRUE;
1467  default:
1468  return FALSE;
1469  }
1470  }
#define TRUE
Definition: types.h:120
#define IDS_INSTALLED
Definition: resource.h:95
BOOL GetItem(TV_ITEM *pitem)
Definition: rosctrls.h:538
#define TVIF_HANDLE
Definition: commctrl.h:3266
#define IDS_APPLICATIONS
Definition: resource.h:98
#define TV_ITEM
Definition: commctrl.h:3296
#define IDS_UPDATES
Definition: resource.h:97
#define TVIF_PARAM
Definition: commctrl.h:3264
HTREEITEM GetSelection()
Definition: rosctrls.h:587
CSideTreeView * m_TreeView
Definition: gui.cpp:760

Referenced by ProcessWindowMessage().

◆ OnClose()

LRESULT CMainWindow::OnClose ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 205 of file winproc.cpp.

206 {
207  if (!imageModel.IsImageSaved())
208  {
209  CString strProgramName;
210  strProgramName.LoadString(IDS_PROGRAMNAME);
211  CPath pathFileName(filepathname);
212  pathFileName.StripPath();
213  CString strSavePromptText;
214  strSavePromptText.Format(IDS_SAVEPROMPTTEXT, (LPCTSTR)pathFileName);
215  switch (MessageBox(strSavePromptText, strProgramName, MB_YESNOCANCEL | MB_ICONQUESTION))
216  {
217  case IDNO:
218  DestroyWindow();
219  break;
220  case IDYES:
221  saveImage(FALSE);
222  if (imageModel.IsImageSaved())
223  DestroyWindow();
224  break;
225  }
226  }
227  else
228  {
229  DestroyWindow();
230  }
231  return 0;
232 }
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
#define IDYES
Definition: winuser.h:829
#define IDS_PROGRAMNAME
Definition: definitions.h:203
void __cdecl Format(UINT nFormatID,...)
Definition: cstringt.h:668
BOOL IsImageSaved()
Definition: history.cpp:168
void saveImage(BOOL overwrite)
Definition: winproc.cpp:88
#define MB_ICONQUESTION
Definition: winuser.h:783
#define MB_YESNOCANCEL
Definition: winuser.h:812
#define IDS_SAVEPROMPTTEXT
Definition: definitions.h:208
TCHAR filepathname[1000]
Definition: main.cpp:52
ImageModel imageModel
Definition: main.cpp:32
BOOL DestroyWindow()
Definition: atlwin.h:428
BOOL LoadString(_In_ UINT nID)
Definition: cstringt.h:506
#define IDNO
Definition: winuser.h:830
int MessageBox(LPCTSTR lpszText, LPCTSTR lpszCaption=NULL, UINT nType=MB_OK)
Definition: atlwin.h:934

◆ OnCommand() [1/2]

LRESULT CMainWindow::OnCommand ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 385 of file winproc.cpp.

386 {
387  switch (LOWORD(wParam))
388  {
389  case IDM_HELPINFO:
390  {
392  TCHAR infotitle[100];
393  TCHAR infotext[200];
394  LoadString(hProgInstance, IDS_INFOTITLE, infotitle, SIZEOF(infotitle));
395  LoadString(hProgInstance, IDS_INFOTEXT, infotext, SIZEOF(infotext));
396  ShellAbout(m_hWnd, infotitle, infotext, paintIcon);
397  DeleteObject(paintIcon);
398  break;
399  }
400  case IDM_HELPHELPTOPICS:
401  HtmlHelp(m_hWnd, _T("help\\Paint.chm"), 0, 0);
402  break;
403  case IDM_FILEEXIT:
405  break;
406  case IDM_FILENEW:
407  {
408  BOOL reset = TRUE;
409  if (!imageModel.IsImageSaved())
410  {
411  CString strProgramName;
412  strProgramName.LoadString(IDS_PROGRAMNAME);
413  CPath pathFileName(filepathname);
414  pathFileName.StripPath();
415  CString strSavePromptText;
416  strSavePromptText.Format(IDS_SAVEPROMPTTEXT, (LPCTSTR)pathFileName);
417  switch (MessageBox(strSavePromptText, strProgramName, MB_YESNOCANCEL | MB_ICONQUESTION))
418  {
419  case IDNO:
420  imageModel.imageSaved = TRUE; //TODO: move to ImageModel
421  break;
422  case IDYES:
423  saveImage(FALSE);
424  break;
425  case IDCANCEL:
426  reset = FALSE;
427  break;
428  }
429  }
430  if (reset && imageModel.IsImageSaved()) //TODO: move to ImageModel
431  {
432  imageModel.Clear();
434  }
435  break;
436  }
437  case IDM_FILEOPEN:
438  if (GetOpenFileName(&ofn) != 0)
439  {
440  HBITMAP bmNew = NULL;
442  if (bmNew != NULL)
443  {
445  }
446  }
447  break;
448  case IDM_FILESAVE:
449  saveImage(TRUE);
450  break;
451  case IDM_FILESAVEAS:
452  saveImage(FALSE);
453  break;
454  case IDM_FILEPAGESETUP:
455  // DUMMY: Shows the dialog only, no functionality
456  PAGESETUPDLG psd;
457  ZeroMemory(&psd, sizeof(psd));
458  psd.lStructSize = sizeof(psd);
459  psd.hwndOwner = m_hWnd;
460  PageSetupDlg(&psd);
461  break;
462  case IDM_FILEPRINT:
463  // TODO: Test whether it actually works
464  PRINTDLG pd;
465  ZeroMemory(&pd, sizeof(pd));
466  pd.lStructSize = sizeof(pd);
467  pd.hwndOwner = m_hWnd;
468  pd.hDevMode = NULL; // freed by user
469  pd.hDevNames = NULL; // freed by user
471  pd.nCopies = 1;
472  pd.nFromPage = 0xffff;
473  pd.nToPage = 0xffff;
474  pd.nMinPage = 1;
475  pd.nMaxPage = 0xffff;
476  if (PrintDlg(&pd) == TRUE)
477  {
479  DeleteDC(pd.hDC);
480  }
481  if (pd.hDevMode)
482  GlobalFree(pd.hDevMode);
483  if (pd.hDevNames)
484  GlobalFree(pd.hDevNames);
485  break;
488  break;
491  break;
494  break;
495  case IDM_FILE1:
496  {
497  HBITMAP bmNew = NULL;
499  if (bmNew != NULL)
500  {
502  }
503  break;
504  }
505  case IDM_FILE2:
506  {
507  HBITMAP bmNew = NULL;
509  if (bmNew != NULL)
510  {
512  }
513  break;
514  }
515  case IDM_FILE3:
516  {
517  HBITMAP bmNew = NULL;
519  if (bmNew != NULL)
520  {
522  }
523  break;
524  }
525  case IDM_FILE4:
526  {
527  HBITMAP bmNew = NULL;
529  if (bmNew != NULL)
530  {
532  }
533  break;
534  }
535  case IDM_EDITUNDO:
536  imageModel.Undo();
538  break;
539  case IDM_EDITREDO:
540  imageModel.Redo();
542  break;
543  case IDM_EDITCOPY:
544  OpenClipboard();
545  EmptyClipboard();
547  CloseClipboard();
548  break;
549  case IDM_EDITCUT:
550  /* Copy */
552  /* Delete selection */
554  break;
555  case IDM_EDITPASTE:
556  OpenClipboard();
558  {
560  }
561  CloseClipboard();
562  break;
564  {
565  /* remove selection window and already painted content using undo */
566  imageModel.Undo();
567  break;
568  }
569  case IDM_EDITSELECTALL:
570  {
574  //TODO: do this properly
578  break;
579  }
580  case IDM_EDITCOPYTO:
581  if (GetSaveFileName(&ofn) != 0)
583  break;
584  case IDM_EDITPASTEFROM:
585  if (GetOpenFileName(&ofn) != 0)
586  {
587  HBITMAP bmNew = NULL;
589  if (bmNew != NULL)
590  {
592  DeleteObject(bmNew);
593  }
594  }
595  break;
597  if (ChooseColor(&choosecolor))
599  break;
602  break;
605  break;
607  {
609  break;
610  }
615  break;
617  switch (mirrorRotateDialog.DoModal(mainWindow.m_hWnd))
618  {
619  case 1: /* flip horizontally */
620  if (selectionWindow.IsWindowVisible())
622  else
624  break;
625  case 2: /* flip vertically */
626  if (selectionWindow.IsWindowVisible())
628  else
630  break;
631  case 3: /* rotate 90 degrees */
632  break;
633  case 4: /* rotate 180 degrees */
634  if (selectionWindow.IsWindowVisible())
636  else
638  break;
639  case 5: /* rotate 270 degrees */
640  break;
641  }
642  break;
643  case IDM_IMAGEATTRIBUTES:
644  {
645  if (attributesDialog.DoModal(mainWindow.m_hWnd))
646  {
648  }
649  break;
650  }
652  {
653  if (stretchSkewDialog.DoModal(mainWindow.m_hWnd))
654  {
657  }
658  break;
659  }
660  case IDM_IMAGEDRAWOPAQUE:
662  break;
663  case IDM_IMAGECROP:
665  break;
666 
667  case IDM_VIEWTOOLBOX:
670  break;
672  paletteWindow.ShowWindow(paletteWindow.IsWindowVisible() ? SW_HIDE : SW_SHOW);
674  break;
675  case IDM_VIEWSTATUSBAR:
678  break;
679  case IDM_FORMATICONBAR:
680  textEditWindow.ShowWindow(textEditWindow.IsWindowVisible() ? SW_HIDE : SW_SHOW);
681  break;
682  case IDM_VIEWSHOWGRID:
683  showGrid = !showGrid;
685  break;
688  miniature.ShowWindow(showMiniature ? SW_SHOW : SW_HIDE);
689  break;
690 
691  case IDM_VIEWZOOM125:
692  zoomTo(125, 0, 0);
693  break;
694  case IDM_VIEWZOOM25:
695  zoomTo(250, 0, 0);
696  break;
697  case IDM_VIEWZOOM50:
698  zoomTo(500, 0, 0);
699  break;
700  case IDM_VIEWZOOM100:
701  zoomTo(1000, 0, 0);
702  break;
703  case IDM_VIEWZOOM200:
704  zoomTo(2000, 0, 0);
705  break;
706  case IDM_VIEWZOOM400:
707  zoomTo(4000, 0, 0);
708  break;
709  case IDM_VIEWZOOM800:
710  zoomTo(8000, 0, 0);
711  break;
712 
713  case IDM_VIEWFULLSCREEN:
714  fullscreenWindow.ShowWindow(SW_SHOW);
716  break;
717  }
718  return 0;
719 }
#define IDM_IMAGEROTATEMIRROR
Definition: definitions.h:101
void FlipHorizontally()
Definition: history.cpp:224
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define IDM_EDITUNDO
Definition: definitions.h:75
ToolsModel toolsModel
Definition: main.cpp:18
void CopyPrevious(void)
Definition: history.cpp:45
#define IDM_EDITPASTEFROM
Definition: definitions.h:84
static HICON
Definition: imagelist.c:84
#define IDM_IMAGEINVERTCOLORS
Definition: definitions.h:104
#define TRUE
Definition: types.h:120
CToolBox toolBoxContainer
Definition: main.cpp:65
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
void RotateNTimes90Degrees(int iN)
WORD nMaxPage
Definition: commdlg.h:474
int fileSize
Definition: main.cpp:54
#define IDM_VIEWZOOM125
Definition: definitions.h:90
long y
Definition: polytest.cpp:48
#define PageSetupDlg
Definition: commdlg.h:667
#define IDM_VIEWSHOWGRID
Definition: definitions.h:98
void SaveDIBToFile(HBITMAP hBitmap, LPTSTR FileName, HDC hDC, LPSYSTEMTIME time, int *size, int hRes, int vRes)
Definition: dib.cpp:46
#define IDYES
Definition: winuser.h:829
long x
Definition: polytest.cpp:48
#define IDM_VIEWZOOM400
Definition: definitions.h:95
#define IDM_EDITSELECTALL
Definition: definitions.h:82
#define ChooseColor
Definition: commdlg.h:661
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
#define IDM_EDITCOPY
Definition: definitions.h:78
#define IDS_PROGRAMNAME
Definition: definitions.h:203
HWND hwndOwner
Definition: commdlg.h:434
#define MAKELPARAM(l, h)
Definition: winuser.h:3947
#define IDM_IMAGECROP
Definition: definitions.h:103
#define IDM_VIEWCOLORPALETTE
Definition: definitions.h:87
OPENFILENAME ofn
Definition: main.cpp:37
void InvertColors()
Definition: history.cpp:205
#define IDM_EDITCOPYTO
Definition: definitions.h:83
#define ZeroMemory
Definition: winbase.h:1642
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
#define IDM_COLORSEDITPALETTE
Definition: definitions.h:109
void __cdecl Format(UINT nFormatID,...)
Definition: cstringt.h:668
WORD nCopies
Definition: commdlg.h:475
CString strFile2
Definition: registry.h:31
#define IDM_VIEWSTATUSBAR
Definition: definitions.h:88
SelectionModel selectionModel
Definition: main.cpp:20
#define IDM_COLORSOLDPALETTE
Definition: definitions.h:111
BOOL IsImageSaved()
Definition: history.cpp:168
static void SetWallpaper(LPCTSTR szFileName, WallpaperStyle style)
Definition: registry.cpp:38
void Redo(void)
Definition: history.cpp:75
COLORREF rgbResult
Definition: commdlg.h:242
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
HANDLE WINAPI SetClipboardData(_In_ UINT, _In_opt_ HANDLE)
#define GetOpenFileName
Definition: commdlg.h:665
WPARAM wParam
Definition: combotst.c:138
#define IDM_IMAGEDELETEIMAGE
Definition: definitions.h:106
void whilePaintingL(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg)
Definition: mouse.cpp:125
#define IDM_FILEPAGESETUP
Definition: definitions.h:58
WORD nMinPage
Definition: commdlg.h:473
void Crop(int nWidth, int nHeight, int nOffsetX=0, int nOffsetY=0)
Definition: history.cpp:124
#define IDM_IMAGEATTRIBUTES
Definition: definitions.h:105
CImgAreaWindow imageArea
Definition: main.cpp:71
#define GetSaveFileName
Definition: commdlg.h:666
void LoadDIBFromFile(HBITMAP *hBitmap, LPCTSTR name, LPSYSTEMTIME time, int *size, int *hRes, int *vRes)
Definition: dib.cpp:84
#define PrintDlg
Definition: commdlg.h:668
#define LR_COPYRETURNORG
Definition: winuser.h:1080
#define IDM_FILEPRINT
Definition: definitions.h:59
#define PD_USEDEVMODECOPIESANDCOLLATE
Definition: commdlg.h:166
#define IDM_VIEWZOOM100
Definition: definitions.h:93
SYSTEMTIME fileTime
Definition: main.cpp:57
#define SIZEOF(_ar)
Definition: calc.h:97
CMirrorRotateDialog mirrorRotateDialog
Definition: dialogs.cpp:19
void startPaintingL(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg)
Definition: mouse.cpp:56
void ClearHistory(void)
Definition: history.cpp:102
#define IDM_FILE1
Definition: definitions.h:68
unsigned int BOOL
Definition: ntddk_ex.h:94
#define IDM_FILEASWALLPAPERCENTERED
Definition: definitions.h:64
void saveImage(BOOL overwrite)
Definition: winproc.cpp:88
#define IDM_VIEWFULLSCREEN
Definition: definitions.h:97
HDC GetDC()
Definition: history.cpp:219
HANDLE WINAPI CopyImage(_In_ HANDLE, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
Definition: cursoricon.c:1956
void SetBackgroundTransparent(BOOL bTransparent)
Definition: toolsmodel.cpp:98
#define CF_BITMAP
Definition: constants.h:397
#define TOOLBARCLASSNAME
Definition: commctrl.h:942
CMiniatureWindow miniature
Definition: main.cpp:64
WORD nFromPage
Definition: commdlg.h:471
smooth NULL
Definition: ftsmooth.c:416
#define IDM_HELPHELPTOPICS
Definition: definitions.h:113
#define MB_ICONQUESTION
Definition: winuser.h:783
#define MB_YESNOCANCEL
Definition: winuser.h:812
int fileHPPM
Definition: main.cpp:55
#define PD_RETURNDC
Definition: commdlg.h:155
#define IDM_VIEWZOOM25
Definition: definitions.h:91
CStretchSkewDialog stretchSkewDialog
Definition: dialogs.cpp:21
DWORD lStructSize
Definition: commdlg.h:433
#define IDS_SAVEPROMPTTEXT
Definition: definitions.h:208
#define SW_SHOW
Definition: winuser.h:769
#define IDS_INFOTEXT
Definition: definitions.h:206
#define IDM_FILE4
Definition: definitions.h:71
void SelectPalette(int nPalette)
void Insert(HBITMAP hbm)
Definition: history.cpp:108
#define IDS_INFOTITLE
Definition: definitions.h:205
char TCHAR
Definition: xmlstorage.h:189
void Clear(COLORREF color=0x00ffffff)
Definition: history.cpp:213
BOOL IsBackgroundTransparent()
Definition: toolsmodel.cpp:93
BOOL WINAPI EmptyClipboard(void)
Definition: ntwrapper.h:190
#define _T(x)
Definition: vfdio.h:22
#define IDM_FILEASWALLPAPERSTRETCHED
Definition: definitions.h:65
void InsertSelectionFromHBITMAP(HBITMAP bitmap, HWND window)
Definition: winproc.cpp:120
#define ID_RECTSEL
Definition: definitions.h:118
void StretchSkew(int nStretchPercentX, int nStretchPercentY, int nSkewDegX=0, int nSkewDegY=0)
Definition: history.cpp:183
#define FindWindowEx
Definition: winuser.h:5679
BOOL OpenClipboard()
Definition: atlwin.h:970
#define WM_CLOSE
Definition: winuser.h:1603
void RotateNTimes90Degrees(int iN)
Definition: history.cpp:240
#define IDM_FORMATICONBAR
Definition: definitions.h:89
HGLOBAL hDevMode
Definition: commdlg.h:467
BOOL imageSaved
Definition: history.h:24
CFullscreenWindow fullscreenWindow
Definition: main.cpp:63
HWND hStatusBar
Definition: main.cpp:35
#define ShellAbout
Definition: shellapi.h:688
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
Definition: heapmem.c:611
BOOL showMiniature
Definition: main.cpp:60
BOOL WINAPI CloseClipboard(void)
Definition: ntwrapper.h:178
int GetWidth()
Definition: history.cpp:195
TCHAR filepathname[1000]
Definition: main.cpp:52
CAttributesDialog attributesDialog
Definition: dialogs.cpp:20
void alignChildrenToMainWindow()
Definition: winproc.cpp:51
int GetHeight()
Definition: history.cpp:200
#define IDM_VIEWZOOM50
Definition: definitions.h:92
#define IDM_FILEEXIT
Definition: definitions.h:73
#define TB_CHECKBUTTON
Definition: commctrl.h:1039
void SetFgColor(int newColor)
ImageModel imageModel
Definition: main.cpp:32
HWND m_hWnd
Definition: atlwin.h:268
#define IDM_FILEASWALLPAPERPLANE
Definition: definitions.h:63
#define IDM_EDITCUT
Definition: definitions.h:77
#define WM_COMMAND
Definition: winuser.h:1722
#define IDM_EDITPASTE
Definition: definitions.h:79
CPaletteWindow paletteWindow
Definition: main.cpp:67
HINSTANCE hProgInstance
Definition: main.cpp:50
#define IDI_APPICON
Definition: resource.h:166
CString strFile1
Definition: registry.h:30
#define IDM_IMAGESTRETCHSKEW
Definition: definitions.h:102
#define IDM_HELPINFO
Definition: definitions.h:114
HWND hwndOwner
Definition: commdlg.h:466
void UpdateApplicationProperties(HBITMAP bitmap, LPCTSTR newfilepathname)
Definition: winproc.cpp:105
CString strFile4
Definition: registry.h:33
#define IDM_IMAGEDRAWOPAQUE
Definition: definitions.h:107
#define IDM_EDITDELETESELECTION
Definition: definitions.h:80
#define IDM_COLORSMODERNPALETTE
Definition: definitions.h:110
#define IDM_EDITREDO
Definition: definitions.h:76
POINT percentage
Definition: dialogs.h:86
#define IDM_FILESAVEAS
Definition: definitions.h:53
GLboolean reset
Definition: glext.h:5666
BOOL ShowWindow(int nCmdShow)
Definition: atlwin.h:1265
#define IDM_FILE2
Definition: definitions.h:69
PaletteModel paletteModel
Definition: main.cpp:28
BOOL WINAPI DeleteDC(_In_ HDC)
#define IDM_FILESAVE
Definition: definitions.h:52
LPSTR lpstrFile
Definition: commdlg.h:336
HGLOBAL hDevNames
Definition: commdlg.h:468
#define IMAGE_BITMAP
Definition: winuser.h:211
HANDLE WINAPI GetClipboardData(_In_ UINT)
DWORD lStructSize
Definition: commdlg.h:465
BOOL Invalidate(BOOL bErase=TRUE)
Definition: atlwin.h:828
void Undo(void)
Definition: history.cpp:57
void FlipVertically()
Definition: history.cpp:232
WORD nToPage
Definition: commdlg.h:472
#define IDM_FILEOPEN
Definition: definitions.h:51
BOOL zoomTo(int newZoom, int mouseX, int mouseY)
Definition: winproc.cpp:21
#define IDM_FILE3
Definition: definitions.h:70
#define IDM_VIEWZOOM200
Definition: definitions.h:94
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1048
BOOL LoadString(_In_ UINT nID)
Definition: cstringt.h:506
#define IDM_VIEWZOOM800
Definition: definitions.h:96
DWORD Flags
Definition: commdlg.h:470
#define IDM_FILENEW
Definition: definitions.h:50
static HBITMAP
Definition: button.c:44
#define LoadIcon
Definition: winuser.h:5714
#define IDNO
Definition: winuser.h:830
CTextEditWindow textEditWindow
Definition: main.cpp:80
CHOOSECOLOR choosecolor
Definition: main.cpp:36
#define IDCANCEL
Definition: winuser.h:825
RegistrySettings registrySettings
Definition: main.cpp:30
int MessageBox(LPCTSTR lpszText, LPCTSTR lpszCaption=NULL, UINT nType=MB_OK)
Definition: atlwin.h:934
#define HtmlHelp
Definition: htmlhelp.h:425
HDC hDC
Definition: commdlg.h:469
#define IDM_VIEWSHOWMINIATURE
Definition: definitions.h:99
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define SRCCOPY
Definition: wingdi.h:332
#define LoadString
Definition: winuser.h:5720
int fileVPPM
Definition: main.cpp:56
struct Rect Rect
BOOL IsWindowVisible() const
Definition: atlwin.h:890
CSelectionWindow selectionWindow
Definition: main.cpp:70
#define IDM_VIEWTOOLBOX
Definition: definitions.h:86
CMainWindow mainWindow
Definition: main.cpp:62
CString strFile3
Definition: registry.h:32

Referenced by ProcessWindowMessage().

◆ OnCommand() [2/2]

VOID CMainWindow::OnCommand ( WPARAM  wParam,
LPARAM  lParam 
)
inlineprivate

Definition at line 1472 of file gui.cpp.

1473  {
1474  WORD wCommand = LOWORD(wParam);
1475 
1476  if (lParam == (LPARAM) m_SearchBar->m_hWnd)
1477  {
1478  ATL::CStringW szBuf;
1479 
1480  switch (HIWORD(wParam))
1481  {
1482  case EN_SETFOCUS:
1483  {
1484  ATL::CStringW szWndText;
1485 
1486  szBuf.LoadStringW(IDS_SEARCH_TEXT);
1487  m_SearchBar->GetWindowTextW(szWndText);
1488  if (szBuf == szWndText)
1489  {
1491  m_SearchBar->SetWindowTextW(L"");
1492  }
1493  }
1494  break;
1495 
1496  case EN_KILLFOCUS:
1497  {
1498  m_SearchBar->GetWindowTextW(szBuf);
1499  if (szBuf.IsEmpty())
1500  {
1501  szBuf.LoadStringW(IDS_SEARCH_TEXT);
1503  m_SearchBar->SetWindowTextW(szBuf.GetString());
1504  }
1505  }
1506  break;
1507 
1508  case EN_CHANGE:
1509  {
1510  ATL::CStringW szWndText;
1511 
1512  if (!bSearchEnabled)
1513  {
1514  bSearchEnabled = TRUE;
1515  break;
1516  }
1517 
1518  szBuf.LoadStringW(IDS_SEARCH_TEXT);
1519  m_SearchBar->GetWindowTextW(szWndText);
1520  if (szBuf == szWndText)
1521  {
1523  }
1524  else
1525  {
1526  szSearchPattern = szWndText;
1527  }
1528 
1529  DWORD dwDelay;
1530  SystemParametersInfoW(SPI_GETMENUSHOWDELAY, 0, &dwDelay, 0);
1531  SetTimer(SEARCH_TIMER_ID, dwDelay);
1532  }
1533  break;
1534  }
1535 
1536  return;
1537  }
1538 
1539  switch (wCommand)
1540  {
1541  case ID_OPEN_LINK:
1543  HeapFree(GetProcessHeap(), 0, pLink);
1544  break;
1545 
1546  case ID_COPY_LINK:
1548  HeapFree(GetProcessHeap(), 0, pLink);
1549  break;
1550 
1551  case ID_SETTINGS:
1553  break;
1554 
1555  case ID_EXIT:
1556  PostMessageW(WM_CLOSE, 0, 0);
1557  break;
1558 
1559  case ID_SEARCH:
1560  m_SearchBar->SetFocus();
1561  break;
1562 
1563  case ID_INSTALL:
1565  {
1566  if (nSelectedApps > 0)
1567  {
1571  }
1573  {
1575  }
1576 
1577  }
1578  break;
1579 
1580  case ID_UNINSTALL:
1583  break;
1584 
1585  case ID_MODIFY:
1588  break;
1589 
1590  case ID_REGREMOVE:
1592  break;
1593 
1594  case ID_REFRESH:
1596  break;
1597 
1598  case ID_RESETDB:
1601  break;
1602 
1603  case ID_HELP:
1604  MessageBoxW(L"Help not implemented yet", NULL, MB_OK);
1605  break;
1606 
1607  case ID_ABOUT:
1608  ShowAboutDialog();
1609  break;
1610 
1611  case ID_CHECK_ALL:
1612  m_ListView->CheckAll();
1613  break;
1614  }
1615  }
#define TRUE
Definition: types.h:120
HWND SetFocus()
Definition: atlwin.h:1130
#define ID_REFRESH
Definition: resource.h:18
#define ID_SETTINGS
Definition: resource.h:78
ATL::CStringW szSearchPattern
Definition: gui.cpp:774
#define SW_SHOWNOACTIVATE
Definition: winuser.h:768
#define ID_REGREMOVE
Definition: resource.h:80
#define ID_RESETDB
Definition: resource.h:81
INT SelectedEnumType
Definition: gui.cpp:775
#define IDS_SEARCH_TEXT
Definition: resource.h:87
CAvailableApplicationInfo * GetSelectedData()
Definition: gui.cpp:652
#define ID_UNINSTALL
Definition: resource.h:72
WPARAM wParam
Definition: combotst.c:138
ATL::CSimpleArray< CAvailableApplicationInfo > GetSelected() const
Definition: available.cpp:427
BOOL bSearchEnabled
Definition: gui.cpp:771
LPWSTR pLink
Definition: gui.cpp:767
VOID RemoveSelectedAppFromRegistry()
Definition: gui.cpp:1067
#define EN_KILLFOCUS
Definition: winuser.h:2007
#define EN_SETFOCUS
Definition: winuser.h:2009
UINT_PTR SetTimer(UINT_PTR nIDEvent, UINT nElapse, void(CALLBACK *lpfnTimer)(HWND, UINT, UINT_PTR, DWORD)=NULL)
Definition: atlwin.h:1190
INT nSelectedApps
Definition: gui.cpp:769
smooth NULL
Definition: ftsmooth.c:416
VOID SetSelected(INT item, BOOL value)
Definition: gui.cpp:601
LONG_PTR LPARAM
Definition: windef.h:208
BOOL IsAvailableEnum(INT x)
Definition: defines.h:64
#define ID_ABOUT
Definition: charmap.c:18
BOOL WINAPI SystemParametersInfoW(_In_ UINT, _In_ UINT, _Inout_opt_ PVOID, _In_ UINT)
#define GetProcessHeap()
Definition: compat.h:403
VOID ShowAboutDialog()
Definition: aboutdlg.cpp:22
int WINAPI MessageBoxW(_In_opt_ HWND, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_ UINT)
#define WM_CLOSE
Definition: winuser.h:1603
PCXSTR GetString() const
Definition: atlsimpstr.h:361
unsigned short WORD
Definition: ntddk_ex.h:93
VOID GetWindowTextW(ATL::CStringW &szText)
Definition: rosui.h:501
unsigned long DWORD
Definition: ntddk_ex.h:95
#define ID_COPY_LINK
Definition: resource.h:77
#define ID_CHECK_ALL
Definition: resource.h:82
CUiWindow< CSearchBar > * m_SearchBar
Definition: gui.cpp:764
static const WCHAR L[]
Definition: oid.c:1250
HWND m_hWnd
Definition: atlwin.h:268
BOOL UninstallSelectedApp(BOOL bModify)
Definition: gui.cpp:1105
VOID CreateSettingsDlg(HWND hwnd)
static BOOL ForceUpdateAppsDB()
Definition: available.cpp:317
#define ID_EXIT
Definition: resource.h:10
VOID CopyTextToClipboard(LPCWSTR lpszText)
Definition: misc.cpp:48
CAvailableApps m_AvailableApps
Definition: gui.cpp:765
bool IsEmpty() const
Definition: atlsimpstr.h:379
#define SEARCH_TIMER_ID
Definition: gui.cpp:25
#define ID_SEARCH
Definition: resource.h:83
VOID UpdateApplicationsList(INT EnumType)
Definition: gui.cpp:1738
#define ID_INSTALL
Definition: resource.h:71
CAppsListView * m_ListView
Definition: gui.cpp:758
#define MB_OK
Definition: winuser.h:784
#define ID_OPEN_LINK
Definition: resource.h:76
BOOL DownloadListOfApplications(const ATL::CSimpleArray< CAvailableApplicationInfo > &AppsList, BOOL bIsModal)
Definition: loaddlg.cpp:868
VOID CheckAll()
Definition: gui.cpp:624
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2246
#define HIWORD(l)
Definition: typedefs.h:246
#define ID_HELP
Definition: resource.h:28
BOOL DownloadApplication(CAvailableApplicationInfo *pAppInfo, BOOL bIsModal)
Definition: loaddlg.cpp:885
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define ID_MODIFY
Definition: resource.h:75
#define HeapFree(x, y, z)
Definition: compat.h:402
#define EN_CHANGE
Definition: winuser.h:2004

◆ OnCreate()

LRESULT CMainWindow::OnCreate ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 191 of file winproc.cpp.

192 {
195  return 0;
196 }
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define ICON_SMALL
Definition: tnclass.cpp:48
LONG_PTR LPARAM
Definition: windef.h:208
HINSTANCE hProgInstance
Definition: main.cpp:50
#define IDI_APPICON
Definition: resource.h:166
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1048
#define LoadIcon
Definition: winuser.h:5714
#define ICON_BIG
Definition: tnclass.cpp:51

◆ OnDestroy()

LRESULT CMainWindow::OnDestroy ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 198 of file winproc.cpp.

199 {
201  PostQuitMessage(0); /* send a WM_QUIT to the message queue */
202  return 0;
203 }
WINDOWPLACEMENT WindowPlacement
Definition: registry.h:28
BOOL GetWindowPlacement(WINDOWPLACEMENT *lpwndpl) const
Definition: atlwin.h:750
RegistrySettings registrySettings
Definition: main.cpp:30
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)

◆ OnDropFiles()

LRESULT CMainWindow::OnDropFiles ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 175 of file winproc.cpp.

176 {
177  HDROP drophandle;
178  TCHAR droppedfile[MAX_PATH];
179  HBITMAP bmNew = NULL;
180  drophandle = (HDROP)wParam;
181  DragQueryFile(drophandle, 0, droppedfile, SIZEOF(droppedfile));
182  DragFinish(drophandle);
183  LoadDIBFromFile(&bmNew, droppedfile, &fileTime, &fileSize, &fileHPPM, &fileVPPM);
184  if (bmNew != NULL)
185  {
186  UpdateApplicationProperties(bmNew, droppedfile);
187  }
188  return 0;
189 }
int fileSize
Definition: main.cpp:54
WPARAM wParam
Definition: combotst.c:138
void LoadDIBFromFile(HBITMAP *hBitmap, LPCTSTR name, LPSYSTEMTIME time, int *size, int *hRes, int *vRes)
Definition: dib.cpp:84
SYSTEMTIME fileTime
Definition: main.cpp:57
#define SIZEOF(_ar)
Definition: calc.h:97
smooth NULL
Definition: ftsmooth.c:416
int fileHPPM
Definition: main.cpp:55
char TCHAR
Definition: xmlstorage.h:189
#define MAX_PATH
Definition: compat.h:26
void UpdateApplicationProperties(HBITMAP bitmap, LPCTSTR newfilepathname)
Definition: winproc.cpp:105
#define DragQueryFile
Definition: shellapi.h:682
void WINAPI DragFinish(HDROP h)
Definition: shellole.c:543
static HBITMAP
Definition: button.c:44
int fileVPPM
Definition: main.cpp:56

◆ OnGetMinMaxInfo()

LRESULT CMainWindow::OnGetMinMaxInfo ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 327 of file winproc.cpp.

328 {
330  mm->ptMinTrackSize.x = 330;
331  mm->ptMinTrackSize.y = 430;
332  return 0;
333 }
POINT ptMinTrackSize
Definition: winuser.h:3604
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
struct tagMINMAXINFO * LPMINMAXINFO
LPARAM lParam
Definition: combotst.c:139

◆ OnInitMenuPopup()

LRESULT CMainWindow::OnInitMenuPopup ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 234 of file winproc.cpp.

235 {
236  HMENU menu = GetMenu();
237  BOOL trueSelection = (selectionWindow.IsWindowVisible() && ((toolsModel.GetActiveTool() == TOOL_FREESEL) || (toolsModel.GetActiveTool() == TOOL_RECTSEL)));
238  switch (lParam)
239  {
240  case 0: /* File menu */
241  if ((HMENU)wParam != GetSubMenu(menu, 0))
242  break;
251  {
253  CPath pathFile1(registrySettings.strFile1);
254  pathFile1.CompactPathEx(30);
256  {
257  CPath pathFile2(registrySettings.strFile2);
258  pathFile2.CompactPathEx(30);
260  {
261  CPath pathFile3(registrySettings.strFile3);
262  pathFile3.CompactPathEx(30);
264  {
265  CPath pathFile4(registrySettings.strFile4);
266  pathFile4.CompactPathEx(30);
267  InsertMenu((HMENU)wParam, 17, MF_BYPOSITION | MF_STRING, IDM_FILE4, _T("4 ") + pathFile4);
268  }
269  InsertMenu((HMENU)wParam, 17, MF_BYPOSITION | MF_STRING, IDM_FILE3, _T("3 ") + pathFile3);
270  }
271  InsertMenu((HMENU)wParam, 17, MF_BYPOSITION | MF_STRING, IDM_FILE2, _T("2 ") + pathFile2);
272  }
273  InsertMenu((HMENU)wParam, 17, MF_BYPOSITION | MF_STRING, IDM_FILE1, _T("1 ") + pathFile1);
274  }
275  break;
276  case 1: /* Edit menu */
279  EnableMenuItem(menu, IDM_EDITCUT, ENABLED_IF(trueSelection));
280  EnableMenuItem(menu, IDM_EDITCOPY, ENABLED_IF(trueSelection));
281  EnableMenuItem(menu, IDM_EDITDELETESELECTION, ENABLED_IF(trueSelection));
282  EnableMenuItem(menu, IDM_EDITINVERTSELECTION, ENABLED_IF(trueSelection));
283  EnableMenuItem(menu, IDM_EDITCOPYTO, ENABLED_IF(trueSelection));
284  OpenClipboard();
286  CloseClipboard();
287  break;
288  case 2: /* View menu */
290  CheckMenuItem(menu, IDM_VIEWCOLORPALETTE, CHECKED_IF(paletteWindow.IsWindowVisible()));
292  CheckMenuItem(menu, IDM_FORMATICONBAR, CHECKED_IF(textEditWindow.IsWindowVisible()));
294 
297  break;
298  case 3: /* Image menu */
299  EnableMenuItem(menu, IDM_IMAGECROP, ENABLED_IF(selectionWindow.IsWindowVisible()));
301  break;
302  }
303 
311 
314  return 0;
315 }
BOOL isAFile
Definition: main.cpp:53
int SelectedPalette()
#define IDM_EDITUNDO
Definition: definitions.h:75
ToolsModel toolsModel
Definition: main.cpp:18
CToolBox toolBoxContainer
Definition: main.cpp:65
#define MF_BYCOMMAND
Definition: winuser.h:202
#define IDM_VIEWZOOM125
Definition: definitions.h:90
#define TOOL_TEXT
Definition: definitions.h:144
#define IDM_VIEWSHOWGRID
Definition: definitions.h:98
#define IDM_VIEWZOOM400
Definition: definitions.h:95
#define InsertMenu
Definition: winuser.h:5704
BOOL showGrid
Definition: main.cpp:59
#define IDM_EDITCOPY
Definition: definitions.h:78
#define IDM_IMAGECROP
Definition: definitions.h:103
#define IDM_VIEWCOLORPALETTE
Definition: definitions.h:87
#define MF_STRING
Definition: winuser.h:138
#define IDM_EDITCOPYTO
Definition: definitions.h:83
CString strFile2
Definition: registry.h:31
#define IDM_VIEWSTATUSBAR
Definition: definitions.h:88
#define IDM_COLORSOLDPALETTE
Definition: definitions.h:111
BOOL HasRedoSteps()
Definition: history.cpp:178
WPARAM wParam
Definition: combotst.c:138
int GetZoom()
Definition: toolsmodel.cpp:104
#define IDM_VIEWZOOM100
Definition: definitions.h:93
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define IDM_FILE1
Definition: definitions.h:68
unsigned int BOOL
Definition: ntddk_ex.h:94
#define IDM_FILEASWALLPAPERCENTERED
Definition: definitions.h:64
#define MF_BYPOSITION
Definition: winuser.h:203
#define CF_BITMAP
Definition: constants.h:397
smooth NULL
Definition: ftsmooth.c:416
#define IDM_VIEWZOOM25
Definition: definitions.h:91
#define IDM_FILE4
Definition: definitions.h:71
HMENU GetMenu() const
Definition: atlwin.h:636
BOOL IsBackgroundTransparent()
Definition: toolsmodel.cpp:93
#define _T(x)
Definition: vfdio.h:22
#define IDM_FILEASWALLPAPERSTRETCHED
Definition: definitions.h:65
#define IDM_FILEMOSTRECENTLYUSEDFILE
Definition: definitions.h:67
BOOL OpenClipboard()
Definition: atlwin.h:970
#define IDM_FORMATICONBAR
Definition: definitions.h:89
HWND hStatusBar
Definition: main.cpp:35
DWORD WINAPI CheckMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
BOOL showMiniature
Definition: main.cpp:60
BOOL WINAPI CloseClipboard(void)
Definition: ntwrapper.h:178
#define IDM_EDITINVERTSELECTION
Definition: definitions.h:81
#define IDM_VIEWZOOM50
Definition: definitions.h:92
#define CHECKED_IF(a)
Definition: definitions.h:25
ImageModel imageModel
Definition: main.cpp:32
#define TOOL_FREESEL
Definition: definitions.h:135
#define IDM_FILEASWALLPAPERPLANE
Definition: definitions.h:63
#define IDM_EDITCUT
Definition: definitions.h:77
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define IDM_EDITPASTE
Definition: definitions.h:79
CPaletteWindow paletteWindow
Definition: main.cpp:67
BOOL HasUndoSteps()
Definition: history.cpp:173
CString strFile1
Definition: registry.h:30
#define TOOL_RECTSEL
Definition: definitions.h:136
CString strFile4
Definition: registry.h:33
#define IDM_IMAGEDRAWOPAQUE
Definition: definitions.h:107
#define IDM_EDITDELETESELECTION
Definition: definitions.h:80
bool IsEmpty() const
Definition: atlsimpstr.h:379
#define IDM_COLORSMODERNPALETTE
Definition: definitions.h:110
#define IDM_EDITREDO
Definition: definitions.h:76
#define IDM_FILE2
Definition: definitions.h:69
PaletteModel paletteModel
Definition: main.cpp:28
BOOL WINAPI RemoveMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
int GetActiveTool()
Definition: toolsmodel.cpp:60
#define ENABLED_IF(a)
Definition: definitions.h:27
HANDLE WINAPI GetClipboardData(_In_ UINT)
#define IDM_FILE3
Definition: definitions.h:70
#define IDM_VIEWZOOM200
Definition: definitions.h:94
#define IDM_VIEWZOOM800
Definition: definitions.h:96
CTextEditWindow textEditWindow
Definition: main.cpp:80
RegistrySettings registrySettings
Definition: main.cpp:30
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
#define IDM_VIEWSHOWMINIATURE
Definition: definitions.h:99
LPARAM lParam
Definition: combotst.c:139
BOOL IsWindowVisible() const
Definition: atlwin.h:890
CSelectionWindow selectionWindow
Definition: main.cpp:70
#define IDM_VIEWTOOLBOX
Definition: definitions.h:86
CString strFile3
Definition: registry.h:32

◆ OnKeyDown()

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

Definition at line 342 of file winproc.cpp.

343 {
344  if (wParam == VK_ESCAPE)
345  {
346  HWND hwndCapture = GetCapture();
347  if (hwndCapture)
348  {
349  if (selectionWindow.m_hWnd == hwndCapture ||
350  imageArea.m_hWnd == hwndCapture ||
351  fullscreenWindow.m_hWnd == hwndCapture ||
352  sizeboxLeftTop.m_hWnd == hwndCapture ||
353  sizeboxCenterTop.m_hWnd == hwndCapture ||
354  sizeboxRightTop.m_hWnd == hwndCapture ||
355  sizeboxLeftCenter.m_hWnd == hwndCapture ||
356  sizeboxRightCenter.m_hWnd == hwndCapture ||
357  sizeboxLeftBottom.m_hWnd == hwndCapture ||
358  sizeboxCenterBottom.m_hWnd == hwndCapture ||
359  sizeboxRightBottom.m_hWnd == hwndCapture)
360  {
361  SendMessage(hwndCapture, nMsg, wParam, lParam);
362  }
363  }
364  else
365  {
366  switch (toolsModel.GetActiveTool())
367  {
368  case TOOL_SHAPE: case TOOL_BEZIER:
370  break;
371  }
372  }
373  }
374  return 0;
375 }
ToolsModel toolsModel
Definition: main.cpp:18
CSizeboxWindow sizeboxRightCenter
Definition: main.cpp:76
#define TOOL_SHAPE
Definition: definitions.h:148
#define VK_ESCAPE
Definition: winuser.h:2189
WPARAM wParam
Definition: combotst.c:138
CImgAreaWindow imageArea
Definition: main.cpp:71
CSizeboxWindow sizeboxCenterTop
Definition: main.cpp:73
CSizeboxWindow sizeboxRightTop
Definition: main.cpp:74
CSizeboxWindow sizeboxCenterBottom
Definition: main.cpp:78
#define TOOL_BEZIER
Definition: definitions.h:146
HWND WINAPI GetCapture(void)
Definition: message.c:2879
CSizeboxWindow sizeboxRightBottom
Definition: main.cpp:79
CFullscreenWindow fullscreenWindow
Definition: main.cpp:63
CSizeboxWindow sizeboxLeftCenter
Definition: main.cpp:75
HWND m_hWnd
Definition: atlwin.h:268
CSizeboxWindow sizeboxLeftBottom
Definition: main.cpp:77
int GetActiveTool()
Definition: toolsmodel.cpp:60
CSizeboxWindow sizeboxLeftTop
Definition: main.cpp:72
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1048
LPARAM lParam
Definition: combotst.c:139
CSelectionWindow selectionWindow
Definition: main.cpp:70

◆ OnLink()

virtual VOID CMainWindow::OnLink ( ENLINK Link)
inlineprivatevirtual

Definition at line 1426 of file gui.cpp.

1427  {
1428  switch (Link->msg)
1429  {
1430  case WM_LBUTTONUP:
1431  case WM_RBUTTONUP:
1432  {
1433  if (pLink) HeapFree(GetProcessHeap(), 0, pLink);
1434 
1436  (max(Link->chrg.cpMin, Link->chrg.cpMax) -
1437  min(Link->chrg.cpMin, Link->chrg.cpMax) + 1) * sizeof(WCHAR));
1438  if (!pLink)
1439  {
1440  /* TODO: Error message */
1441  return;
1442  }
1443 
1444  m_RichEdit->SendMessageW(EM_SETSEL, Link->chrg.cpMin, Link->chrg.cpMax);
1445  m_RichEdit->SendMessageW(EM_GETSELTEXT, 0, (LPARAM) pLink);
1446 
1447  ShowPopupMenu(m_RichEdit->m_hWnd, IDR_LINKMENU, -1);
1448  }
1449  break;
1450  }
1451  }
VOID ShowPopupMenu(HWND hwnd, UINT MenuID, UINT DefaultItem)
Definition: misc.cpp:74
#define max(a, b)
Definition: svc.c:63
static int Link(const char **args)
Definition: vfdcmd.c:2414
LPWSTR pLink
Definition: gui.cpp:767
LONG_PTR LPARAM
Definition: windef.h:208
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define EM_SETSEL
Definition: winuser.h:2000
#define WM_RBUTTONUP
Definition: winuser.h:1762
#define WM_LBUTTONUP
Definition: winuser.h:1759
#define min(a, b)
Definition: monoChain.cc:55
#define IDR_LINKMENU
Definition: resource.h:66
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define EM_GETSELTEXT
Definition: richedit.h:95
#define HeapFree(x, y, z)
Definition: compat.h:402
CAppRichEdit * m_RichEdit
Definition: gui.cpp:762

Referenced by ProcessWindowMessage().

◆ OnSetCursor()

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

Definition at line 335 of file winproc.cpp.

336 {
338  bHandled = FALSE;
339  return 0;
340 }
smooth NULL
Definition: ftsmooth.c:416
#define LoadCursor
Definition: winuser.h:5713
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define IDC_ARROW
Definition: winuser.h:682

◆ OnSize() [1/2]

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

Definition at line 317 of file winproc.cpp.

318 {
319  int test[] = { LOWORD(lParam) - 260, LOWORD(lParam) - 140, LOWORD(lParam) - 20 };
323  Invalidate(TRUE);
324  return 0;
325 }
#define TRUE
Definition: types.h:120
#define test
Definition: rosglue.h:37
WPARAM wParam
Definition: combotst.c:138
LONG_PTR LPARAM
Definition: windef.h:208
#define WM_SIZE
Definition: winuser.h:1593
HWND hStatusBar
Definition: main.cpp:35
void alignChildrenToMainWindow()
Definition: winproc.cpp:51
#define SB_SETPARTS
Definition: commctrl.h:1950
BOOL Invalidate(BOOL bErase=TRUE)
Definition: atlwin.h:828
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1048
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82

Referenced by ProcessWindowMessage().

◆ OnSize() [2/2]

VOID CMainWindow::OnSize ( HWND  hwnd,
WPARAM  wParam,
LPARAM  lParam 
)
inlineprivate

Definition at line 1014 of file gui.cpp.

1015  {
1016  if (wParam == SIZE_MINIMIZED)
1017  return;
1018 
1019  /* Size status bar */
1020  m_StatusBar->SendMessage(WM_SIZE, 0, 0);
1021 
1022  /* Size tool bar */
1023  m_Toolbar->AutoSize();
1024 
1025  /* Automatically hide captions */
1026  DWORD dToolbarTreshold = m_Toolbar->GetMaxButtonsWidth();
1027  DWORD dSearchbarMargin = (LOWORD(lParam) - m_SearchBar->m_Width);
1028 
1029  if (dSearchbarMargin > dToolbarTreshold)
1030  {
1032  }
1033  else if (dSearchbarMargin < dToolbarTreshold)
1034  {
1036  }
1037 
1038  RECT r = {0, 0, LOWORD(lParam), HIWORD(lParam)};
1039  HDWP hdwp = NULL;
1041 
1042  hdwp = BeginDeferWindowPos(count);
1043  if (hdwp)
1044  {
1045  hdwp = m_ClientPanel->OnParentSize(r, hdwp);
1046  if (hdwp)
1047  {
1048  EndDeferWindowPos(hdwp);
1049  }
1050 
1051  }
1052 
1053  // TODO: Sub-layouts for children of children
1055  hdwp = BeginDeferWindowPos(count);
1056  if (hdwp)
1057  {
1058  hdwp = m_SearchBar->OnParentSize(r, hdwp);
1059  if (hdwp)
1060  {
1061  EndDeferWindowPos(hdwp);
1062  }
1063  }
1064 
1065  }
DWORD GetMaxButtonsWidth() const
Definition: gui.cpp:427
HDWP WINAPI BeginDeferWindowPos(_In_ int)
VOID ShowButtonCaption()
Definition: gui.cpp:421
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
virtual DWORD_PTR CountSizableChildren()
Definition: rosui.h:472
GLuint GLuint GLsizei count
Definition: gl.h:1545
const INT m_Width
Definition: gui.cpp:721
int32_t INT
Definition: typedefs.h:56
WPARAM wParam
Definition: combotst.c:138
virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
Definition: rosui.h:417
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
smooth NULL
Definition: ftsmooth.c:416
DWORD AutoSize()
Definition: rosctrls.h:371
#define WM_SIZE
Definition: winuser.h:1593
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SIZE_MINIMIZED
Definition: winuser.h:2481
CUiWindow< CSearchBar > * m_SearchBar
Definition: gui.cpp:764
VOID HideButtonCaption()
Definition: gui.cpp:415
CMainToolbar * m_Toolbar
Definition: gui.cpp:757
#define HIWORD(l)
Definition: typedefs.h:246
CUiPanel * m_ClientPanel
Definition: gui.cpp:753
virtual DWORD_PTR CountSizableChildren()
Definition: rosui.h:403
LPARAM lParam
Definition: combotst.c:139
virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
Definition: rosui.h:477
#define LOWORD(l)
Definition: pedump.c:82
CUiWindow< CStatusBar > * m_StatusBar
Definition: gui.cpp:761

◆ OnSysColorChange()

LRESULT CMainWindow::OnSysColorChange ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 377 of file winproc.cpp.

378 {
379  /* Redirect message to common controls */
381  SendMessage(hToolbar, WM_SYSCOLORCHANGE, 0, 0);
382  return 0;
383 }
#define WM_SYSCOLORCHANGE
Definition: winuser.h:1608
CToolBox toolBoxContainer
Definition: main.cpp:65
#define TOOLBARCLASSNAME
Definition: commctrl.h:942
smooth NULL
Definition: ftsmooth.c:416
#define FindWindowEx
Definition: winuser.h:5679
HWND m_hWnd
Definition: atlwin.h:268
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1048

◆ ProcessWindowMessage()

BOOL CMainWindow::ProcessWindowMessage ( HWND  hwnd,
UINT  Msg,
WPARAM  wParam,
LPARAM  lParam,
LRESULT theResult,
DWORD  dwMapId 
)
inlineprivatevirtual

Implements ATL::CMessageMap.

Definition at line 1122 of file gui.cpp.

1123  {
1124  theResult = 0;
1125  switch (Msg)
1126  {
1127  case WM_CREATE:
1128  if (!InitControls())
1129  ::PostMessageW(hwnd, WM_CLOSE, 0, 0);
1130  break;
1131 
1132  case WM_DESTROY:
1133  {
1135  SaveSettings(hwnd);
1136 
1137  FreeLogs();
1139 
1142 
1143  delete m_ClientPanel;
1144 
1145  PostQuitMessage(0);
1146  return 0;
1147  }
1148 
1149  case WM_COMMAND:
1151  break;
1152 
1153  case WM_NOTIFY:
1154  {
1155  LPNMHDR data = (LPNMHDR) lParam;
1156 
1157  switch (data->code)
1158  {
1159  case TVN_SELCHANGED:
1160  {
1161  if (data->hwndFrom == m_TreeView->m_hWnd)
1162  {
1163  switch (((LPNMTREEVIEW) lParam)->itemNew.lParam)
1164  {
1165  case IDS_INSTALLED:
1167  break;
1168 
1169  case IDS_APPLICATIONS:
1171  break;
1172 
1173  case IDS_UPDATES:
1175  break;
1176 
1177  case IDS_AVAILABLEFORINST:
1179  break;
1180 
1181  case IDS_CAT_AUDIO:
1183  break;
1184 
1185  case IDS_CAT_DEVEL:
1187  break;
1188 
1189  case IDS_CAT_DRIVERS:
1191  break;
1192 
1193  case IDS_CAT_EDU:
1195  break;
1196 
1197  case IDS_CAT_ENGINEER:
1199  break;
1200 
1201  case IDS_CAT_FINANCE:
1203  break;
1204 
1205  case IDS_CAT_GAMES:
1207  break;
1208 
1209  case IDS_CAT_GRAPHICS:
1211  break;
1212 
1213  case IDS_CAT_INTERNET:
1215  break;
1216 
1217  case IDS_CAT_LIBS:
1219  break;
1220 
1221  case IDS_CAT_OFFICE:
1223  break;
1224 
1225  case IDS_CAT_OTHER:
1227  break;
1228 
1229  case IDS_CAT_SCIENCE:
1231  break;
1232 
1233  case IDS_CAT_TOOLS:
1235  break;
1236 
1237  case IDS_CAT_VIDEO:
1239  break;
1240 
1241  case IDS_CAT_THEMES:
1243  break;
1244 
1245  case IDS_SELECTEDFORINST:
1247  break;
1248  }
1249  }
1250 
1251  HMENU mainMenu = ::GetMenu(hwnd);
1252  HMENU lvwMenu = ::GetMenu(m_ListView->m_hWnd);
1253 
1254  /* Disable/enable items based on treeview selection */
1256  {
1258  EnableMenuItem(mainMenu, ID_INSTALL, MF_GRAYED);
1260  EnableMenuItem(mainMenu, ID_MODIFY, MF_ENABLED);
1261 
1263  EnableMenuItem(lvwMenu, ID_INSTALL, MF_GRAYED);
1265  EnableMenuItem(lvwMenu, ID_MODIFY, MF_ENABLED);
1266 
1267  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_REGREMOVE, TRUE);
1268  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_INSTALL, FALSE);
1269  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_UNINSTALL, TRUE);
1270  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_MODIFY, TRUE);
1271  }
1272  else
1273  {
1275  EnableMenuItem(mainMenu, ID_INSTALL, MF_ENABLED);
1277  EnableMenuItem(mainMenu, ID_MODIFY, MF_GRAYED);
1278 
1282  EnableMenuItem(lvwMenu, ID_MODIFY, MF_GRAYED);
1283 
1284  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_REGREMOVE, FALSE);
1285  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_INSTALL, TRUE);
1286  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_UNINSTALL, FALSE);
1287  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_MODIFY, FALSE);
1288  }
1289  }
1290  break;
1291 
1292  case LVN_ITEMCHANGED:
1293  {
1294  LPNMLISTVIEW pnic = (LPNMLISTVIEW) lParam;
1295 
1296  if (pnic->hdr.hwndFrom == m_ListView->m_hWnd)
1297  {
1298  /* Check if this is a valid item
1299  * (technically, it can be also an unselect) */
1300  INT ItemIndex = pnic->iItem;
1301  if (ItemIndex == -1 ||
1302  ItemIndex >= ListView_GetItemCount(pnic->hdr.hwndFrom))
1303  {
1304  break;
1305  }
1306 
1307  /* Check if the focus has been moved to another item */
1308  if ((pnic->uChanged & LVIF_STATE) &&
1309  (pnic->uNewState & LVIS_FOCUSED) &&
1310  !(pnic->uOldState & LVIS_FOCUSED))
1311  {
1312  ShowAppInfo(ItemIndex);
1313  }
1314  /* Check if the item is checked */
1315  if ((pnic->uNewState & LVIS_STATEIMAGEMASK) && !bUpdating)
1316  {
1317  BOOL checked = m_ListView->GetCheckState(pnic->iItem);
1318  /* FIXME: HAX!
1319  - preventing decremention below zero as a safeguard for ReactOS
1320  In ReactOS this action is triggered whenever user changes *selection*, but should be only when *checkbox* state toggled
1321  Maybe LVIS_STATEIMAGEMASK is set incorrectly
1322  */
1323  nSelectedApps +=
1324  (checked)
1325  ? 1
1326  : ((nSelectedApps > 0)
1327  ? -1
1328  : 0);
1329 
1330  /* Update item's selection status */
1331  m_ListView->SetSelected(pnic->iItem, checked);
1332 
1334  }
1335  }
1336  }
1337  break;
1338 
1339  case LVN_COLUMNCLICK:
1340  {
1341  LPNMLISTVIEW pnmv = (LPNMLISTVIEW) lParam;
1342 
1343  m_ListView->ColumnClick(pnmv);
1344  }
1345  break;
1346 
1347  case NM_CLICK:
1348  {
1349  if (data->hwndFrom == m_ListView->m_hWnd && ((LPNMLISTVIEW) lParam)->iItem != -1)
1350  {
1351  ShowAppInfo(-1);
1352  }
1353  }
1354  break;
1355 
1356  case NM_DBLCLK:
1357  {
1358  if (data->hwndFrom == m_ListView->m_hWnd && ((LPNMLISTVIEW) lParam)->iItem != -1)
1359  {
1360  /* this won't do anything if the program is already installed */
1362  }
1363  }
1364  break;
1365 
1366  case NM_RCLICK:
1367  {
1368  if (data->hwndFrom == m_ListView->m_hWnd && ((LPNMLISTVIEW) lParam)->iItem != -1)
1369  {
1370  ShowPopupMenu(m_ListView->m_hWnd, 0, ID_INSTALL);
1371  }
1372  }
1373  break;
1374 
1375  case EN_LINK:
1376  OnLink((ENLINK*) lParam);
1377  break;
1378 
1379  case TTN_GETDISPINFO:
1381  break;
1382  }
1383  }
1384  break;
1385 
1386  case WM_SIZE:
1387  OnSize(hwnd, wParam, lParam);
1388  break;
1389 
1390  case WM_SIZING:
1391  {
1392  LPRECT pRect = (LPRECT) lParam;
1393 
1394  if (pRect->right - pRect->left < 565)
1395  pRect->right = pRect->left + 565;
1396 
1397  if (pRect->bottom - pRect->top < 300)
1398  pRect->bottom = pRect->top + 300;
1399 
1400  return TRUE;
1401  }
1402 
1403  case WM_SYSCOLORCHANGE:
1404  {
1405  /* Forward WM_SYSCOLORCHANGE to common controls */
1406  m_ListView->SendMessageW(WM_SYSCOLORCHANGE, 0, 0);
1407  m_TreeView->SendMessageW(WM_SYSCOLORCHANGE, 0, 0);
1408  m_Toolbar->SendMessageW(WM_SYSCOLORCHANGE, 0, 0);
1410  }
1411  break;
1412 
1413  case WM_TIMER:
1414  if (wParam == SEARCH_TIMER_ID)
1415  {
1417  if (bSearchEnabled)
1419  }
1420  break;
1421  }
1422 
1423  return FALSE;
1424  }
VOID ShowPopupMenu(HWND hwnd, UINT MenuID, UINT DefaultItem)
Definition: misc.cpp:74
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define WM_SYSCOLORCHANGE
Definition: winuser.h:1608
VOID OnGetDispInfo(LPTOOLTIPTEXT lpttt)
Definition: gui.cpp:321
#define TRUE
Definition: types.h:120
BOOL InitControls()
Definition: gui.cpp:975
UINT uNewState
Definition: commctrl.h:3032
#define ID_REGREMOVE
Definition: resource.h:80
#define SW_HIDE
Definition: winuser.h:762
#define IDS_CAT_DEVEL
Definition: resource.h:166
BOOL bUpdating
Definition: gui.cpp:772
#define LVN_ITEMCHANGED
Definition: commctrl.h:3127
struct @1591 Msg[]
LONG top
Definition: windef.h:292
#define LPNMTREEVIEW
Definition: commctrl.h:3639
#define IDS_CAT_OFFICE
Definition: resource.h:175
INT SelectedEnumType
Definition: gui.cpp:775
LONG left
Definition: windef.h:291
#define IDS_CAT_VIDEO
Definition: resource.h:179
VOID FreeLogs()
Definition: misc.cpp:232
LONG right
Definition: windef.h:293
#define IDS_CAT_FINANCE
Definition: resource.h:170
#define ID_UNINSTALL
Definition: resource.h:72
int32_t INT
Definition: typedefs.h:56
DWORD WINAPI GetSysColor(_In_ int)
WPARAM wParam
Definition: combotst.c:138
#define IDS_AVAILABLEFORINST
Definition: resource.h:96
struct tagNMHDR * LPNMHDR
#define IDS_INSTALLED
Definition: resource.h:95
VOID ColumnClick(LPNMLISTVIEW pnmv)
Definition: gui.cpp:471
BOOL IsSelectedNodeInstalled()
Definition: gui.cpp:1453
BOOL bSearchEnabled
Definition: gui.cpp:771
void SaveSettings(void)
Definition: settings.c:113
VOID FreeInstalledAppList()
Definition: gui.cpp:1617
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
unsigned int BOOL
Definition: ntddk_ex.h:94
#define TTN_GETDISPINFO
Definition: commctrl.h:1874
#define TB_ENABLEBUTTON
Definition: commctrl.h:1038
BOOL KillTimer(UINT_PTR nIDEvent)
Definition: atlwin.h:908
VOID FreeCachedEntries()
Definition: available.cpp:249
#define WM_SIZING
Definition: winuser.h:1789
virtual VOID OnLink(ENLINK *Link)
Definition: gui.cpp:1426
BOOL GetCheckState(INT item)
Definition: gui.cpp:587
INT nSelectedApps
Definition: gui.cpp:769
VOID SetSelected(INT item, BOOL value)
Definition: gui.cpp:601
UINT uOldState
Definition: commctrl.h:3033
#define LPRECT
Definition: precomp.h:28
#define ListView_GetItemCount(hwnd)
Definition: commctrl.h:2303
#define IDS_SELECTEDFORINST
Definition: resource.h:114
#define EM_SETBKGNDCOLOR
Definition: richedit.h:100
#define IDS_CAT_INTERNET
Definition: resource.h:173
#define LVIS_STATEIMAGEMASK
Definition: commctrl.h:2322
#define WM_DESTROY
Definition: winuser.h:1591
#define IDS_CAT_DRIVERS
Definition: resource.h:167
#define LPTOOLTIPTEXT
Definition: commctrl.h:1886
HMENU GetMenu() const
Definition: atlwin.h:636
#define IDS_CAT_OTHER
Definition: resource.h:176
#define WM_SIZE
Definition: winuser.h:1593
#define TVN_SELCHANGED
Definition: commctrl.h:3731
#define WM_TIMER
Definition: winuser.h:1724
#define MF_ENABLED
Definition: winuser.h:128
#define WM_CLOSE
Definition: winuser.h:1603
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
BOOL IsInstalledEnum(INT x)
Definition: defines.h:69
#define IDS_CAT_LIBS
Definition: resource.h:174
LRESULT OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: winproc.cpp:317
#define IDS_CAT_THEMES
Definition: resource.h:180
#define COLOR_BTNFACE
Definition: winuser.h:918
VOID UpdateStatusBarText()
Definition: gui.cpp:1727
#define IDS_CAT_SCIENCE
Definition: resource.h:177
#define IDS_CAT_GRAPHICS
Definition: resource.h:172
#define IDS_CAT_AUDIO
Definition: resource.h:165
#define WM_COMMAND
Definition: winuser.h:1722
HWND hwndFrom
Definition: winuser.h:3131
#define NM_CLICK
Definition: commctrl.h:130
#define IDS_CAT_EDU
Definition: resource.h:168
#define IDS_CAT_ENGINEER
Definition: resource.h:169
CAvailableApps m_AvailableApps
Definition: gui.cpp:765
#define IDS_APPLICATIONS
Definition: resource.h:98
#define SEARCH_TIMER_ID
Definition: gui.cpp:25