ReactOS  0.4.15-dev-4853-g3a72a52
CDefView Class Reference
Inheritance diagram for CDefView:
Collaboration diagram for CDefView:

Public Member Functions

 CDefView ()
 
 ~CDefView ()
 
HRESULT WINAPI Initialize (IShellFolder *shellFolder)
 
HRESULT IncludeObject (PCUITEMID_CHILD pidl)
 
HRESULT OnDefaultCommand ()
 
HRESULT OnStateChange (UINT uFlags)
 
void UpdateStatusbar ()
 
void CheckToolbar ()
 
BOOL CreateList ()
 
void UpdateListColors ()
 
BOOL InitList ()
 
PCUITEMID_CHILD _PidlByItem (int i)
 
PCUITEMID_CHILD _PidlByItem (LVITEM &lvItem)
 
int LV_FindItemByPidl (PCUITEMID_CHILD pidl)
 
int LV_AddItem (PCUITEMID_CHILD pidl)
 
BOOLEAN LV_DeleteItem (PCUITEMID_CHILD pidl)
 
BOOLEAN LV_RenameItem (PCUITEMID_CHILD pidlOld, PCUITEMID_CHILD pidlNew)
 
BOOLEAN LV_ProdItem (PCUITEMID_CHILD pidl)
 
HRESULT FillList ()
 
HRESULT FillFileMenu ()
 
HRESULT FillEditMenu ()
 
HRESULT FillViewMenu ()
 
HRESULT FillArrangeAsMenu (HMENU hmenuArrange)
 
HRESULT CheckViewMode (HMENU hmenuView)
 
UINT GetSelections ()
 
HRESULT OpenSelectedItems ()
 
void OnDeactivate ()
 
void DoActivate (UINT uState)
 
HRESULT drag_notify_subitem (DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
 
HRESULT InvokeContextMenuCommand (UINT uCommand)
 
LRESULT OnExplorerCommand (UINT uCommand, BOOL bUseSelection)
 
virtual HRESULT STDMETHODCALLTYPE GetWindow (HWND *lphwnd)
 
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp (BOOL fEnterMode)
 
virtual HRESULT STDMETHODCALLTYPE TranslateAccelerator (MSG *pmsg)
 
virtual HRESULT STDMETHODCALLTYPE EnableModeless (BOOL fEnable)
 
virtual HRESULT STDMETHODCALLTYPE UIActivate (UINT uState)
 
virtual HRESULT STDMETHODCALLTYPE Refresh ()
 
virtual HRESULT STDMETHODCALLTYPE CreateViewWindow (IShellView *psvPrevious, LPCFOLDERSETTINGS pfs, IShellBrowser *psb, RECT *prcView, HWND *phWnd)
 
virtual HRESULT STDMETHODCALLTYPE DestroyViewWindow ()
 
virtual HRESULT STDMETHODCALLTYPE GetCurrentInfo (LPFOLDERSETTINGS pfs)
 
virtual HRESULT STDMETHODCALLTYPE AddPropertySheetPages (DWORD dwReserved, LPFNSVADDPROPSHEETPAGE pfn, LPARAM lparam)
 
virtual HRESULT STDMETHODCALLTYPE SaveViewState ()
 
virtual HRESULT STDMETHODCALLTYPE SelectItem (PCUITEMID_CHILD pidlItem, SVSIF uFlags)
 
virtual HRESULT STDMETHODCALLTYPE GetItemObject (UINT uItem, REFIID riid, void **ppv)
 
virtual HRESULT STDMETHODCALLTYPE GetView (SHELLVIEWID *view_guid, ULONG view_type)
 
virtual HRESULT STDMETHODCALLTYPE CreateViewWindow2 (LPSV2CVW2_PARAMS view_params)
 
virtual HRESULT STDMETHODCALLTYPE HandleRename (LPCITEMIDLIST new_pidl)
 
virtual HRESULT STDMETHODCALLTYPE SelectAndPositionItem (LPCITEMIDLIST item, UINT flags, POINT *point)
 
virtual HRESULT STDMETHODCALLTYPE CreateViewWindow3 (IShellBrowser *psb, IShellView *psvPrevious, SV3CVW3_FLAGS view_flags, FOLDERFLAGS mask, FOLDERFLAGS flags, FOLDERVIEWMODE mode, const SHELLVIEWID *view_id, RECT *prcView, HWND *hwnd)
 
virtual HRESULT STDMETHODCALLTYPE GetCurrentViewMode (UINT *pViewMode)
 
virtual HRESULT STDMETHODCALLTYPE SetCurrentViewMode (UINT ViewMode)
 
virtual HRESULT STDMETHODCALLTYPE GetFolder (REFIID riid, void **ppv)
 
virtual HRESULT STDMETHODCALLTYPE Item (int iItemIndex, PITEMID_CHILD *ppidl)
 
virtual HRESULT STDMETHODCALLTYPE ItemCount (UINT uFlags, int *pcItems)
 
virtual HRESULT STDMETHODCALLTYPE Items (UINT uFlags, REFIID riid, void **ppv)
 
virtual HRESULT STDMETHODCALLTYPE GetSelectionMarkedItem (int *piItem)
 
virtual HRESULT STDMETHODCALLTYPE GetFocusedItem (int *piItem)
 
virtual HRESULT STDMETHODCALLTYPE GetItemPosition (PCUITEMID_CHILD pidl, POINT *ppt)
 
virtual HRESULT STDMETHODCALLTYPE GetSpacing (POINT *ppt)
 
virtual HRESULT STDMETHODCALLTYPE GetDefaultSpacing (POINT *ppt)
 
virtual HRESULT STDMETHODCALLTYPE GetAutoArrange ()
 
virtual HRESULT STDMETHODCALLTYPE SelectItem (int iItem, DWORD dwFlags)
 
virtual HRESULT STDMETHODCALLTYPE SelectAndPositionItems (UINT cidl, PCUITEMID_CHILD_ARRAY apidl, POINT *apt, DWORD dwFlags)
 
virtual HRESULT STDMETHODCALLTYPE Rearrange (LPARAM sort)
 
virtual HRESULT STDMETHODCALLTYPE GetArrangeParam (LPARAM *sort)
 
virtual HRESULT STDMETHODCALLTYPE ArrangeGrid ()
 
virtual HRESULT STDMETHODCALLTYPE AutoArrange ()
 
virtual HRESULT STDMETHODCALLTYPE AddObject (PITEMID_CHILD pidl, UINT *item)
 
virtual HRESULT STDMETHODCALLTYPE GetObject (PITEMID_CHILD *pidl, UINT item)
 
virtual HRESULT STDMETHODCALLTYPE RemoveObject (PITEMID_CHILD pidl, UINT *item)
 
virtual HRESULT STDMETHODCALLTYPE GetObjectCount (UINT *count)
 
virtual HRESULT STDMETHODCALLTYPE SetObjectCount (UINT count, UINT flags)
 
virtual HRESULT STDMETHODCALLTYPE UpdateObject (PITEMID_CHILD pidl_old, PITEMID_CHILD pidl_new, UINT *item)
 
virtual HRESULT STDMETHODCALLTYPE RefreshObject (PITEMID_CHILD pidl, UINT *item)
 
virtual HRESULT STDMETHODCALLTYPE SetRedraw (BOOL redraw)
 
virtual HRESULT STDMETHODCALLTYPE GetSelectedCount (UINT *count)
 
virtual HRESULT STDMETHODCALLTYPE GetSelectedObjects (PCUITEMID_CHILD **pidl, UINT *items)
 
virtual HRESULT STDMETHODCALLTYPE IsDropOnSource (IDropTarget *drop_target)
 
virtual HRESULT STDMETHODCALLTYPE GetDragPoint (POINT *pt)
 
virtual HRESULT STDMETHODCALLTYPE GetDropPoint (POINT *pt)
 
virtual HRESULT STDMETHODCALLTYPE MoveIcons (IDataObject *obj)
 
virtual HRESULT STDMETHODCALLTYPE SetItemPos (PCUITEMID_CHILD pidl, POINT *pt)
 
virtual HRESULT STDMETHODCALLTYPE IsBkDropTarget (IDropTarget *drop_target)
 
virtual HRESULT STDMETHODCALLTYPE SetClipboard (BOOL move)
 
virtual HRESULT STDMETHODCALLTYPE SetPoints (IDataObject *obj)
 
virtual HRESULT STDMETHODCALLTYPE GetItemSpacing (ITEMSPACING *spacing)
 
virtual HRESULT STDMETHODCALLTYPE SetCallback (IShellFolderViewCB *new_cb, IShellFolderViewCB **old_cb)
 
virtual HRESULT STDMETHODCALLTYPE Select (UINT flags)
 
virtual HRESULT STDMETHODCALLTYPE QuerySupport (UINT *support)
 
virtual HRESULT STDMETHODCALLTYPE SetAutomationObject (IDispatch *disp)
 
virtual HRESULT STDMETHODCALLTYPE QueryStatus (const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText)
 
virtual HRESULT STDMETHODCALLTYPE Exec (const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
 
virtual HRESULT STDMETHODCALLTYPE DragEnter (IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
 
virtual HRESULT STDMETHODCALLTYPE DragOver (DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
 
virtual HRESULT STDMETHODCALLTYPE DragLeave ()
 
virtual HRESULT STDMETHODCALLTYPE Drop (IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
 
virtual HRESULT STDMETHODCALLTYPE QueryContinueDrag (BOOL fEscapePressed, DWORD grfKeyState)
 
virtual HRESULT STDMETHODCALLTYPE GiveFeedback (DWORD dwEffect)
 
virtual HRESULT STDMETHODCALLTYPE Draw (DWORD dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hdcTargetDev, HDC hdcDraw, LPCRECTL lprcBounds, LPCRECTL lprcWBounds, BOOL(STDMETHODCALLTYPE *pfnContinue)(ULONG_PTR dwContinue), ULONG_PTR dwContinue)
 
virtual HRESULT STDMETHODCALLTYPE GetColorSet (DWORD dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hicTargetDev, LOGPALETTE **ppColorSet)
 
virtual HRESULT STDMETHODCALLTYPE Freeze (DWORD dwDrawAspect, LONG lindex, void *pvAspect, DWORD *pdwFreeze)
 
virtual HRESULT STDMETHODCALLTYPE Unfreeze (DWORD dwFreeze)
 
virtual HRESULT STDMETHODCALLTYPE SetAdvise (DWORD aspects, DWORD advf, IAdviseSink *pAdvSink)
 
virtual HRESULT STDMETHODCALLTYPE GetAdvise (DWORD *pAspects, DWORD *pAdvf, IAdviseSink **ppAdvSink)
 
virtual HRESULT STDMETHODCALLTYPE QueryService (REFGUID guidService, REFIID riid, void **ppvObject)
 
LRESULT OnShowWindow (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnGetDlgCode (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnDestroy (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnEraseBackground (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnPrintClient (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSysColorChange (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnGetShellBrowser (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnNCCreate (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnNCDestroy (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnCreate (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnContextMenu (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSize (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnActivate (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSetFocus (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnKillFocus (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnCommand (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnNotify (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnChangeNotify (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnCustomItem (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSettingChange (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnInitMenuPopup (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
virtual WNDPROC GetWindowProc ()
 
- Public Member Functions inherited from ATL::CWindowImpl< CDefView, CWindow, CControlWinTraits >
HWND Create (HWND hWndParent, _U_RECT rect=NULL, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
 
- Public Member Functions inherited from ATL::CWindowImplBaseT< CWindow, CControlWinTraits >
 CWindowImplBaseT ()
 
virtual void OnFinalMessage (HWND)
 
BOOL SubclassWindow (HWND hWnd)
 
HWND UnsubclassWindow (BOOL bForce=FALSE)
 
LRESULT DefWindowProc (UINT uMsg, WPARAM wParam, LPARAM lParam)
 
HWND Create (HWND hWndParent, _U_RECT rect, LPCTSTR szWindowName, DWORD dwStyle, DWORD dwExStyle, _U_MENUorID MenuOrID, ATOM atom, LPVOID lpCreateParam)
 
- Public Member Functions inherited from ATL::CWindowImplRoot< CWindow >
 CWindowImplRoot ()
 
virtual ~CWindowImplRoot ()
 
- Public Member Functions inherited from ATL::CWindow
 CWindow (HWND hWnd=NULL)
 
 operator HWND () const
 
UINT ArrangeIconicWindows ()
 
void Attach (HWND hWndNew)
 
HDC BeginPaint (LPPAINTSTRUCT lpPaint)
 
BOOL BringWindowToTop ()
 
BOOL CenterWindow (HWND hWndCenter=NULL)
 
BOOL ChangeClipboardChain (HWND hWndNewNext)
 
BOOL CheckDlgButton (int nIDButton, UINT nCheck)
 
BOOL CheckRadioButton (int nIDFirstButton, int nIDLastButton, int nIDCheckButton)
 
HWND ChildWindowFromPoint (POINT point) const
 
HWND ChildWindowFromPointEx (POINT point, UINT uFlags) const
 
BOOL ClientToScreen (LPPOINT lpPoint) const
 
BOOL ClientToScreen (LPRECT lpRect) const
 
HWND Create (LPCTSTR lpstrWndClass, HWND hWndParent, _U_RECT rect=NULL, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
 
BOOL CreateCaret (HBITMAP pBitmap)
 
BOOL CreateGrayCaret (int nWidth, int nHeight)
 
BOOL CreateSolidCaret (int nWidth, int nHeight)
 
HDWP DeferWindowPos (HDWP hWinPosInfo, HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT uFlags)
 
BOOL DestroyWindow ()
 
HWND Detach ()
 
int DlgDirList (LPTSTR lpPathSpec, int nIDListBox, int nIDStaticPath, UINT nFileType)
 
int DlgDirListComboBox (LPTSTR lpPathSpec, int nIDComboBox, int nIDStaticPath, UINT nFileType)
 
BOOL DlgDirSelect (LPTSTR lpString, int nCount, int nIDListBox)
 
BOOL DlgDirSelectComboBox (LPTSTR lpString, int nCount, int nIDComboBox)
 
void DragAcceptFiles (BOOL bAccept=TRUE)
 
BOOL DrawMenuBar ()
 
BOOL EnableScrollBar (UINT uSBFlags, UINT uArrowFlags=ESB_ENABLE_BOTH)
 
BOOL EnableWindow (BOOL bEnable=TRUE)
 
void EndPaint (LPPAINTSTRUCT lpPaint)
 
BOOL FlashWindow (BOOL bInvert)
 
BOOL GetClientRect (LPRECT lpRect) const
 
HDC GetDC ()
 
HDC GetDCEx (HRGN hRgnClip, DWORD flags)
 
HWND GetDescendantWindow (int nID) const
 
HRESULT GetDlgControl (int nID, REFIID iid, void **ppCtrl)
 
int GetDlgCtrlID () const
 
HRESULT GetDlgHost (int nID, REFIID iid, void **ppHost)
 
HWND GetDlgItem (_In_ int nID) const
 
UINT GetDlgItemInt (_In_ int nID, _Out_opt_ BOOL *lpTrans=NULL, _In_ BOOL bSigned=TRUE) const
 
UINT GetDlgItemText (_In_ int nID, _Out_writes_to_(nMaxCount, return+1) LPTSTR lpStr, _In_ int nMaxCount) const
 
BOOL GetDlgItemText (_In_ int nID, _Inout_ _Outref_result_maybenull_ _Post_z_ BSTR &bstrText) const
 
DWORD GetExStyle () const
 
HFONT GetFont () const
 
DWORD GetHotKey () const
 
HICON GetIcon (BOOL bBigIcon=TRUE) const
 
HWND GetLastActivePopup () const
 
HMENU GetMenu () const
 
HWND GetNextDlgGroupItem (HWND hWndCtl, BOOL bPrevious=FALSE) const
 
HWND GetNextDlgTabItem (HWND hWndCtl, BOOL bPrevious=FALSE) const
 
CWindow GetParent () const
 
BOOL GetScrollInfo (int nBar, LPSCROLLINFO lpScrollInfo)
 
BOOL GetScrollPos (int nBar)
 
BOOL GetScrollRange (int nBar, LPINT lpMinPos, LPINT lpMaxPos) const
 
DWORD GetStyle () const
 
HMENU GetSystemMenu (BOOL bRevert)
 
HWND GetTopLevelParent () const
 
HWND GetTopLevelWindow () const
 
HWND GetTopWindow () const
 
BOOL GetUpdateRect (LPRECT lpRect, BOOL bErase=FALSE)
 
int GetUpdateRgn (HRGN hRgn, BOOL bErase=FALSE)
 
HWND GetWindow (UINT nCmd) const
 
DWORD GetWindowContextHelpId () const
 
HDC GetWindowDC ()
 
LONG GetWindowLong (int nIndex) const
 
LONG_PTR GetWindowLongPtr (int nIndex) const
 
BOOL GetWindowPlacement (WINDOWPLACEMENT *lpwndpl) const
 
DWORD GetWindowProcessID ()
 
BOOL GetWindowRect (LPRECT lpRect) const
 
int GetWindowRgn (HRGN hRgn)
 
int GetWindowText (_Out_writes_to_(nMaxCount, return+1) LPTSTR lpszStringBuf, _In_ int nMaxCount) const
 
BOOL GetWindowText (_Inout_ _Outref_result_maybenull_ _Post_z_ BSTR &bstrText) const
 
int GetWindowTextLength () const
 
DWORD GetWindowThreadID ()
 
WORD GetWindowWord (int nIndex) const
 
void GotoDlgCtrl (HWND hWndCtrl) const
 
BOOL HideCaret ()
 
BOOL HiliteMenuItem (HMENU hMenu, UINT uHiliteItem, UINT uHilite)
 
BOOL Invalidate (BOOL bErase=TRUE)
 
BOOL InvalidateRect (LPCRECT lpRect, BOOL bErase=TRUE)
 
void InvalidateRgn (HRGN hRgn, BOOL bErase=TRUE)
 
BOOL IsChild (const HWND hWnd) const
 
BOOL IsDialogMessage (LPMSG lpMsg)
 
UINT IsDlgButtonChecked (int nIDButton) const
 
BOOL IsIconic () const
 
BOOL IsParentDialog ()
 
BOOL IsWindow () const
 
BOOL IsWindowEnabled () const
 
BOOL IsWindowVisible () const
 
BOOL IsWindowUnicode ()
 
BOOL IsZoomed () const
 
BOOL KillTimer (UINT_PTR nIDEvent)
 
BOOL LockWindowUpdate (BOOL bLock=TRUE)
 
int MapWindowPoints (HWND hWndTo, LPPOINT lpPoint, UINT nCount) const
 
int MapWindowPoints (HWND hWndTo, LPRECT lpRect) const
 
int MessageBox (LPCTSTR lpszText, LPCTSTR lpszCaption=NULL, UINT nType=MB_OK)
 
BOOL ModifyStyle (DWORD dwRemove, DWORD dwAdd, UINT nFlags=0)
 
BOOL ModifyStyleEx (DWORD dwRemove, DWORD dwAdd, UINT nFlags=0)
 
BOOL MoveWindow (int x, int y, int nWidth, int nHeight, BOOL bRepaint=TRUE)
 
void NextDlgCtrl () const
 
BOOL OpenClipboard ()
 
BOOL PostMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
void PrevDlgCtrl () const
 
void Print (HDC hDC, DWORD dwFlags) const
 
void PrintClient (HDC hDC, DWORD dwFlags) const
 
BOOL RedrawWindow (LPCRECT lpRectUpdate=NULL, HRGN hRgnUpdate=NULL, UINT flags=RDW_INVALIDATE|RDW_UPDATENOW|RDW_ERASE)
 
int ReleaseDC (HDC hDC)
 
BOOL ResizeClient (int nWidth, int nHeight, BOOL bRedraw=FALSE)
 
BOOL ScreenToClient (LPPOINT lpPoint) const
 
BOOL ScrollWindow (int xAmount, int yAmount, LPCRECT lpRect=NULL, LPCRECT lpClipRect=NULL)
 
int ScrollWindowEx (int dx, int dy, LPCRECT lpRectScroll, LPCRECT lpRectClip, HRGN hRgnUpdate, LPRECT lpRectUpdate, UINT flags)
 
LRESULT SendDlgItemMessage (int nID, UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
LRESULT SendMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
void SendMessageToDescendants (UINT message, WPARAM wParam=0, LPARAM lParam=0, BOOL bDeep=TRUE)
 
BOOL SendNotifyMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
HWND SetActiveWindow ()
 
HWND SetCapture ()
 
HWND SetClipboardViewer ()
 
int SetDlgCtrlID (int nID)
 
BOOL SetDlgItemInt (int nID, UINT nValue, BOOL bSigned=TRUE)
 
BOOL SetDlgItemText (int nID, LPCTSTR lpszString)
 
HWND SetFocus ()
 
void SetFont (HFONT hFont, BOOL bRedraw=TRUE)
 
int SetHotKey (WORD wVirtualKeyCode, WORD wModifiers)
 
HICON SetIcon (HICON hIcon, BOOL bBigIcon=TRUE)
 
BOOL SetMenu (HMENU hMenu)
 
HWND SetParent (HWND hWndNewParent)
 
void SetRedraw (BOOL bRedraw=TRUE)
 
int SetScrollInfo (int nBar, LPSCROLLINFO lpScrollInfo, BOOL bRedraw=TRUE)
 
int SetScrollPos (int nBar, int nPos, BOOL bRedraw=TRUE)
 
BOOL SetScrollRange (int nBar, int nMinPos, int nMaxPos, BOOL bRedraw=TRUE)
 
UINT_PTR SetTimer (UINT_PTR nIDEvent, UINT nElapse, void(CALLBACK *lpfnTimer)(HWND, UINT, UINT_PTR, DWORD)=NULL)
 
BOOL SetWindowContextHelpId (DWORD dwContextHelpId)
 
LONG SetWindowLong (int nIndex, LONG dwNewLong)
 
LONG_PTR SetWindowLongPtr (int nIndex, LONG_PTR dwNewLong)
 
BOOL SetWindowPlacement (const WINDOWPLACEMENT *lpwndpl)
 
BOOL SetWindowPos (HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags)
 
int SetWindowRgn (HRGN hRgn, BOOL bRedraw=FALSE)
 
BOOL SetWindowText (LPCTSTR lpszString)
 
WORD SetWindowWord (int nIndex, WORD wNewWord)
 
BOOL ShowCaret ()
 
BOOL ShowOwnedPopups (BOOL bShow=TRUE)
 
BOOL ShowScrollBar (UINT nBar, BOOL bShow=TRUE)
 
BOOL ShowWindow (int nCmdShow)
 
BOOL ShowWindowAsync (int nCmdShow)
 
BOOL UpdateWindow ()
 
BOOL ValidateRect (LPCRECT lpRect)
 
BOOL ValidateRgn (HRGN hRgn)
 
BOOL WinHelp (LPCTSTR lpszHelp, UINT nCmd=HELP_CONTEXT, DWORD dwData=0)
 
- Public Member Functions inherited from ATL::CMessageMap
virtual BOOL ProcessWindowMessage (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult, DWORD dwMsgMapID)=0
 
- Public Member Functions inherited from ATL::CComObjectRootEx< CComMultiThreadModelNoCS >
 ~CComObjectRootEx ()
 
ULONG InternalAddRef ()
 
ULONG InternalRelease ()
 
void Lock ()
 
void Unlock ()
 
HRESULT _AtlInitialConstruct ()
 
- Public Member Functions inherited from ATL::CComObjectRootBase
 CComObjectRootBase ()
 
 ~CComObjectRootBase ()
 
void SetVoid (void *)
 
HRESULT _AtlFinalConstruct ()
 
HRESULT FinalConstruct ()
 
void InternalFinalConstructAddRef ()
 
void InternalFinalConstructRelease ()
 
void FinalRelease ()
 
- Public Member Functions inherited from IShellView2
HRESULT HandleRename ([in] PCUITEMID_CHILD new_pidl)
 
HRESULT SelectAndPositionItem ([in] PCUITEMID_CHILD item, [in] UINT flags, [in] POINT *point)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 
- Public Member Functions inherited from IViewObject
HRESULT Draw ([in] DWORD dwDrawAspect, [in] LONG lindex, [in, unique] void *pvAspect, [in, unique] DVTARGETDEVICE *ptd, [in] HDC hdcTargetDev, [in] HDC hdcDraw, [in] LPCRECTL lprcBounds, [in, unique] LPCRECTL lprcWBounds, [in] BOOL(*pfnContinue)(ULONG_PTR dwContinue), [in] ULONG_PTR dwContinue)
 
HRESULT RemoteDraw ([in] DWORD dwDrawAspect, [in] LONG lindex, [in] ULONG_PTR pvAspect, [in, unique] DVTARGETDEVICE *ptd, [in] ULONG_PTR hdcTargetDev, [in] ULONG_PTR hdcDraw, [in] LPCRECTL lprcBounds, [in, unique] LPCRECTL lprcWBounds, [in] IContinue *pContinue)
 
HRESULT RemoteGetColorSet ([in] DWORD dwDrawAspect, [in] LONG lindex, [in] ULONG_PTR pvAspect, [in, unique] DVTARGETDEVICE *ptd, [in] ULONG_PTR hicTargetDev, [out] LOGPALETTE **ppColorSet)
 
HRESULT RemoteFreeze ([in] DWORD dwDrawAspect, [in] LONG lindex, [in] ULONG_PTR pvAspect, [out] DWORD *pdwFreeze)
 
HRESULT RemoteGetAdvise ([out] DWORD *pAspects, [out] DWORD *pAdvf, [out] IAdviseSink **ppAdvSink)
 
- Public Member Functions inherited from IServiceProvider
HRESULT RemoteQueryService ([in] REFGUID guidService, [in] REFIID riid, [out, iid_is(riid)] IUnknown **ppvObject)
 

Static Public Member Functions

static INT CALLBACK ListViewCompareItems (LPARAM lParam1, LPARAM lParam2, LPARAM lpData)
 
static INT CALLBACK fill_list (LPVOID ptr, LPVOID arg)
 
static ATL::CWndClassInfoGetWndClassInfo ()
 
static LRESULT CALLBACK WindowProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
- Static Public Member Functions inherited from ATL::CWindowImpl< CDefView, CWindow, CControlWinTraits >
static LPCTSTR GetWndCaption ()
 
- Static Public Member Functions inherited from ATL::CWindowImplBaseT< CWindow, CControlWinTraits >
static DWORD GetWndStyle (DWORD dwStyle)
 
static DWORD GetWndExStyle (DWORD dwExStyle)
 
static LRESULT CALLBACK StartWindowProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static LRESULT CALLBACK WindowProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
- Static Public Member Functions inherited from ATL::CWindow
static LPCTSTR GetWndClassName ()
 
static LRESULT SendMessage (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 
- Static Public Member Functions inherited from ATL::CComObjectRootBase
static void WINAPI ObjectMain (bool)
 
static const struct _ATL_CATMAP_ENTRYGetCategoryMap ()
 
static HRESULT WINAPI InternalQueryInterface (void *pThis, const _ATL_INTMAP_ENTRY *pEntries, REFIID iid, void **ppvObject)
 

Private Member Functions

HRESULT _MergeToolbar ()
 
BOOL _Sort ()
 
HRESULT _DoFolderViewCB (UINT uMsg, WPARAM wParam, LPARAM lParam)
 
HRESULT _GetSnapToGrid ()
 
void _MoveSelectionOnAutoArrange (POINT pt)
 
INT _FindInsertableIndexFromPoint (POINT pt)
 
void _HandleStatusBarResize (int width)
 
void _ForceStatusBarResize ()
 

Private Attributes

CComPtr< IShellFolderm_pSFParent
 
CComPtr< IShellFolder2m_pSF2Parent
 
CComPtr< IShellFolderViewCB > m_pShellFolderViewCB
 
CComPtr< IShellBrowserm_pShellBrowser
 
CComPtr< ICommDlgBrowserm_pCommDlgBrowser
 
CComPtr< IShellFolderViewDual > m_pShellFolderViewDual
 
CListView m_ListView
 
HWND m_hWndParent
 
FOLDERSETTINGS m_FolderSettings
 
HMENU m_hMenu
 
HMENU m_hMenuArrangeModes
 
HMENU m_hMenuViewModes
 
HMENU m_hContextMenu
 
BOOL m_bmenuBarInitialized
 
UINT m_uState
 
UINT m_cidl
 
PCUITEMID_CHILDm_apidl
 
PIDLIST_ABSOLUTE m_pidlParent
 
LISTVIEW_SORT_INFO m_sortInfo
 
ULONG m_hNotify
 
HACCEL m_hAccel
 
DWORD m_dwAspects
 
DWORD m_dwAdvf
 
CComPtr< IAdviseSinkm_pAdvSink
 
CComPtr< IDataObjectm_pSourceDataObject
 
CComPtr< IDropTargetm_pCurDropTarget
 
CComPtr< IDataObjectm_pCurDataObject
 
LONG m_iDragOverItem
 
UINT m_cScrollDelay
 
POINT m_ptLastMousePos
 
POINT m_ptFirstMousePos
 
DWORD m_grfKeyState
 
CComPtr< IContextMenum_pCM
 
BOOL m_isEditing
 
BOOL m_isParentFolderSpecial
 
CLSID m_Category
 
BOOL m_Destroyed
 
SFVM_CUSTOMVIEWINFO_DATA m_viewinfo_data
 
HICON m_hMyComputerIcon
 

Additional Inherited Members

- Public Types inherited from ATL::CWindowImplRoot< CWindow >
enum  
 
- Public Types inherited from IShellView2
typedef GUID SHELLVIEWID
 
typedef struct IShellView2::_SV2CVW2_PARAMS SV2CVW2_PARAMS
 
typedef struct IShellView2::_SV2CVW2_PARAMSLPSV2CVW2_PARAMS
 
- Public Types inherited from IShellView
enum  SVGIO {
  SVGIO_BACKGROUND = 0x00000000, SVGIO_SELECTION = 0x00000001, SVGIO_ALLVIEW = 0x00000002, SVGIO_CHECKED = 0x00000003,
  SVGIO_TYPE_MASK = 0x0000000f, SVGIO_FLAG_VIEWORDER = 0x80000000
}
 
enum  SVUIA_STATUS { SVUIA_DEACTIVATE = 0, SVUIA_ACTIVATE_NOFOCUS = 1, SVUIA_ACTIVATE_FOCUS = 2, SVUIA_INPLACEACTIVATE = 3 }
 
typedef IShellViewLPSHELLVIEW
 
- Public Types inherited from IOleWindow
typedef IOleWindowLPOLEWINDOW
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Public Types inherited from IOleCommandTarget
enum  OLECMDF {
  OLECMDF_SUPPORTED = 0x1, OLECMDF_ENABLED = 0x2, OLECMDF_LATCHED = 0x4, OLECMDF_NINCHED = 0x8,
  OLECMDF_INVISIBLE = 0x10, OLECMDF_DEFHIDEONCTXTMENU = 0x20
}
 
enum  OLECMDTEXTF { OLECMDTEXTF_NONE = 0, OLECMDTEXTF_NAME = 1, OLECMDTEXTF_STATUS = 2 }
 
enum  OLECMDEXECOPT { OLECMDEXECOPT_DODEFAULT = 0, OLECMDEXECOPT_PROMPTUSER = 1, OLECMDEXECOPT_DONTPROMPTUSER = 2, OLECMDEXECOPT_SHOWHELP = 3 }
 
enum  OLECMDID {
  OLECMDID_OPEN = 1, OLECMDID_NEW = 2, OLECMDID_SAVE = 3, OLECMDID_SAVEAS = 4,
  OLECMDID_SAVECOPYAS = 5, OLECMDID_PRINT = 6, OLECMDID_PRINTPREVIEW = 7, OLECMDID_PAGESETUP = 8,
  OLECMDID_SPELL = 9, OLECMDID_PROPERTIES = 10, OLECMDID_CUT = 11, OLECMDID_COPY = 12,
  OLECMDID_PASTE = 13, OLECMDID_PASTESPECIAL = 14, OLECMDID_UNDO = 15, OLECMDID_REDO = 16,
  OLECMDID_SELECTALL = 17, OLECMDID_CLEARSELECTION = 18, OLECMDID_ZOOM = 19, OLECMDID_GETZOOMRANGE = 20,
  OLECMDID_UPDATECOMMANDS = 21, OLECMDID_REFRESH = 22, OLECMDID_STOP = 23, OLECMDID_HIDETOOLBARS = 24,
  OLECMDID_SETPROGRESSMAX = 25, OLECMDID_SETPROGRESSPOS = 26, OLECMDID_SETPROGRESSTEXT = 27, OLECMDID_SETTITLE = 28,
  OLECMDID_SETDOWNLOADSTATE = 29, OLECMDID_STOPDOWNLOAD = 30, OLECMDID_ONTOOLBARACTIVATED = 31, OLECMDID_FIND = 32,
  OLECMDID_DELETE = 33, OLECMDID_HTTPEQUIV = 34, OLECMDID_HTTPEQUIV_DONE = 35, OLECMDID_ENABLE_INTERACTION = 36,
  OLECMDID_ONUNLOAD = 37, OLECMDID_PROPERTYBAG2 = 38, OLECMDID_PREREFRESH = 39, OLECMDID_SHOWSCRIPTERROR = 40,
  OLECMDID_SHOWMESSAGE = 41, OLECMDID_SHOWFIND = 42, OLECMDID_SHOWPAGESETUP = 43, OLECMDID_SHOWPRINT = 44,
  OLECMDID_CLOSE = 45, OLECMDID_ALLOWUILESSSAVEAS = 46, OLECMDID_DONTDOWNLOADCSS = 47, OLECMDID_UPDATEPAGESTATUS = 48,
  OLECMDID_PRINT2 = 49, OLECMDID_PRINTPREVIEW2 = 50, OLECMDID_SETPRINTTEMPLATE = 51, OLECMDID_GETPRINTTEMPLATE = 52,
  OLECMDID_PAGEACTIONBLOCKED = 55, OLECMDID_PAGEACTIONUIQUERY = 56, OLECMDID_FOCUSVIEWCONTROLS = 57, OLECMDID_FOCUSVIEWCONTROLSQUERY = 58,
  OLECMDID_SHOWPAGEACTIONMENU = 59, OLECMDID_ADDTRAVELENTRY = 60, OLECMDID_UPDATETRAVELENTRY = 61, OLECMDID_UPDATEBACKFORWARDSTATE = 62,
  OLECMDID_OPTICAL_ZOOM = 63, OLECMDID_OPTICAL_GETZOOMRANGE = 64, OLECMDID_WINDOWSTATECHANGED = 65, OLECMDID_ACTIVEXINSTALLSCOPE = 66,
  OLECMDID_UPDATETRAVELENTRY_DATARECOVERY = 67, OLECMDID_SHOWTASKDLG = 68, OLECMDID_POPSTATEEVENT = 69, OLECMDID_VIEWPORT_MODE = 70,
  OLECMDID_LAYOUT_VIEWPORT_WIDTH = 71, OLECMDID_VISUAL_VIEWPORT_EXCLUDE_BOTTOM = 72, OLECMDID_USER_OPTICAL_ZOOM = 73, OLECMDID_PAGEAVAILABLE = 74,
  OLECMDID_GETUSERSCALABLE = 75, OLECMDID_UPDATE_CARET = 76, OLECMDID_ENABLE_VISIBILITY = 77, OLECMDID_MEDIA_PLAYBACK = 78
}
 
typedef IOleCommandTargetLPOLECOMMANDTARGET
 
typedef enum IOleCommandTarget::OLECMDF OLECMDF
 
typedef struct IOleCommandTarget::_tagOLECMD OLECMD
 
typedef struct IOleCommandTarget::_tagOLECMDTEXT OLECMDTEXT
 
typedef enum IOleCommandTarget::OLECMDTEXTF OLECMDTEXTF
 
typedef enum IOleCommandTarget::OLECMDEXECOPT OLECMDEXECOPT
 
typedef enum IOleCommandTarget::OLECMDID OLECMDID
 
- Public Types inherited from IDropTarget
typedef IDropTargetLPDROPTARGET
 
- Public Types inherited from IDropSource
typedef IDropSourceLPDROPSOURCE
 
- Public Types inherited from IViewObject
typedef IViewObjectLPVIEWOBJECT
 
- Public Types inherited from IServiceProvider
typedef IServiceProviderLPSERVICEPROVIDER
 
- Public Attributes inherited from ATL::CWindowImplBaseT< CWindow, CControlWinTraits >
WNDPROC m_pfnSuperWindowProc
 
- Public Attributes inherited from ATL::CWindowImplRoot< CWindow >
CWndProcThunk m_thunk
 
const _ATL_MSGm_pCurrentMsg
 
DWORD m_dwState
 
- Public Attributes inherited from ATL::CWindow
HWND m_hWnd
 
- Public Attributes inherited from ATL::CComObjectRootBase
LONG m_dwRef
 
- Public Attributes inherited from IShellView
SVSI_NOSTATECHANGE typedef UINT SVSIF
 
- Public Attributes inherited from IDropTarget
const DWORD MK_ALT = 0x20
 
const DWORD DROPEFFECT_NONE = 0
 
const DWORD DROPEFFECT_COPY = 1
 
const DWORD DROPEFFECT_MOVE = 2
 
const DWORD DROPEFFECT_LINK = 4
 
const DWORD DROPEFFECT_SCROLL = 0x80000000
 
const DWORD DD_DEFSCROLLINSET = 11
 
const DWORD DD_DEFSCROLLDELAY = 50
 
const DWORD DD_DEFSCROLLINTERVAL = 50
 
const DWORD DD_DEFDRAGDELAY = 200
 
const DWORD DD_DEFDRAGMINDIST = 2
 
- Static Public Attributes inherited from ATL::CWindow
static RECT rcDefault
 

Detailed Description

Definition at line 71 of file CDefView.cpp.

Constructor & Destructor Documentation

◆ CDefView()

CDefView::CDefView ( )

Definition at line 383 of file CDefView.cpp.

383  :
384  m_ListView(),
386  m_hMenu(NULL),
391  m_uState(0),
392  m_cidl(0),
393  m_apidl(NULL),
395  m_hNotify(0),
396  m_hAccel(NULL),
397  m_dwAspects(0),
398  m_dwAdvf(0),
399  m_iDragOverItem(0),
400  m_cScrollDelay(0),
404 {
406  ZeroMemory(&m_sortInfo, sizeof(m_sortInfo));
408  ZeroMemory(&m_Category, sizeof(m_Category));
412 
414 }
HMENU m_hMenuArrangeModes
Definition: CDefView.cpp:94
BOOL m_Destroyed
Definition: CDefView.cpp:124
HACCEL m_hAccel
Definition: CDefView.cpp:104
UINT m_cScrollDelay
Definition: CDefView.cpp:113
BOOL m_isEditing
Definition: CDefView.cpp:120
FOLDERSETTINGS m_FolderSettings
Definition: CDefView.cpp:92
#define ZeroMemory
Definition: winbase.h:1667
HMENU m_hMenu
Definition: CDefView.cpp:93
#define COLOR_WINDOW
Definition: winuser.h:912
DWORD WINAPI GetSysColor(_In_ int)
HICON m_hMyComputerIcon
Definition: CDefView.cpp:127
#define FALSE
Definition: types.h:117
SFVM_CUSTOMVIEWINFO_DATA m_viewinfo_data
Definition: CDefView.cpp:125
BOOL m_isParentFolderSpecial
Definition: CDefView.cpp:121
HMENU m_hContextMenu
Definition: CDefView.cpp:96
PIDLIST_ABSOLUTE m_pidlParent
Definition: CDefView.cpp:101
ULONG m_hNotify
Definition: CDefView.cpp:103
CListView m_ListView
Definition: CDefView.cpp:90
HWND m_hWndParent
Definition: CDefView.cpp:91
UINT m_uState
Definition: CDefView.cpp:98
BOOL m_bmenuBarInitialized
Definition: CDefView.cpp:97
LISTVIEW_SORT_INFO m_sortInfo
Definition: CDefView.cpp:102
#define COLOR_WINDOWTEXT
Definition: winuser.h:915
LONG m_iDragOverItem
Definition: CDefView.cpp:112
POINT m_ptLastMousePos
Definition: CDefView.cpp:114
PCUITEMID_CHILD * m_apidl
Definition: CDefView.cpp:100
DWORD m_dwAdvf
Definition: CDefView.cpp:106
#define shell32_hInstance
#define NULL
Definition: types.h:112
HMENU m_hMenuViewModes
Definition: CDefView.cpp:95
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2044
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
DWORD m_dwAspects
Definition: CDefView.cpp:105
#define IDI_SHELL_COMPUTER_DESKTOP
Definition: shresdef.h:614
UINT m_cidl
Definition: CDefView.cpp:99
CLSID m_Category
Definition: CDefView.cpp:123

◆ ~CDefView()

CDefView::~CDefView ( )

Definition at line 416 of file CDefView.cpp.

417 {
418  TRACE(" destroying IShellView(%p)\n", this);
419 
421 
423  {
426  }
427 
428  if (m_hWnd)
429  {
431  }
432 
433  SHFree(m_apidl);
434 }
virtual HRESULT STDMETHODCALLTYPE DestroyViewWindow()
Definition: CDefView.cpp:2556
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
SFVM_CUSTOMVIEWINFO_DATA m_viewinfo_data
Definition: CDefView.cpp:125
#define TRACE(s)
Definition: solgame.cpp:4
#define SFVM_VIEWRELEASE
HWND m_hWnd
Definition: atlwin.h:267
PCUITEMID_CHILD * m_apidl
Definition: CDefView.cpp:100
#define NULL
Definition: types.h:112
void WINAPI SHFree(LPVOID pv)
Definition: shellole.c:326
HRESULT _DoFolderViewCB(UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: CDefView.cpp:3863

Member Function Documentation

◆ _DoFolderViewCB()

HRESULT CDefView::_DoFolderViewCB ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
private

Definition at line 3863 of file CDefView.cpp.

3864 {
3865  HRESULT hr = E_NOTIMPL;
3866 
3868  {
3869  hr = m_pShellFolderViewCB->MessageSFVCB(uMsg, wParam, lParam);
3870  }
3871 
3872  return hr;
3873 }
HRESULT hr
Definition: shlfolder.c:183
WPARAM wParam
Definition: combotst.c:138
CComPtr< IShellFolderViewCB > m_pShellFolderViewCB
Definition: CDefView.cpp:86
LONG HRESULT
Definition: typedefs.h:79
#define E_NOTIMPL
Definition: ddrawi.h:99
LPARAM lParam
Definition: combotst.c:139

Referenced by CreateList(), CreateViewWindow3(), DestroyViewWindow(), FillList(), LV_AddItem(), OnNotify(), OnSize(), Refresh(), and ~CDefView().

◆ _FindInsertableIndexFromPoint()

INT CDefView::_FindInsertableIndexFromPoint ( POINT  pt)
private

Definition at line 3504 of file CDefView.cpp.

3505 {
3506  RECT rcBound;
3507  INT i, nCount = m_ListView.GetItemCount();
3508  DWORD dwSpacing;
3509  INT dx, dy;
3510  BOOL bSmall = ((m_ListView.GetStyle() & LVS_TYPEMASK) != LVS_ICON);
3511 
3512  /* FIXME: LVM_GETORIGIN is broken. See CORE-17266 */
3513  pt.x += m_ListView.GetScrollPos(SB_HORZ);
3514  pt.y += m_ListView.GetScrollPos(SB_VERT);
3515 
3516  if (m_ListView.GetStyle() & LVS_ALIGNLEFT)
3517  {
3518  // vertically
3519  for (i = 0; i < nCount; ++i)
3520  {
3521  dwSpacing = ListView_GetItemSpacing(m_ListView, bSmall);
3522  dx = LOWORD(dwSpacing);
3523  dy = HIWORD(dwSpacing);
3525  rcBound.right = rcBound.left + dx;
3526  rcBound.bottom = rcBound.top + dy;
3527  if (pt.x < rcBound.right && pt.y < (rcBound.top + rcBound.bottom) / 2)
3528  {
3529  return i;
3530  }
3531  }
3532  for (i = nCount - 1; i >= 0; --i)
3533  {
3535  if (rcBound.left < pt.x && rcBound.top < pt.y)
3536  {
3537  return i + 1;
3538  }
3539  }
3540  }
3541  else
3542  {
3543  // horizontally
3544  for (i = 0; i < nCount; ++i)
3545  {
3546  dwSpacing = ListView_GetItemSpacing(m_ListView, bSmall);
3547  dx = LOWORD(dwSpacing);
3548  dy = HIWORD(dwSpacing);
3550  rcBound.right = rcBound.left + dx;
3551  rcBound.bottom = rcBound.top + dy;
3552  if (pt.y < rcBound.bottom && pt.x < rcBound.left)
3553  {
3554  return i;
3555  }
3556  if (pt.y < rcBound.bottom && pt.x < rcBound.right)
3557  {
3558  return i + 1;
3559  }
3560  }
3561  for (i = nCount - 1; i >= 0; --i)
3562  {
3564  if (rcBound.left < pt.x && rcBound.top < pt.y)
3565  {
3566  return i + 1;
3567  }
3568  }
3569  }
3570 
3571  return nCount;
3572 }
#define SB_VERT
Definition: winuser.h:553
#define pt(x, y)
Definition: drawing.c:79
GLint dy
Definition: linetemp.h:97
#define SB_HORZ
Definition: winuser.h:552
LONG top
Definition: windef.h:307
#define ListView_GetItemRect(hwnd, i, prc, code)
Definition: commctrl.h:2478
LONG left
Definition: windef.h:306
int GetItemCount()
Definition: rosctrls.h:121
LONG right
Definition: windef.h:308
int32_t INT
Definition: typedefs.h:58
unsigned int BOOL
Definition: ntddk_ex.h:94
#define LVS_ALIGNLEFT
Definition: commctrl.h:2280
CListView m_ListView
Definition: CDefView.cpp:90
unsigned long DWORD
Definition: ntddk_ex.h:95
#define LVS_ICON
Definition: commctrl.h:2261
#define LVIR_SELECTBOUNDS
Definition: commctrl.h:2475
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLint dx
Definition: linetemp.h:97
#define HIWORD(l)
Definition: typedefs.h:247
#define LVS_TYPEMASK
Definition: commctrl.h:2265
LONG bottom
Definition: windef.h:309
#define ListView_GetItemSpacing(hwndLV, fSmall)
Definition: commctrl.h:2712
#define LOWORD(l)
Definition: pedump.c:82

Referenced by _MoveSelectionOnAutoArrange().

◆ _ForceStatusBarResize()

void CDefView::_ForceStatusBarResize ( )
private

Definition at line 3600 of file CDefView.cpp.

3601 {
3602  /* Get the handle for the status bar */
3603  HWND fStatusBar;
3604  m_pShellBrowser->GetControlWindow(FCW_STATUS, &fStatusBar);
3605 
3606  /* Get the size of our status bar */
3607  RECT statusBarSize;
3608  ::GetWindowRect(fStatusBar, &statusBarSize);
3609 
3610  /* Resize the status bar */
3611  _HandleStatusBarResize(statusBarSize.right - statusBarSize.left);
3612 }
LONG left
Definition: windef.h:306
void _HandleStatusBarResize(int width)
Definition: CDefView.cpp:3574
LONG right
Definition: windef.h:308
BOOL GetWindowRect(LPRECT lpRect) const
Definition: atlwin.h:782
CComPtr< IShellBrowser > m_pShellBrowser
Definition: CDefView.cpp:87

Referenced by OnCreate(), and UIActivate().

◆ _GetSnapToGrid()

HRESULT CDefView::_GetSnapToGrid ( )
private

Definition at line 2881 of file CDefView.cpp.

2882 {
2883  DWORD dwExStyle = (DWORD)m_ListView.SendMessage(LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
2884  return ((dwExStyle & LVS_EX_SNAPTOGRID) ? S_OK : S_FALSE);
2885 }
#define DWORD
Definition: nt_native.h:44
#define LVS_EX_SNAPTOGRID
Definition: commctrl.h:2748
#define S_FALSE
Definition: winerror.h:2357
CListView m_ListView
Definition: CDefView.cpp:90
unsigned long DWORD
Definition: ntddk_ex.h:95
#define LVM_GETEXTENDEDLISTVIEWSTYLE
Definition: commctrl.h:2727
#define S_OK
Definition: intsafe.h:52

Referenced by FillArrangeAsMenu(), and OnCommand().

◆ _HandleStatusBarResize()

void CDefView::_HandleStatusBarResize ( int  width)
private

Definition at line 3574 of file CDefView.cpp.

3575 {
3576  LRESULT lResult;
3577 
3579  {
3580  int nPartArray[] = {-1};
3581  m_pShellBrowser->SendControlMsg(FCW_STATUS, SB_SETPARTS, _countof(nPartArray), (LPARAM)nPartArray, &lResult);
3582  return;
3583  }
3584 
3585  int nFileSizePartLength = 125;
3586  const int nLocationPartLength = 150;
3587  const int nRightPartsLength = nFileSizePartLength + nLocationPartLength;
3588  int nObjectsPartLength = nWidth - nRightPartsLength;
3589 
3590  /* If the window is small enough just divide each part into thirds
3591  * This is the behavior of Windows Server 2003. */
3592  if (nObjectsPartLength <= nLocationPartLength)
3593  nObjectsPartLength = nFileSizePartLength = nWidth / 3;
3594 
3595  int nPartArray[] = {nObjectsPartLength, nObjectsPartLength + nFileSizePartLength, -1};
3596 
3597  m_pShellBrowser->SendControlMsg(FCW_STATUS, SB_SETPARTS, _countof(nPartArray), (LPARAM)nPartArray, &lResult);
3598 }
BOOL m_isParentFolderSpecial
Definition: CDefView.cpp:121
LONG_PTR LPARAM
Definition: windef.h:208
#define _countof(array)
Definition: sndvol32.h:68
#define SB_SETPARTS
Definition: commctrl.h:1954
CComPtr< IShellBrowser > m_pShellBrowser
Definition: CDefView.cpp:87
LONG_PTR LRESULT
Definition: windef.h:209

Referenced by _ForceStatusBarResize(), and OnSize().

◆ _MergeToolbar()

HRESULT CDefView::_MergeToolbar ( )
private

Definition at line 3836 of file CDefView.cpp.

3837 {
3839  HRESULT hr = S_OK;
3840 
3841  hr = IUnknown_QueryService(m_pShellBrowser, IID_IExplorerToolbar, IID_PPV_ARG(IExplorerToolbar, &ptb));
3842  if (FAILED(hr))
3843  return hr;
3844 
3845  m_Category = CGID_DefViewFrame;
3846 
3847  hr = ptb->SetCommandTarget(static_cast<IOleCommandTarget*>(this), &m_Category, 0);
3848  if (FAILED(hr))
3849  return hr;
3850 
3851  if (hr == S_FALSE)
3852  return S_OK;
3853 
3854 #if 0
3855  hr = ptb->AddButtons(&m_Category, buttonsCount, buttons);
3856  if (FAILED(hr))
3857  return hr;
3858 #endif
3859 
3860  return S_OK;
3861 }
HRESULT hr
Definition: shlfolder.c:183
#define IID_PPV_ARG(Itype, ppType)
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1494
#define S_FALSE
Definition: winerror.h:2357
LONG HRESULT
Definition: typedefs.h:79
#define S_OK
Definition: intsafe.h:52
HWND buttons[5]
Definition: sndrec32.cpp:40
CComPtr< IShellBrowser > m_pShellBrowser
Definition: CDefView.cpp:87
CLSID m_Category
Definition: CDefView.cpp:123

Referenced by CreateViewWindow3().

◆ _MoveSelectionOnAutoArrange()

void CDefView::_MoveSelectionOnAutoArrange ( POINT  pt)
private

Definition at line 3628 of file CDefView.cpp.

3629 {
3630  // get insertable index from position
3631  INT iPosition = _FindInsertableIndexFromPoint(pt);
3632 
3633  // create identity mapping of indexes
3635  INT nCount = m_ListView.GetItemCount();
3636  for (INT i = 0; i < nCount; ++i)
3637  {
3638  array.Add(i);
3639  }
3640 
3641  // re-ordering mapping
3642  INT iItem = -1;
3643  while ((iItem = m_ListView.GetNextItem(iItem, LVNI_SELECTED)) >= 0)
3644  {
3645  INT iFrom = iItem, iTo = iPosition;
3646  if (iFrom < iTo)
3647  --iTo;
3648  if (iFrom >= nCount)
3649  iFrom = nCount - 1;
3650  if (iTo >= nCount)
3651  iTo = nCount - 1;
3652 
3653  // shift indexes by swapping (like a bucket relay)
3654  if (iFrom < iTo)
3655  {
3656  for (INT i = iFrom; i < iTo; ++i)
3657  {
3658  // swap array[i] and array[i + 1]
3659  INT tmp = array[i];
3660  array[i] = array[i + 1];
3661  array[i + 1] = tmp;
3662  }
3663  }
3664  else
3665  {
3666  for (INT i = iFrom; i > iTo; --i)
3667  {
3668  // swap array[i] and array[i - 1]
3669  INT tmp = array[i];
3670  array[i] = array[i - 1];
3671  array[i - 1] = tmp;
3672  }
3673  }
3674  }
3675 
3676  // create mapping (ListView's lParam to index) from array
3678  for (INT i = 0; i < nCount; ++i)
3679  {
3681  map.Add(lParam, i);
3682  }
3683 
3684  // finally sort
3686 }
DWORD_PTR GetItemData(int i)
Definition: rosctrls.h:204
#define pt(x, y)
Definition: drawing.c:79
int GetNextItem(int i, WORD flags)
Definition: rosctrls.h:161
#define LVNI_SELECTED
Definition: commctrl.h:2424
int GetItemCount()
Definition: rosctrls.h:121
int32_t INT
Definition: typedefs.h:58
static INT CALLBACK SelectionMoveCompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
Definition: CDefView.cpp:3617
LONG_PTR LPARAM
Definition: windef.h:208
CListView m_ListView
Definition: CDefView.cpp:90
INT _FindInsertableIndexFromPoint(POINT pt)
Definition: CDefView.cpp:3504
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
LPARAM lParam
Definition: combotst.c:139
BOOL SortItems(PFNLVCOMPARE pfnCompare, PVOID lParam)
Definition: rosctrls.h:141
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint GLenum GLenum GLenum GLint GLuint GLenum GLenum GLfloat GLenum GLfloat GLenum GLint const GLfloat GLenum GLint const GLushort GLint GLint GLsizei GLsizei GLenum GLsizei GLsizei GLenum GLenum const GLvoid GLenum GLdouble GLenum GLint GLenum GLenum GLint GLenum GLenum GLfloat GLenum GLenum GLfloat GLenum GLfloat GLenum GLushort const GLubyte GLenum GLenum GLenum GLint GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLvoid GLenum GLenum GLint GLenum GLint GLenum GLint GLuint GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble const GLfloat GLenum const GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble GLint GLint GLsizei GLsizei GLenum GLuint GLenum array
Definition: glfuncs.h:320
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint GLenum GLenum GLenum GLint GLuint GLenum GLenum GLfloat GLenum GLfloat GLenum map
Definition: glfuncs.h:262

Referenced by Drop().

◆ _PidlByItem() [1/2]

PCUITEMID_CHILD CDefView::_PidlByItem ( int  i)

Definition at line 840 of file CDefView.cpp.

841 {
842  return reinterpret_cast<PCUITEMID_CHILD>(m_ListView.GetItemData(i));
843 }
DWORD_PTR GetItemData(int i)
Definition: rosctrls.h:204
CListView m_ListView
Definition: CDefView.cpp:90
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248

Referenced by drag_notify_subitem(), GetSelections(), Item(), LV_FindItemByPidl(), OnNotify(), and UpdateStatusbar().

◆ _PidlByItem() [2/2]

PCUITEMID_CHILD CDefView::_PidlByItem ( LVITEM lvItem)

Definition at line 845 of file CDefView.cpp.

846 {
847  return reinterpret_cast<PCUITEMID_CHILD>(lvItem.lParam);
848 }

◆ _Sort()

BOOL CDefView::_Sort ( )
private

Definition at line 806 of file CDefView.cpp.

807 {
808  HWND hHeader;
809  HDITEM hColumn;
810 
811  if (m_ListView.GetWindowLongPtr(GWL_STYLE) & LVS_NOSORTHEADER)
812  return TRUE;
813 
814  hHeader = (HWND)m_ListView.SendMessage(LVM_GETHEADER, 0, 0);
815  ZeroMemory(&hColumn, sizeof(hColumn));
816 
817  /* If the sorting column changed, remove the sorting style from the old column */
818  if ( (m_sortInfo.nLastHeaderID != -1) &&
820  {
821  hColumn.mask = HDI_FORMAT;
822  Header_GetItem(hHeader, m_sortInfo.nLastHeaderID, &hColumn);
823  hColumn.fmt &= ~(HDF_SORTUP | HDF_SORTDOWN);
824  Header_SetItem(hHeader, m_sortInfo.nLastHeaderID, &hColumn);
825  }
826 
827  /* Set the sorting style to the new column */
828  hColumn.mask = HDI_FORMAT;
829  Header_GetItem(hHeader, m_sortInfo.nHeaderID, &hColumn);
830 
831  hColumn.fmt &= (m_sortInfo.bIsAscending ? ~HDF_SORTDOWN : ~HDF_SORTUP );
832  hColumn.fmt |= (m_sortInfo.bIsAscending ? HDF_SORTUP : HDF_SORTDOWN);
833  Header_SetItem(hHeader, m_sortInfo.nHeaderID, &hColumn);
834 
835  /* Sort the list, using the current values of nHeaderID and bIsAscending */
838 }
#define TRUE
Definition: types.h:120
static INT CALLBACK ListViewCompareItems(LPARAM lParam1, LPARAM lParam2, LPARAM lpData)
Definition: CDefView.cpp:790
HANDLE HWND
Definition: compat.h:19
#define ZeroMemory
Definition: winbase.h:1667
#define HDF_SORTUP
Definition: commctrl.h:724
#define HDITEM
Definition: commctrl.h:697
#define HDI_FORMAT
Definition: commctrl.h:705
#define Header_GetItem(hwndHD, i, phdi)
Definition: commctrl.h:751
CListView m_ListView
Definition: CDefView.cpp:90
LISTVIEW_SORT_INFO m_sortInfo
Definition: CDefView.cpp:102
#define HDF_SORTDOWN
Definition: commctrl.h:725
#define GWL_STYLE
Definition: winuser.h:846
#define LVM_GETHEADER
Definition: commctrl.h:2650
#define LVS_NOSORTHEADER
Definition: commctrl.h:2285
#define Header_SetItem(hwndHD, i, phdi)
Definition: commctrl.h:758
BOOL SortItems(PFNLVCOMPARE pfnCompare, PVOID lParam)
Definition: rosctrls.h:141

Referenced by FillList(), OnCommand(), and OnNotify().

◆ AddObject()

HRESULT STDMETHODCALLTYPE CDefView::AddObject ( PITEMID_CHILD  pidl,
UINT item 
)
virtual

Definition at line 3074 of file CDefView.cpp.

3075 {
3076  TRACE("(%p)->(%p %p)\n", this, pidl, item);
3077  *item = LV_AddItem(pidl);
3078  return (int)*item >= 0 ? S_OK : E_OUTOFMEMORY;
3079 }
int LV_AddItem(PCUITEMID_CHILD pidl)
Definition: CDefView.cpp:869
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:52
static ATOM item
Definition: dde.c:856

◆ AddPropertySheetPages()

HRESULT WINAPI CDefView::AddPropertySheetPages ( DWORD  dwReserved,
LPFNSVADDPROPSHEETPAGE  pfn,
LPARAM  lparam 
)
virtual

Implements IShellView.

Definition at line 2616 of file CDefView.cpp.

2617 {
2618  FIXME("(%p) stub\n", this);
2619 
2620  return E_NOTIMPL;
2621 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ArrangeGrid()

HRESULT STDMETHODCALLTYPE CDefView::ArrangeGrid ( )
virtual

Definition at line 3061 of file CDefView.cpp.

3062 {
3064  return S_OK;
3065 }
DWORD SetExtendedListViewStyle(DWORD dw, DWORD dwMask=0)
Definition: rosctrls.h:47
#define LVS_EX_SNAPTOGRID
Definition: commctrl.h:2748
CListView m_ListView
Definition: CDefView.cpp:90
#define S_OK
Definition: intsafe.h:52

Referenced by OnCommand().

◆ AutoArrange()

HRESULT STDMETHODCALLTYPE CDefView::AutoArrange ( )
virtual

Definition at line 3067 of file CDefView.cpp.

3068 {
3069  m_ListView.ModifyStyle(0, LVS_AUTOARRANGE);
3071  return S_OK;
3072 }
BOOL Arrange(UINT nCode)
Definition: rosctrls.h:241
#define LVS_AUTOARRANGE
Definition: commctrl.h:2272
CListView m_ListView
Definition: CDefView.cpp:90
#define S_OK
Definition: intsafe.h:52
#define LVA_DEFAULT
Definition: commctrl.h:2527

Referenced by OnCommand().

◆ CheckToolbar()

void CDefView::CheckToolbar ( )

Definition at line 495 of file CDefView.cpp.

496 {
497  LRESULT result;
498 
499  TRACE("\n");
500 
501  if (m_pCommDlgBrowser != NULL)
502  {
503  m_pShellBrowser->SendControlMsg(FCW_TOOLBAR, TB_CHECKBUTTON,
505  m_pShellBrowser->SendControlMsg(FCW_TOOLBAR, TB_CHECKBUTTON,
507  m_pShellBrowser->SendControlMsg(FCW_TOOLBAR, TB_ENABLEBUTTON,
509  m_pShellBrowser->SendControlMsg(FCW_TOOLBAR, TB_ENABLEBUTTON,
511  }
512 }
#define FCIDM_TB_REPORTVIEW
Definition: shresdef.h:827
GLuint64EXT * result
Definition: glext.h:11304
FOLDERSETTINGS m_FolderSettings
Definition: CDefView.cpp:92
#define TRUE
Definition: types.h:120
CComPtr< ICommDlgBrowser > m_pCommDlgBrowser
Definition: CDefView.cpp:88
#define FALSE
Definition: types.h:117
#define TB_ENABLEBUTTON
Definition: commctrl.h:1042
#define TRACE(s)
Definition: solgame.cpp:4
#define TB_CHECKBUTTON
Definition: commctrl.h:1043
#define FCIDM_TB_SMALLICON
Definition: shresdef.h:826
#define NULL
Definition: types.h:112
CComPtr< IShellBrowser > m_pShellBrowser
Definition: CDefView.cpp:87
LONG_PTR LRESULT
Definition: windef.h:209

Referenced by CreateViewWindow3(), and OnCommand().

◆ CheckViewMode()

HRESULT CDefView::CheckViewMode ( HMENU  hmenuView)

Definition at line 1417 of file CDefView.cpp.

1418 {
1420  {
1421  UINT iItemFirst = FCIDM_SHVIEW_BIGICON;
1422  UINT iItemLast = iItemFirst + FVM_LAST - FVM_FIRST;
1423  UINT iItem = iItemFirst + m_FolderSettings.ViewMode - FVM_FIRST;
1424  CheckMenuRadioItem(hmenuView, iItemFirst, iItemLast, iItem, MF_BYCOMMAND);
1425  }
1426 
1427  return S_OK;
1428 }
#define MF_BYCOMMAND
Definition: winuser.h:202
FOLDERSETTINGS m_FolderSettings
Definition: CDefView.cpp:92
BOOL WINAPI CheckMenuRadioItem(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT, _In_ UINT)
#define FCIDM_SHVIEW_BIGICON
Definition: shresdef.h:805
#define S_OK
Definition: intsafe.h:52
unsigned int UINT
Definition: ndis.h:50

Referenced by Exec(), and OnInitMenuPopup().

◆ ContextSensitiveHelp()

HRESULT WINAPI CDefView::ContextSensitiveHelp ( BOOL  fEnterMode)
virtual

Implements IOleWindow.

Definition at line 2477 of file CDefView.cpp.

2478 {
2479  FIXME("(%p) stub\n", this);
2480 
2481  return E_NOTIMPL;
2482 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ CreateList()

BOOL CDefView::CreateList ( )

Definition at line 597 of file CDefView.cpp.

598 {
599  HRESULT hr;
600  DWORD dwStyle, dwExStyle;
601  UINT ViewMode;
602 
603  TRACE("%p\n", this);
604 
607  dwExStyle = WS_EX_CLIENTEDGE;
608 
610  dwStyle |= LVS_ALIGNLEFT;
611  else
612  dwStyle |= LVS_ALIGNTOP | LVS_SHOWSELALWAYS;
613 
614  ViewMode = m_FolderSettings.ViewMode;
615  hr = _DoFolderViewCB(SFVM_DEFVIEWMODE, 0, (LPARAM)&ViewMode);
616  if (SUCCEEDED(hr))
617  {
618  if (ViewMode >= FVM_FIRST && ViewMode <= FVM_LAST)
619  m_FolderSettings.ViewMode = ViewMode;
620  else
621  ERR("Ignoring invalid ViewMode from SFVM_DEFVIEWMODE: %u (was: %u)\n", ViewMode, m_FolderSettings.ViewMode);
622  }
623 
624  switch (m_FolderSettings.ViewMode)
625  {
626  case FVM_ICON:
627  dwStyle |= LVS_ICON;
628  break;
629 
630  case FVM_DETAILS:
631  dwStyle |= LVS_REPORT;
632  break;
633 
634  case FVM_SMALLICON:
635  dwStyle |= LVS_SMALLICON;
636  break;
637 
638  case FVM_LIST:
639  dwStyle |= LVS_LIST;
640  break;
641 
642  default:
643  dwStyle |= LVS_LIST;
644  break;
645  }
646 
648  dwStyle |= LVS_AUTOARRANGE;
649 
651  dwExStyle |= LVS_EX_SNAPTOGRID;
652 
655 
657  dwStyle |= LVS_SINGLESEL;
658 
660  dwExStyle &= ~WS_EX_CLIENTEDGE;
661 
662  RECT rcListView = {0,0,0,0};
663  m_ListView.Create(m_hWnd, rcListView, L"FolderView", dwStyle, dwExStyle, ID_LISTVIEW);
664 
665  if (!m_ListView)
666  return FALSE;
667 
669  m_sortInfo.nHeaderID = -1;
671 
672  /* UpdateShellSettings(); */
673  return TRUE;
674 }
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
HRESULT hr
Definition: shlfolder.c:183
#define LVS_SHOWSELALWAYS
Definition: commctrl.h:2267
FOLDERSETTINGS m_FolderSettings
Definition: CDefView.cpp:92
#define TRUE
Definition: types.h:120
#define LVS_REPORT
Definition: commctrl.h:2262
#define WS_CLIPCHILDREN
Definition: pedump.c:619
HWND Create(HWND hWndParent, _U_RECT rect, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
Definition: rosctrls.h:8
#define LVS_SHAREIMAGELISTS
Definition: commctrl.h:2270
#define L(x)
Definition: ntvdm.h:50
#define FALSE
Definition: types.h:117
#define LVS_EX_SNAPTOGRID
Definition: commctrl.h:2748
if SUCCEEDED(hr)
#define LVS_ALIGNLEFT
Definition: commctrl.h:2280
LONG_PTR LPARAM
Definition: windef.h:208
#define LVS_AUTOARRANGE
Definition: commctrl.h:2272
CListView m_ListView
Definition: CDefView.cpp:90
#define LVS_LIST
Definition: commctrl.h:2264
#define WS_CHILDWINDOW
Definition: pedump.c:639
#define TRACE(s)
Definition: solgame.cpp:4
LISTVIEW_SORT_INFO m_sortInfo
Definition: CDefView.cpp:102
LONG HRESULT
Definition: typedefs.h:79
#define LVS_SINGLESEL
Definition: commctrl.h:2266
unsigned long DWORD
Definition: ntddk_ex.h:95
#define LVS_ICON
Definition: commctrl.h:2261
#define SFVM_DEFVIEWMODE
Definition: shlobj.h:1245
HWND m_hWnd
Definition: atlwin.h:267
#define WS_TABSTOP
Definition: pedump.c:634
#define ERR(fmt,...)
Definition: debug.h:110
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
#define LVS_EDITLABELS
Definition: commctrl.h:2273
unsigned int UINT
Definition: ndis.h:50
#define WS_VISIBLE
Definition: pedump.c:620
#define ID_LISTVIEW
Definition: CDefView.cpp:374
#define LVS_SMALLICON
Definition: commctrl.h:2263
HRESULT _DoFolderViewCB(UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: CDefView.cpp:3863
#define LVS_ALIGNTOP
Definition: commctrl.h:2279

Referenced by OnCreate().

◆ CreateViewWindow()

HRESULT WINAPI CDefView::CreateViewWindow ( IShellView psvPrevious,
LPCFOLDERSETTINGS  pfs,
IShellBrowser psb,
RECT prcView,
HWND phWnd 
)
virtual

Implements IShellView.

Definition at line 2550 of file CDefView.cpp.

2551 {
2552  return CreateViewWindow3(psb, lpPrevView, SV3CVW3_DEFAULT,
2553  (FOLDERFLAGS)lpfs->fFlags, (FOLDERFLAGS)lpfs->fFlags, (FOLDERVIEWMODE)lpfs->ViewMode, NULL, prcView, phWnd);
2554 }
FOLDERVIEWMODE
Definition: shobjidl.idl:665
FOLDERFLAGS
Definition: shobjidl.idl:629
#define NULL
Definition: types.h:112
virtual HRESULT STDMETHODCALLTYPE CreateViewWindow3(IShellBrowser *psb, IShellView *psvPrevious, SV3CVW3_FLAGS view_flags, FOLDERFLAGS mask, FOLDERFLAGS flags, FOLDERVIEWMODE mode, const SHELLVIEWID *view_id, RECT *prcView, HWND *hwnd)
Definition: CDefView.cpp:2954

◆ CreateViewWindow2()

HRESULT STDMETHODCALLTYPE CDefView::CreateViewWindow2 ( LPSV2CVW2_PARAMS  view_params)
virtual

Implements IShellView2.

Definition at line 2947 of file CDefView.cpp.

2948 {
2949  return CreateViewWindow3(view_params->psbOwner, view_params->psvPrev,
2950  SV3CVW3_DEFAULT, (FOLDERFLAGS)view_params->pfs->fFlags, (FOLDERFLAGS)view_params->pfs->fFlags,
2951  (FOLDERVIEWMODE)view_params->pfs->ViewMode, view_params->pvid, view_params->prcView, &view_params->hwndView);
2952 }
FOLDERVIEWMODE
Definition: shobjidl.idl:665
FOLDERFLAGS
Definition: shobjidl.idl:629
virtual HRESULT STDMETHODCALLTYPE CreateViewWindow3(IShellBrowser *psb, IShellView *psvPrevious, SV3CVW3_FLAGS view_flags, FOLDERFLAGS mask, FOLDERFLAGS flags, FOLDERVIEWMODE mode, const SHELLVIEWID *view_id, RECT *prcView, HWND *hwnd)
Definition: CDefView.cpp:2954

◆ CreateViewWindow3()

HRESULT STDMETHODCALLTYPE CDefView::CreateViewWindow3 ( IShellBrowser psb,
IShellView psvPrevious,
SV3CVW3_FLAGS  view_flags,
FOLDERFLAGS  mask,
FOLDERFLAGS  flags,
FOLDERVIEWMODE  mode,
const SHELLVIEWID view_id,
RECT prcView,
HWND hwnd 
)
virtual

Definition at line 2954 of file CDefView.cpp.

2955 {
2956  OLEMENUGROUPWIDTHS omw = { { 0, 0, 0, 0, 0, 0 } };
2957 
2958  *hwnd = NULL;
2959 
2960  TRACE("(%p)->(shlview=%p shlbrs=%p rec=%p hwnd=%p vmode=%x flags=%x)\n", this, psvPrevious, psb, prcView, hwnd, mode, flags);
2961  if (prcView != NULL)
2962  TRACE("-- left=%i top=%i right=%i bottom=%i\n", prcView->left, prcView->top, prcView->right, prcView->bottom);
2963 
2964  /* Validate the Shell Browser */
2965  if (psb == NULL || m_hWnd)
2966  return E_UNEXPECTED;
2967 
2968  if (view_flags != SV3CVW3_DEFAULT)
2969  FIXME("unsupported view flags 0x%08x\n", view_flags);
2970 
2971  /* Set up the member variables */
2972  m_pShellBrowser = psb;
2975 
2976  if (view_id)
2977  {
2978  if (IsEqualIID(*view_id, VID_LargeIcons))
2980  else if (IsEqualIID(*view_id, VID_SmallIcons))
2982  else if (IsEqualIID(*view_id, VID_List))
2984  else if (IsEqualIID(*view_id, VID_Details))
2986  else if (IsEqualIID(*view_id, VID_Thumbnails))
2988  else if (IsEqualIID(*view_id, VID_Tile))
2990  else if (IsEqualIID(*view_id, VID_ThumbStrip))
2992  else
2993  FIXME("Ignoring unrecognized VID %s\n", debugstr_guid(view_id));
2994  }
2995 
2996  /* Get our parent window */
2997  m_pShellBrowser->GetWindow(&m_hWndParent);
2998 
2999  /* Try to get the ICommDlgBrowserInterface, adds a reference !!! */
3002  {
3003  TRACE("-- CommDlgBrowser\n");
3004  }
3005 
3007  if (m_hWnd == NULL)
3008  return E_FAIL;
3009 
3010  *hwnd = m_hWnd;
3011 
3012  CheckToolbar();
3013 
3014  if (!*hwnd)
3015  return E_FAIL;
3016 
3018 
3020  UpdateWindow();
3021 
3022  if (!m_hMenu)
3023  {
3024  m_hMenu = CreateMenu();
3025  m_pShellBrowser->InsertMenusSB(m_hMenu, &omw);
3026  TRACE("-- after fnInsertMenusSB\n");
3027  }
3028 
3029  _MergeToolbar();
3030 
3031  return S_OK;
3032 }
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
HMENU WINAPI CreateMenu(void)
Definition: menu.c:837
FOLDERSETTINGS m_FolderSettings
Definition: CDefView.cpp:92
HWND Create(HWND hWndParent, _U_RECT rect=NULL, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
Definition: atlwin.h:1700
#define U(x)
Definition: wordpad.c:45
CComPtr< ICommDlgBrowser > m_pCommDlgBrowser
Definition: CDefView.cpp:88
BOOL SetWindowPos(HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags)
Definition: atlwin.h:1254
LONG top
Definition: windef.h:307
#define HWND_TOP
Definition: winuser.h:1197
UINT_PTR WPARAM
Definition: windef.h:207
#define WS_CHILD
Definition: pedump.c:617
HMENU m_hMenu
Definition: CDefView.cpp:93
LONG left
Definition: windef.h:306
#define WS_CLIPCHILDREN
Definition: pedump.c:619
LONG right
Definition: windef.h:308
#define IID_PPV_ARG(Itype, ppType)
#define E_FAIL
Definition: ddrawi.h:102
GLenum GLint GLuint mask
Definition: glext.h:6028
if SUCCEEDED(hr)
#define FIXME(fmt,...)
Definition: debug.h:111
HRESULT _MergeToolbar()
Definition: CDefView.cpp:3836
#define debugstr_guid
Definition: kernel32.h:35
HWND m_hWndParent
Definition: CDefView.cpp:91
#define TRACE(s)
Definition: solgame.cpp:4
#define SFVM_WINDOWCREATED
Definition: shlobj.h:1235
BOOL UpdateWindow()
Definition: atlwin.h:1311
void CheckToolbar()
Definition: CDefView.cpp:495
GLbitfield flags
Definition: glext.h:7161
HWND m_hWnd
Definition: atlwin.h:267
#define WS_TABSTOP
Definition: pedump.c:634
GLenum mode
Definition: glext.h:6217
#define SWP_NOSIZE
Definition: winuser.h:1235
#define S_OK
Definition: intsafe.h:52
#define NULL
Definition: types.h:112
#define SWP_SHOWWINDOW
Definition: winuser.h:1238
#define E_UNEXPECTED
Definition: winerror.h:2456
CComPtr< IShellBrowser > m_pShellBrowser
Definition: CDefView.cpp:87
LONG bottom
Definition: windef.h:309
#define SWP_NOMOVE
Definition: winuser.h:1234
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4022
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
HRESULT _DoFolderViewCB(UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: CDefView.cpp:3863

Referenced by CreateViewWindow(), and CreateViewWindow2().

◆ DestroyViewWindow()

HRESULT WINAPI CDefView::DestroyViewWindow ( )
virtual

Implements IShellView.

Definition at line 2556 of file CDefView.cpp.

2557 {
2558  TRACE("(%p)\n", this);
2559 
2560  /* Make absolutely sure all our UI is cleaned up */
2562 
2563  if (m_hAccel)
2564  {
2565  // "Accelerator tables loaded from resources are freed automatically when the application terminates." -- MSDN
2566  m_hAccel = NULL;
2567  }
2568 
2569  if (m_hMenuArrangeModes)
2570  {
2573  }
2574 
2575  if (m_hMenuViewModes)
2576  {
2579  }
2580 
2581  if (m_hMenu)
2582  {
2584  m_hMenu = NULL;
2585  }
2586 
2587  if (m_ListView)
2588  {
2589  m_ListView.DestroyWindow();
2590  }
2591 
2592  if (m_hWnd)
2593  {
2595  DestroyWindow();
2596  }
2597 
2600 
2601  return S_OK;
2602 }
HMENU m_hMenuArrangeModes
Definition: CDefView.cpp:94
HACCEL m_hAccel
Definition: CDefView.cpp:104
CComPtr< ICommDlgBrowser > m_pCommDlgBrowser
Definition: CDefView.cpp:88
UINT_PTR WPARAM
Definition: windef.h:207
HMENU m_hMenu
Definition: CDefView.cpp:93
#define SFVM_WINDOWCLOSING
virtual HRESULT STDMETHODCALLTYPE UIActivate(UINT uState)
Definition: CDefView.cpp:2513
CListView m_ListView
Definition: CDefView.cpp:90
#define TRACE(s)
Definition: solgame.cpp:4
HWND m_hWnd
Definition: atlwin.h:267
BOOL DestroyWindow()
Definition: atlwin.h:428
BOOL WINAPI DestroyMenu(_In_ HMENU)
#define S_OK
Definition: intsafe.h:52
void Release()
Definition: atlcomcli.h:140
#define NULL
Definition: types.h:112
HMENU m_hMenuViewModes
Definition: CDefView.cpp:95
CComPtr< IShellBrowser > m_pShellBrowser
Definition: CDefView.cpp:87
HRESULT _DoFolderViewCB(UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: CDefView.cpp:3863

Referenced by ~CDefView().

◆ DoActivate()

void CDefView::DoActivate ( UINT  uState)

Definition at line 1749 of file CDefView.cpp.

1750 {
1751  TRACE("%p uState=%x\n", this, uState);
1752 
1753  /*don't do anything if the state isn't really changing */
1754  if (m_uState == uState)
1755  {
1756  return;
1757  }
1758 
1759  if (uState == SVUIA_DEACTIVATE)
1760  {
1761  OnDeactivate();
1762  }
1763  else
1764  {
1766  {
1767  FillEditMenu();
1768  FillViewMenu();
1769  m_pShellBrowser->SetMenuSB(m_hMenu, 0, m_hWnd);
1771  }
1772 
1773  if (SVUIA_ACTIVATE_FOCUS == uState)
1774  {
1775  m_ListView.SetFocus();
1776  }
1777  }
1778 
1779  m_uState = uState;
1780  TRACE("--\n");
1781 }
HRESULT FillViewMenu()
Definition: CDefView.cpp:1361
HRESULT FillEditMenu()
Definition: CDefView.cpp:1344
#define TRUE
Definition: types.h:120
HMENU m_hMenu
Definition: CDefView.cpp:93
CListView m_ListView
Definition: CDefView.cpp:90
#define TRACE(s)
Definition: solgame.cpp:4
UINT m_uState
Definition: CDefView.cpp:98
BOOL m_bmenuBarInitialized
Definition: CDefView.cpp:97
HWND m_hWnd
Definition: atlwin.h:267
CComPtr< IShellBrowser > m_pShellBrowser
Definition: CDefView.cpp:87
void OnDeactivate()
Definition: CDefView.cpp:1737

Referenced by OnActivate(), OnKillFocus(), OnSetFocus(), and UIActivate().

◆ drag_notify_subitem()

HRESULT CDefView::drag_notify_subitem ( DWORD  grfKeyState,
POINTL  pt,
DWORD pdwEffect 
)

Definition at line 3342 of file CDefView.cpp.

3343 {
3344  LONG lResult;
3345  HRESULT hr;
3346  RECT clientRect;
3347 
3348  /* The key state on drop doesn't have MK_LBUTTON or MK_RBUTTON because it
3349  reflects the key state after the user released the button, so we need
3350  to remember the last key state when the button was pressed */
3351  m_grfKeyState = grfKeyState;
3352 
3353  /* Map from global to client coordinates and query the index of the listview-item, which is
3354  * currently under the mouse cursor. */
3355  LVHITTESTINFO htinfo = {{pt.x, pt.y}, LVHT_ONITEM};
3356  ScreenToClient(&htinfo.pt);
3357  lResult = m_ListView.HitTest(&htinfo);
3358 
3359  /* Send WM_*SCROLL messages every 250 ms during drag-scrolling */
3360  ::GetClientRect(m_ListView, &clientRect);
3361  if (htinfo.pt.x == m_ptLastMousePos.x && htinfo.pt.y == m_ptLastMousePos.y &&
3362  (htinfo.pt.x < SCROLLAREAWIDTH || htinfo.pt.x > clientRect.right - SCROLLAREAWIDTH ||
3363  htinfo.pt.y < SCROLLAREAWIDTH || htinfo.pt.y > clientRect.bottom - SCROLLAREAWIDTH ))
3364  {
3365  m_cScrollDelay = (m_cScrollDelay + 1) % 5; /* DragOver is called every 50 ms */
3366  if (m_cScrollDelay == 0)
3367  {
3368  /* Mouse did hover another 250 ms over the scroll-area */
3369  if (htinfo.pt.x < SCROLLAREAWIDTH)
3370  m_ListView.SendMessageW(WM_HSCROLL, SB_LINEUP, 0);
3371 
3372  if (htinfo.pt.x > clientRect.right - SCROLLAREAWIDTH)
3373  m_ListView.SendMessageW(WM_HSCROLL, SB_LINEDOWN, 0);
3374 
3375  if (htinfo.pt.y < SCROLLAREAWIDTH)
3376  m_ListView.SendMessageW(WM_VSCROLL, SB_LINEUP, 0);
3377 
3378  if (htinfo.pt.y > clientRect.bottom - SCROLLAREAWIDTH)
3379  m_ListView.SendMessageW(WM_VSCROLL, SB_LINEDOWN, 0);
3380  }
3381  }
3382  else
3383  {
3384  m_cScrollDelay = 0; /* Reset, if the cursor is not over the listview's scroll-area */
3385  }
3386 
3387  m_ptLastMousePos = htinfo.pt;
3389 
3390  /* We need to check if we drag the selection over itself */
3391  if (lResult != -1 && m_pSourceDataObject.p != NULL)
3392  {
3393  PCUITEMID_CHILD pidl = _PidlByItem(lResult);
3394 
3395  for (UINT i = 0; i < m_cidl; i++)
3396  {
3397  if (pidl == m_apidl[i])
3398  {
3399  /* The item that is being draged is hovering itself. */
3400  lResult = -1;
3401  break;
3402  }
3403  }
3404  }
3405 
3406  /* If we are still over the previous sub-item, notify it via DragOver and return. */
3407  if (m_pCurDropTarget && lResult == m_iDragOverItem)
3408  return m_pCurDropTarget->DragOver(grfKeyState, pt, pdwEffect);
3409 
3410  /* We've left the previous sub-item, notify it via DragLeave and Release it. */
3411  if (m_pCurDropTarget)
3412  {
3414  if (pidl)
3415  SelectItem(pidl, 0);
3416 
3417  m_pCurDropTarget->DragLeave();
3419  }
3420 
3421  m_iDragOverItem = lResult;
3422 
3423  if (lResult == -1)
3424  {
3425  /* We are not above one of the listview's subitems. Bind to the parent folder's
3426  * DropTarget interface. */
3427  hr = m_pSFParent->CreateViewObject(NULL, IID_PPV_ARG(IDropTarget,&m_pCurDropTarget));
3428  }
3429  else
3430  {
3431  /* Query the relative PIDL of the shellfolder object represented by the currently
3432  * dragged over listview-item ... */
3433  PCUITEMID_CHILD pidl = _PidlByItem(lResult);
3434 
3435  /* ... and bind m_pCurDropTarget to the IDropTarget interface of an UIObject of this object */
3436  hr = m_pSFParent->GetUIObjectOf(m_ListView, 1, &pidl, IID_NULL_PPV_ARG(IDropTarget, &m_pCurDropTarget));
3437  }
3438 
3440 
3441  /* If anything failed, m_pCurDropTarget should be NULL now, which ought to be a save state. */
3442  if (FAILED(hr))
3443  {
3444  *pdwEffect = DROPEFFECT_NONE;
3445  return hr;
3446  }
3447 
3448  if (m_iDragOverItem != -1)
3449  {
3450  SelectItem(m_iDragOverItem, SVSI_SELECT);
3451  }
3452 
3453  /* Notify the item just entered via DragEnter. */
3454  return m_pCurDropTarget->DragEnter(m_pCurDataObject, grfKeyState, pt, pdwEffect);
3455 }
UINT m_cScrollDelay
Definition: CDefView.cpp:113
long y
Definition: polytest.cpp:48
HRESULT hr
Definition: shlfolder.c:183
long x
Definition: polytest.cpp:48
#define pt(x, y)
Definition: drawing.c:79
PCUITEMID_CHILD _PidlByItem(int i)
Definition: CDefView.cpp:840
const ITEMID_CHILD UNALIGNED * PCUITEMID_CHILD
Definition: shtypes.idl:70
#define LVHT_ONITEM
Definition: commctrl.h:2497
LONG right
Definition: windef.h:308
#define IID_PPV_ARG(Itype, ppType)
const DWORD DROPEFFECT_NONE
Definition: oleidl.idl:929
static void ClientToListView(HWND hwndLV, POINT *ppt)
Definition: CDefView.cpp:59
long LONG
Definition: pedump.c:60
CComPtr< IDataObject > m_pCurDataObject
Definition: CDefView.cpp:111
virtual HRESULT STDMETHODCALLTYPE SelectItem(PCUITEMID_CHILD pidlItem, SVSIF uFlags)
HRESULT WINAPI IUnknown_SetSite(IUnknown *obj, IUnknown *site)
Definition: ordinal.c:1404
BOOL GetClientRect(LPRECT lpRect) const
Definition: atlwin.h:507
CListView m_ListView
Definition: CDefView.cpp:90
#define SCROLLAREAWIDTH
Definition: CDefView.cpp:3340
CComPtr< IDataObject > m_pSourceDataObject
Definition: CDefView.cpp:109
#define IID_NULL_PPV_ARG(Itype, ppType)
LONG HRESULT
Definition: typedefs.h:79
LONG m_iDragOverItem
Definition: CDefView.cpp:112
POINT m_ptLastMousePos
Definition: CDefView.cpp:114
BOOL ScreenToClient(LPPOINT lpPoint) const
Definition: atlwin.h:1058
CComPtr< IShellFolder > m_pSFParent
Definition: CDefView.cpp:84
CComPtr< IDropTarget > m_pCurDropTarget
Definition: CDefView.cpp:110
PCUITEMID_CHILD * m_apidl
Definition: CDefView.cpp:100
DWORD m_grfKeyState
Definition: CDefView.cpp:116
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
void Release()
Definition: atlcomcli.h:140
unsigned int UINT
Definition: ndis.h:50
#define SB_LINEDOWN
Definition: winuser.h:565
#define NULL
Definition: types.h:112
#define WM_HSCROLL
Definition: winuser.h:1730
#define SB_LINEUP
Definition: winuser.h:564
LONG bottom
Definition: windef.h:309
UINT m_cidl
Definition: CDefView.cpp:99
#define WM_VSCROLL
Definition: winuser.h:1731
int HitTest(LV_HITTESTINFO *phtInfo)
Definition: rosctrls.h:199

Referenced by DragEnter(), and DragOver().

◆ DragEnter()

HRESULT WINAPI CDefView::DragEnter ( IDataObject pDataObj,
DWORD  grfKeyState,
POINTL  pt,
DWORD pdwEffect 
)
virtual

Implements IDropTarget.

Definition at line 3457 of file CDefView.cpp.

3458 {
3459  if (*pdwEffect == DROPEFFECT_NONE)
3460  return S_OK;
3461 
3462  /* Get a hold on the data object for later calls to DragEnter on the sub-folders */
3463  m_pCurDataObject = pDataObject;
3464 
3465  HRESULT hr = drag_notify_subitem(grfKeyState, pt, pdwEffect);
3466  if (SUCCEEDED(hr))
3467  {
3468  POINT ptClient = {pt.x, pt.y};
3469  ScreenToClient(&ptClient);
3470  ImageList_DragEnter(m_hWnd, ptClient.x, ptClient.y);
3471  }
3472 
3473  return hr;
3474 }
long y
Definition: polytest.cpp:48
HRESULT hr
Definition: shlfolder.c:183
long x
Definition: polytest.cpp:48
#define pt(x, y)
Definition: drawing.c:79
const DWORD DROPEFFECT_NONE
Definition: oleidl.idl:929
BOOL WINAPI ImageList_DragEnter(HWND hwndLock, INT x, INT y)
Definition: imagelist.c:958
CComPtr< IDataObject > m_pCurDataObject
Definition: CDefView.cpp:111
if SUCCEEDED(hr)
LONG HRESULT
Definition: typedefs.h:79
BOOL ScreenToClient(LPPOINT lpPoint) const
Definition: atlwin.h:1058
HWND m_hWnd
Definition: atlwin.h:267
#define S_OK
Definition: intsafe.h:52
HRESULT drag_notify_subitem(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
Definition: CDefView.cpp:3342

◆ DragLeave()

HRESULT WINAPI CDefView::DragLeave ( void  )
virtual

Implements IDropTarget.

Definition at line 3484 of file CDefView.cpp.

3485 {
3487 
3488  if (m_pCurDropTarget)
3489  {
3490  m_pCurDropTarget->DragLeave();
3492  }
3493 
3494  if (m_pCurDataObject != NULL)
3495  {
3497  }
3498 
3499  m_iDragOverItem = 0;
3500 
3501  return S_OK;
3502 }
CComPtr< IDataObject > m_pCurDataObject
Definition: CDefView.cpp:111
LONG m_iDragOverItem
Definition: CDefView.cpp:112
HWND m_hWnd
Definition: atlwin.h:267
CComPtr< IDropTarget > m_pCurDropTarget
Definition: CDefView.cpp:110
#define S_OK
Definition: intsafe.h:52
BOOL WINAPI ImageList_DragLeave(HWND hwndLock)
Definition: imagelist.c:992
void Release()
Definition: atlcomcli.h:140
#define NULL
Definition: types.h:112

◆ DragOver()

HRESULT WINAPI CDefView::DragOver ( DWORD  grfKeyState,
POINTL  pt,
DWORD pdwEffect 
)
virtual

Implements IDropTarget.

Definition at line 3476 of file CDefView.cpp.

3477 {
3478  POINT ptClient = {pt.x, pt.y};
3479  ScreenToClient(&ptClient);
3480  ImageList_DragMove(ptClient.x, ptClient.y);
3481  return drag_notify_subitem(grfKeyState, pt, pdwEffect);
3482 }
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
#define pt(x, y)
Definition: drawing.c:79
BOOL WINAPI ImageList_DragMove(INT x, INT y)
Definition: imagelist.c:1070
BOOL ScreenToClient(LPPOINT lpPoint) const
Definition: atlwin.h:1058
HRESULT drag_notify_subitem(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
Definition: CDefView.cpp:3342

◆ Draw()

HRESULT WINAPI CDefView::Draw ( DWORD  dwDrawAspect,
LONG  lindex,
void pvAspect,
DVTARGETDEVICE *  ptd,
HDC  hdcTargetDev,
HDC  hdcDraw,
LPCRECTL  lprcBounds,
LPCRECTL  lprcWBounds,
BOOL(STDMETHODCALLTYPE *pfnContinue)(ULONG_PTR dwContinue)  ,
ULONG_PTR  dwContinue 
)
virtual

Definition at line 3767 of file CDefView.cpp.

3768 {
3769  FIXME("Stub: this=%p\n", this);
3770 
3771  return E_NOTIMPL;
3772 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Drop()

HRESULT WINAPI CDefView::Drop ( IDataObject pDataObj,
DWORD  grfKeyState,
POINTL  pt,
DWORD pdwEffect 
)
virtual

Implements IDropTarget.

Definition at line 3688 of file CDefView.cpp.

3689 {
3692 
3693  if ((IsDropOnSource(NULL) == S_OK) &&
3694  (*pdwEffect & DROPEFFECT_MOVE) &&
3696  {
3697  if (m_pCurDropTarget)
3698  {
3699  m_pCurDropTarget->DragLeave();
3701  }
3702 
3703  POINT ptDrop = { pt.x, pt.y };
3704  ::ScreenToClient(m_ListView, &ptDrop);
3705  ::ClientToListView(m_ListView, &ptDrop);
3706  m_ptLastMousePos = ptDrop;
3707 
3709  if (m_ListView.GetStyle() & LVS_AUTOARRANGE)
3710  {
3712  }
3713  else
3714  {
3715  POINT ptItem;
3716  INT iItem = -1;
3717  while ((iItem = m_ListView.GetNextItem(iItem, LVNI_SELECTED)) >= 0)
3718  {
3719  if (m_ListView.GetItemPosition(iItem, &ptItem))
3720  {
3721  ptItem.x += m_ptLastMousePos.x - m_ptFirstMousePos.x;
3722  ptItem.y += m_ptLastMousePos.y - m_ptFirstMousePos.y;
3723  m_ListView.SetItemPosition(iItem, &ptItem);
3724  }
3725  }
3726  }
3728  }
3729  else if (m_pCurDropTarget)
3730  {
3731  m_pCurDropTarget->Drop(pDataObject, grfKeyState, pt, pdwEffect);
3733  }
3734 
3736  m_iDragOverItem = 0;
3737  return S_OK;
3738 }
POINT m_ptFirstMousePos
Definition: CDefView.cpp:115
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
#define MK_LBUTTON
Definition: winuser.h:2347
#define TRUE
Definition: types.h:120
#define pt(x, y)
Definition: drawing.c:79
void SetRedraw(BOOL redraw)
Definition: rosctrls.h:27
int GetNextItem(int i, WORD flags)
Definition: rosctrls.h:161
#define LVNI_SELECTED
Definition: commctrl.h:2424
VOID WINAPI ImageList_EndDrag(void)
Definition: imagelist.c:1847
int32_t INT
Definition: typedefs.h:58
static void ClientToListView(HWND hwndLV, POINT *ppt)
Definition: CDefView.cpp:59
#define FALSE
Definition: types.h:117
CComPtr< IDataObject > m_pCurDataObject
Definition: CDefView.cpp:111
BOOL GetItemPosition(int nItem, POINT *pPoint)
Definition: rosctrls.h:231
void _MoveSelectionOnAutoArrange(POINT pt)
Definition: CDefView.cpp:3628
#define LVS_AUTOARRANGE
Definition: commctrl.h:2272
CListView m_ListView
Definition: CDefView.cpp:90
LONG m_iDragOverItem
Definition: CDefView.cpp:112
POINT m_ptLastMousePos
Definition: CDefView.cpp:114
BOOL ScreenToClient(LPPOINT lpPoint) const
Definition: atlwin.h:1058
virtual HRESULT STDMETHODCALLTYPE IsDropOnSource(IDropTarget *drop_target)
Definition: CDefView.cpp:3165
HWND m_hWnd
Definition: atlwin.h:267
CComPtr< IDropTarget > m_pCurDropTarget
Definition: CDefView.cpp:110
#define S_OK
Definition: intsafe.h:52
DWORD m_grfKeyState
Definition: CDefView.cpp:116
BOOL WINAPI ImageList_DragLeave(HWND hwndLock)
Definition: imagelist.c:992
const DWORD DROPEFFECT_MOVE
Definition: oleidl.idl:931
BOOL SetItemPosition(int nItem, POINT *pPoint)
Definition: rosctrls.h:236
void Release()
Definition: atlcomcli.h:140
#define NULL
Definition: types.h:112

◆ EnableModeless()

HRESULT WINAPI CDefView::EnableModeless ( BOOL  fEnable)
virtual

Implements IShellView.

Definition at line 2506 of file CDefView.cpp.

2507 {
2508  FIXME("(%p) stub\n", this);
2509 
2510  return E_NOTIMPL;
2511 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Exec()

HRESULT WINAPI CDefView::Exec ( const GUID pguidCmdGroup,
DWORD  nCmdID,
DWORD  nCmdexecopt,
VARIANT pvaIn,
VARIANT pvaOut 
)
virtual

Implements IOleCommandTarget.

Definition at line 3279 of file CDefView.cpp.

3280 {
3281  FIXME("(%p)->(\n\tTarget GUID:%s Command:0x%08x Opt:0x%08x %p %p)\n",
3282  this, debugstr_guid(pguidCmdGroup), nCmdID, nCmdexecopt, pvaIn, pvaOut);
3283 
3284  if (!pguidCmdGroup)
3285  return OLECMDERR_E_UNKNOWNGROUP;
3286 
3287  if (IsEqualCLSID(*pguidCmdGroup, m_Category))
3288  {
3289  if (nCmdID == FCIDM_SHVIEW_AUTOARRANGE)
3290  {
3291  if (V_VT(pvaIn) != VT_INT_PTR)
3292  return OLECMDERR_E_NOTSUPPORTED;
3293 
3294  TPMPARAMS params;
3295  params.cbSize = sizeof(params);
3296  params.rcExclude = *(RECT*) V_INTREF(pvaIn);
3297 
3298  if (m_hMenuViewModes)
3299  {
3300  /* Duplicate all but the last two items of the view modes menu */
3301  HMENU hmenuViewPopup = CreatePopupMenu();
3302  Shell_MergeMenus(hmenuViewPopup, m_hMenuViewModes, 0, 0, 0xFFFF, 0);
3303  DeleteMenu(hmenuViewPopup, GetMenuItemCount(hmenuViewPopup) - 1, MF_BYPOSITION);
3304  DeleteMenu(hmenuViewPopup, GetMenuItemCount(hmenuViewPopup) - 1, MF_BYPOSITION);
3305  CheckViewMode(hmenuViewPopup);
3306  TrackPopupMenuEx(hmenuViewPopup, TPM_LEFTALIGN | TPM_TOPALIGN, params.rcExclude.left, params.rcExclude.bottom, m_hWndParent, &params);
3307  ::DestroyMenu(hmenuViewPopup);
3308  }
3309 
3310  // pvaOut is VT_I4 with value 0x403 (cmd id of the new mode maybe?)
3311  V_VT(pvaOut) = VT_I4;
3312  V_I4(pvaOut) = 0x403;
3313  }
3314  }
3315 
3316  if (IsEqualIID(*pguidCmdGroup, CGID_Explorer) &&
3317  (nCmdID == 0x29) &&
3318  (nCmdexecopt == 4) && pvaOut)
3319  return S_OK;
3320 
3321  if (IsEqualIID(*pguidCmdGroup, CGID_ShellDocView) &&
3322  (nCmdID == 9) &&
3323  (nCmdexecopt == 0))
3324  return 1;
3325 
3326  return OLECMDERR_E_UNKNOWNGROUP;
3327 }
Definition: compat.h:2157
UINT WINAPI Shell_MergeMenus(HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags)
Definition: shlmenu.c:856
#define FCIDM_SHVIEW_AUTOARRANGE
Definition: shresdef.h:810
#define TPM_LEFTALIGN
Definition: winuser.h:2357
BOOL WINAPI TrackPopupMenuEx(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _In_ HWND, _In_opt_ LPTPMPARAMS)
#define V_I4(A)
Definition: oleauto.h:247
GLenum const GLfloat * params
Definition: glext.h:5645
#define MF_BYPOSITION
Definition: winuser.h:203
#define TPM_TOPALIGN
Definition: winuser.h:2363
#define FIXME(fmt,...)
Definition: debug.h:111
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
HRESULT CheckViewMode(HMENU hmenuView)
Definition: CDefView.cpp:1417
#define debugstr_guid
Definition: kernel32.h:35
#define V_INTREF(A)
Definition: oleauto.h:252
HWND m_hWndParent
Definition: CDefView.cpp:91
BOOL WINAPI DeleteMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
#define V_VT(A)
Definition: oleauto.h:211
BOOL WINAPI DestroyMenu(_In_ HMENU)
#define S_OK
Definition: intsafe.h:52
HMENU WINAPI CreatePopupMenu(void)
Definition: menu.c:846
HMENU m_hMenuViewModes
Definition: CDefView.cpp:95
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
CLSID m_Category
Definition: CDefView.cpp:123

◆ fill_list()

INT CALLBACK CDefView::fill_list ( LPVOID  ptr,
LPVOID  arg 
)
static

Definition at line 974 of file CDefView.cpp.

975 {
976  PITEMID_CHILD pidl = static_cast<PITEMID_CHILD>(ptr);
977  CDefView *pThis = static_cast<CDefView *>(arg);
978 
979  /* in a commdlg This works as a filemask*/
980  if (pThis->IncludeObject(pidl) == S_OK)
981  pThis->LV_AddItem(pidl);
982 
983  SHFree(pidl);
984  return TRUE;
985 }
int LV_AddItem(PCUITEMID_CHILD pidl)
Definition: CDefView.cpp:869
#define TRUE
Definition: types.h:120
static PVOID ptr
Definition: dispmode.c:27
HRESULT IncludeObject(PCUITEMID_CHILD pidl)
Definition: CDefView.cpp:448
#define S_OK
Definition: intsafe.h:52
void WINAPI SHFree(LPVOID pv)
Definition: shellole.c:326

Referenced by FillList().

◆ FillArrangeAsMenu()

HRESULT CDefView::FillArrangeAsMenu ( HMENU  hmenuArrange)

Definition at line 1377 of file CDefView.cpp.

1378 {
1379  /* We only need to fill this once */
1380  if (GetMenuItemID(hmenuArrange, 0) == FCIDM_SHVIEW_AUTOARRANGE)
1381  {
1382  Shell_MergeMenus(hmenuArrange, m_hMenuArrangeModes, 0, 0, 0xFFFF,0);
1383  }
1384 
1385  /* Also check the menu item according to which we sort */
1386  CheckMenuRadioItem(hmenuArrange,
1387  0x30,
1388  0x100,
1389  m_sortInfo.nHeaderID + 0x30,
1390  MF_BYCOMMAND);
1391 
1393  {
1396  }
1397  else
1398  {
1401 
1402  if (GetAutoArrange() == S_OK)
1404  else
1406 
1407  if (_GetSnapToGrid() == S_OK)
1409  else
1411  }
1412 
1413 
1414  return S_OK;
1415 }
HMENU m_hMenuArrangeModes
Definition: CDefView.cpp:94
virtual HRESULT STDMETHODCALLTYPE GetAutoArrange()
Definition: CDefView.cpp:2876
HRESULT _GetSnapToGrid()
Definition: CDefView.cpp:2881
#define MF_BYCOMMAND
Definition: winuser.h:202
UINT WINAPI Shell_MergeMenus(HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags)
Definition: shlmenu.c:856
#define FCIDM_SHVIEW_AUTOARRANGE
Definition: shresdef.h:810
FOLDERSETTINGS m_FolderSettings
Definition: CDefView.cpp:92
BOOL WINAPI CheckMenuRadioItem(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT, _In_ UINT)
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define MF_CHECKED
Definition: winuser.h:132
LISTVIEW_SORT_INFO m_sortInfo
Definition: CDefView.cpp:102
DWORD WINAPI CheckMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define MF_UNCHECKED
Definition: winuser.h:204
#define S_OK
Definition: intsafe.h:52
UINT WINAPI GetMenuItemID(_In_ HMENU, _In_ int)
#define FCIDM_SHVIEW_ALIGNTOGRID
Definition: shresdef.h:812
#define MF_GRAYED
Definition: winuser.h:129

Referenced by OnInitMenuPopup().

◆ FillEditMenu()

HRESULT CDefView::FillEditMenu ( )

Definition at line 1344 of file CDefView.cpp.

1345 {
1347  if (!hEditMenu)
1348  return E_FAIL;
1349 
1350  HMENU hmenuContents = ::LoadMenuW(shell32_hInstance, L"MENU_003");
1351  if (!hmenuContents)
1352  return E_FAIL;
1353 
1354  Shell_MergeMenus(hEditMenu, hmenuContents, 0, 0, 0xFFFF, 0);
1355 
1356  ::DestroyMenu(hmenuContents);
1357 
1358  return S_OK;
1359 }
UINT WINAPI Shell_MergeMenus(HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags)
Definition: shlmenu.c:856
HMENU m_hMenu
Definition: CDefView.cpp:93
#define E_FAIL
Definition: ddrawi.h:102
#define FCIDM_MENU_EDIT
Definition: shlobj.h:558
#define L(x)
Definition: ntvdm.h:50
BOOL WINAPI DestroyMenu(_In_ HMENU)
HMENU GetSubmenuByID(HMENU hmenu, UINT id)
Definition: CDefView.cpp:1287
#define S_OK
Definition: intsafe.h:52
#define shell32_hInstance
HMENU WINAPI LoadMenuW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60

Referenced by DoActivate().

◆ FillFileMenu()

HRESULT CDefView::FillFileMenu ( )

Definition at line 1307 of file CDefView.cpp.

1308 {
1310  if (!hFileMenu)
1311  return E_FAIL;
1312 
1313  /* Cleanup the items added previously */
1314  for (int i = GetMenuItemCount(hFileMenu) - 1; i >= 0; i--)
1315  {
1316  UINT id = GetMenuItemID(hFileMenu, i);
1318  DeleteMenu(hFileMenu, i, MF_BYPOSITION);
1319  }
1320 
1322 
1323  /* Store the context menu in m_pCM and keep it in order to invoke the selected command later on */
1326  if (FAILED_UNEXPECTEDLY(hr))
1327  return hr;
1328 
1330 
1331  hr = m_pCM->QueryContextMenu(hmenu, 0, FCIDM_SHVIEWFIRST, FCIDM_SHVIEWLAST, 0);
1332  if (FAILED_UNEXPECTEDLY(hr))
1333  return hr;
1334 
1335  // TODO: filter or something
1336 
1337  Shell_MergeMenus(hFileMenu, hmenu, 0, 0, 0xFFFF, MM_ADDSEPARATOR | MM_SUBMENUSHAVEIDS);
1338 
1340 
1341  return S_OK;
1342 }
UINT WINAPI Shell_MergeMenus(HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags)
Definition: shlmenu.c:856
HRESULT hr
Definition: shlfolder.c:183
static HMENU hmenu
Definition: win.c:66
#define FCIDM_SHVIEWFIRST
Definition: shlobj.h:507
HMENU m_hMenu
Definition: CDefView.cpp:93
virtual HRESULT STDMETHODCALLTYPE GetItemObject(UINT uItem, REFIID riid, void **ppv)
Definition: CDefView.cpp:2680
#define IID_PPV_ARG(Itype, ppType)
#define E_FAIL
Definition: ddrawi.h:102
#define FCIDM_BROWSERLAST
Definition: shlobj.h:550
#define MF_BYPOSITION
Definition: winuser.h:203
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
CListView m_ListView
Definition: CDefView.cpp:90
#define FCIDM_SHVIEWLAST
Definition: shlobj.h:541
#define FCIDM_MENU_FILE
Definition: shlobj.h:557
#define MM_ADDSEPARATOR
Definition: shlobj.h:2367
LONG HRESULT
Definition: typedefs.h:79
BOOL WINAPI DeleteMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:82
UINT GetSelectedCount()
Definition: rosctrls.h:136
CComPtr< IContextMenu > m_pCM
Definition: CDefView.cpp:118
BOOL WINAPI DestroyMenu(_In_ HMENU)
HMENU GetSubmenuByID(HMENU hmenu, UINT id)
Definition: CDefView.cpp:1287
#define S_OK
Definition: intsafe.h:52
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int UINT
Definition: ndis.h:50
UINT WINAPI GetMenuItemID(_In_ HMENU, _In_ int)
HMENU WINAPI CreatePopupMenu(void)
Definition: menu.c:846
#define MM_SUBMENUSHAVEIDS
Definition: shlobj.h:2368
GLenum GLuint id
Definition: glext.h:5579
UINT m_cidl
Definition: CDefView.cpp:99
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60

Referenced by OnInitMenuPopup().

◆ FillList()

HRESULT CDefView::FillList ( )

Definition at line 987 of file CDefView.cpp.

988 {
989  CComPtr<IEnumIDList> pEnumIDList;
990  PITEMID_CHILD pidl;
991  DWORD dwFetched;
992  HRESULT hRes;
993  HDPA hdpa;
994  DWORD dFlags = SHCONTF_NONFOLDERS | SHCONTF_FOLDERS;
995  DWORD dwValue, cbValue;
996 
997  TRACE("%p\n", this);
998 
999  /* determine if there is a setting to show all the hidden files/folders */
1000  dwValue = 1;
1001  cbValue = sizeof(dwValue);
1003  L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
1004  L"Hidden", NULL, &dwValue, &cbValue);
1005  if (dwValue == 1)
1006  {
1007  dFlags |= SHCONTF_INCLUDEHIDDEN;
1008  m_ListView.SendMessageW(LVM_SETCALLBACKMASK, LVIS_CUT, 0);
1009  }
1010 
1011  dwValue = 0;
1012  cbValue = sizeof(dwValue);
1014  L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
1015  L"ShowSuperHidden", NULL, &dwValue, &cbValue);
1016  if (dwValue)
1017  {
1018  dFlags |= SHCONTF_INCLUDESUPERHIDDEN;
1019  m_ListView.SendMessageW(LVM_SETCALLBACKMASK, LVIS_CUT, 0);
1020  }
1021 
1022  /* get the itemlist from the shfolder */
1023  hRes = m_pSFParent->EnumObjects(m_hWnd, dFlags, &pEnumIDList);
1024  if (hRes != S_OK)
1025  {
1026  if (hRes == S_FALSE)
1027  return(NOERROR);
1028  return(hRes);
1029  }
1030 
1031  /* create a pointer array */
1032  hdpa = DPA_Create(16);
1033  if (!hdpa)
1034  {
1035  return(E_OUTOFMEMORY);
1036  }
1037 
1038  /* copy the items into the array*/
1039  while((S_OK == pEnumIDList->Next(1, &pidl, &dwFetched)) && dwFetched)
1040  {
1041  if (DPA_InsertPtr(hdpa, 0x7fff, pidl) == -1)
1042  {
1043  SHFree(pidl);
1044  }
1045  }
1046 
1047  /*turn the listview's redrawing off*/
1049 
1050  DPA_DestroyCallback( hdpa, fill_list, this);
1051 
1052  /* sort the array */
1053  if (m_pSF2Parent)
1054  {
1055  m_pSF2Parent->GetDefaultColumn(NULL, (ULONG*)&m_sortInfo.nHeaderID, NULL);
1056  }
1057  else
1058  {
1059  FIXME("no m_pSF2Parent\n");
1060  }
1062  _Sort();
1063 
1065  {
1068  }
1069 
1070  // load custom background image and custom text color
1073 
1074  /*turn the listview's redrawing back on and force it to draw*/
1076 
1077  UpdateListColors();
1078 
1080  {
1081  // redraw now
1082  m_ListView.InvalidateRect(NULL, TRUE);
1083  }
1084 
1086 
1087  return S_OK;
1088 }
void WINAPI DPA_DestroyCallback(HDPA hdpa, PFNDPAENUMCALLBACK enumProc, LPVOID lParam)
Definition: dpa.c:1003
HDPA WINAPI DPA_Create(INT nGrow)
Definition: dpa.c:950
#define NOERROR
Definition: winerror.h:2354
FOLDERSETTINGS m_FolderSettings
Definition: CDefView.cpp:92
#define TRUE
Definition: types.h:120
#define HKEY_CURRENT_USER
Definition: winreg.h:11
void SetRedraw(BOOL redraw)
Definition: rosctrls.h:27
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
#define LVIS_CUT
Definition: commctrl.h:2320
#define LVM_SETCALLBACKMASK
Definition: commctrl.h:2419
#define SFVM_GET_CUSTOMVIEWINFO
CComPtr< IShellFolder2 > m_pSF2Parent
Definition: CDefView.cpp:85
#define L(x)
Definition: ntvdm.h:50
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define FALSE
Definition: types.h:117
SFVM_CUSTOMVIEWINFO_DATA m_viewinfo_data
Definition: CDefView.cpp:125
#define FIXME(fmt,...)
Definition: debug.h:111
#define SFVM_LISTREFRESHED
#define S_FALSE
Definition: winerror.h:2357
static INT CALLBACK fill_list(LPVOID ptr, LPVOID arg)
Definition: CDefView.cpp:974
LONG_PTR LPARAM
Definition: windef.h:208
CListView m_ListView
Definition: CDefView.cpp:90
void UpdateListColors()
Definition: CDefView.cpp:676
#define TRACE(s)
Definition: solgame.cpp:4
LISTVIEW_SORT_INFO m_sortInfo
Definition: CDefView.cpp:102
LONG HRESULT
Definition: typedefs.h:79
unsigned long DWORD
Definition: ntddk_ex.h:95
INT WINAPI DPA_InsertPtr(HDPA hdpa, INT i, LPVOID p)
Definition: dpa.c:591
BOOL _Sort()
Definition: CDefView.cpp:806
DWORD WINAPI SHGetValueW(HKEY hKey, LPCWSTR lpszSubKey, LPCWSTR lpszValue, LPDWORD pwType, LPVOID pvData, LPDWORD pcbData)
Definition: reg.c:1236
CComPtr< IShellFolder > m_pSFParent
Definition: CDefView.cpp:84
HWND m_hWnd
Definition: atlwin.h:267
#define S_OK
Definition: intsafe.h:52
#define NULL
Definition: types.h:112
void WINAPI SHFree(LPVOID pv)
Definition: shellole.c:326
unsigned int ULONG
Definition: retypes.h:1
Definition: dpa.c:48
HRESULT _DoFolderViewCB(UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: CDefView.cpp:3863

Referenced by OnCreate(), and Refresh().

◆ FillViewMenu()

HRESULT CDefView::FillViewMenu ( )

Definition at line 1361 of file CDefView.cpp.

1362 {
1364  if (!hViewMenu)
1365  return E_FAIL;
1366 
1368  if (!m_hMenuViewModes)
1369  return E_FAIL;
1370 
1373 
1374  return S_OK;
1375 }
UINT WINAPI Shell_MergeMenus(HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags)
Definition: shlmenu.c:856
#define FCIDM_MENU_VIEW_SEP_OPTIONS
Definition: shlobj.h:560
HMENU m_hMenu
Definition: CDefView.cpp:93
#define E_FAIL
Definition: ddrawi.h:102
#define L(x)
Definition: ntvdm.h:50
DWORD WINAPI SHMenuIndexFromID(HMENU hMenu, UINT uID)
Definition: ordinal.c:4391
#define FCIDM_MENU_VIEW
Definition: shlobj.h:559
#define MM_ADDSEPARATOR
Definition: shlobj.h:2367
HMENU GetSubmenuByID(HMENU hmenu, UINT id)
Definition: CDefView.cpp:1287
#define S_OK
Definition: intsafe.h:52
#define shell32_hInstance
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int UINT
Definition: ndis.h:50
HMENU m_hMenuViewModes
Definition: CDefView.cpp:95
#define MM_SUBMENUSHAVEIDS
Definition: shlobj.h:2368
HMENU WINAPI LoadMenuW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
#define MM_DONTREMOVESEPS
Definition: shlobj.h:2369

Referenced by DoActivate().

◆ Freeze()

HRESULT WINAPI CDefView::Freeze ( DWORD  dwDrawAspect,
LONG  lindex,
void pvAspect,
DWORD pdwFreeze 
)
virtual

Implements IViewObject.

Definition at line 3781 of file CDefView.cpp.

3782 {
3783  FIXME("Stub: this=%p\n", this);
3784 
3785  return E_NOTIMPL;
3786 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetAdvise()

HRESULT WINAPI CDefView::GetAdvise ( DWORD pAspects,
DWORD pAdvf,
IAdviseSink **  ppAdvSink 
)
virtual

Implements IViewObject.

Definition at line 3807 of file CDefView.cpp.

3808 {
3809  TRACE("this=%p pAspects=%p pAdvf=%p ppAdvSink=%p\n", this, pAspects, pAdvf, ppAdvSink);
3810 
3811  if (ppAdvSink)
3812  {
3813  *ppAdvSink = m_pAdvSink;
3814  m_pAdvSink.p->AddRef();
3815  }
3816 
3817  if (pAspects)
3818  *pAspects = m_dwAspects;
3819 
3820  if (pAdvf)
3821  *pAdvf = m_dwAdvf;
3822 
3823  return S_OK;
3824 }
CComPtr< IAdviseSink > m_pAdvSink
Definition: CDefView.cpp:107
#define TRACE(s)
Definition: solgame.cpp:4
ULONG AddRef()
#define S_OK
Definition: intsafe.h:52
DWORD m_dwAdvf
Definition: CDefView.cpp:106
DWORD m_dwAspects
Definition: CDefView.cpp:105

◆ GetArrangeParam()

HRESULT STDMETHODCALLTYPE CDefView::GetArrangeParam ( LPARAM sort)
virtual

Definition at line 3055 of file CDefView.cpp.

3056 {
3057  FIXME("(%p)->(%p) stub\n", this, sort);
3058  return E_NOTIMPL;
3059 }
_STLP_MOVE_TO_STD_NAMESPACE void sort(_RandomAccessIter __first, _RandomAccessIter __last)
Definition: _algo.c:993
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetAutoArrange()

HRESULT STDMETHODCALLTYPE CDefView::GetAutoArrange ( )
virtual

Implements IFolderView.

Definition at line 2876 of file CDefView.cpp.

2877 {
2878  return ((m_ListView.GetStyle() & LVS_AUTOARRANGE) ? S_OK : S_FALSE);
2879 }
#define S_FALSE
Definition: winerror.h:2357
#define LVS_AUTOARRANGE
Definition: commctrl.h:2272
CListView m_ListView
Definition: CDefView.cpp:90
#define S_OK
Definition: intsafe.h:52

Referenced by FillArrangeAsMenu(), and OnCommand().

◆ GetColorSet()

HRESULT WINAPI CDefView::GetColorSet ( DWORD  dwDrawAspect,
LONG  lindex,
void pvAspect,
DVTARGETDEVICE *  ptd,
HDC  hicTargetDev,
LOGPALETTE **  ppColorSet 
)
virtual

Implements IViewObject.

Definition at line 3774 of file CDefView.cpp.

3775 {
3776  FIXME("Stub: this=%p\n", this);
3777 
3778  return E_NOTIMPL;
3779 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetCurrentInfo()

HRESULT WINAPI CDefView::GetCurrentInfo ( LPFOLDERSETTINGS  pfs)
virtual

Implements IShellView.

Definition at line 2604 of file CDefView.cpp.

2605 {
2606  TRACE("(%p)->(%p) vmode=%x flags=%x\n", this, lpfs,
2608 
2609  if (!lpfs)
2610  return E_INVALIDARG;
2611 
2612  *lpfs = m_FolderSettings;
2613  return S_OK;
2614 }
FOLDERSETTINGS m_FolderSettings
Definition: CDefView.cpp:92
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:52

◆ GetCurrentViewMode()

HRESULT STDMETHODCALLTYPE CDefView::GetCurrentViewMode ( UINT pViewMode)
virtual

Implements IFolderView.

Definition at line 2731 of file CDefView.cpp.

2732 {
2733  TRACE("(%p)->(%p), stub\n", this, pViewMode);
2734 
2735  if (!pViewMode)
2736  return E_INVALIDARG;
2737 
2738  *pViewMode = m_FolderSettings.ViewMode;
2739  return S_OK;
2740 }
FOLDERSETTINGS m_FolderSettings
Definition: CDefView.cpp:92
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:52

◆ GetDefaultSpacing()

HRESULT STDMETHODCALLTYPE CDefView::GetDefaultSpacing ( POINT ppt)
virtual

Implements IFolderView.

Definition at line 2871 of file CDefView.cpp.

2872 {
2873  return E_NOTIMPL;
2874 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetDragPoint()

HRESULT STDMETHODCALLTYPE CDefView::GetDragPoint ( POINT pt)
virtual

Definition at line 3176 of file CDefView.cpp.

3177 {
3178  if (!pt)
3179  return E_INVALIDARG;
3180 
3181  *pt = m_ptFirstMousePos;
3182  return S_OK;
3183 }
POINT m_ptFirstMousePos
Definition: CDefView.cpp:115
#define pt(x, y)
Definition: drawing.c:79
#define E_INVALIDARG
Definition: ddrawi.h:101
#define S_OK
Definition: intsafe.h:52

◆ GetDropPoint()

HRESULT STDMETHODCALLTYPE CDefView::GetDropPoint ( POINT pt)
virtual

Definition at line 3185 of file CDefView.cpp.

3186 {
3187  FIXME("(%p)->(%p) stub\n", this, pt);
3188  return E_NOTIMPL;
3189 }
#define pt(x, y)
Definition: drawing.c:79
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetFocusedItem()

HRESULT STDMETHODCALLTYPE CDefView::GetFocusedItem ( int piItem)
virtual

Implements IFolderView.

Definition at line 2833 of file CDefView.cpp.

2834 {
2835  TRACE("(%p)->(%p)\n", this, piItem);
2836 
2837  *piItem = m_ListView.GetNextItem(-1, LVNI_FOCUSED);
2838 
2839  return S_OK;
2840 }
int GetNextItem(int i, WORD flags)
Definition: rosctrls.h:161
CListView m_ListView
Definition: CDefView.cpp:90
#define LVNI_FOCUSED
Definition: commctrl.h:2423
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:52

◆ GetFolder()

HRESULT STDMETHODCALLTYPE CDefView::GetFolder ( REFIID  riid,
void **  ppv 
)
virtual

Implements IFolderView.

Definition at line 2786 of file CDefView.cpp.

2787 {
2788  if (m_pSFParent == NULL)
2789  return E_FAIL;
2790 
2791  return m_pSFParent->QueryInterface(riid, ppv);
2792 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define E_FAIL
Definition: ddrawi.h:102
CComPtr< IShellFolder > m_pSFParent
Definition: CDefView.cpp:84
#define NULL
Definition: types.h:112

◆ GetItemObject()

HRESULT WINAPI CDefView::GetItemObject ( UINT  uItem,
REFIID  riid,
void **  ppv 
)
virtual

Implements IShellView.

Definition at line 2680 of file CDefView.cpp.

2681 {
2683 
2684  TRACE("(%p)->(uItem=0x%08x,\n\tIID=%s, ppv=%p)\n", this, uItem, debugstr_guid(&riid), ppvOut);
2685 
2686  if (!ppvOut)
2687  return E_INVALIDARG;
2688 
2689  *ppvOut = NULL;
2690 
2691  switch (uItem)
2692  {
2693  case SVGIO_BACKGROUND:
2694  if (IsEqualIID(riid, IID_IContextMenu))
2695  {
2697  if (FAILED_UNEXPECTEDLY(hr))
2698  return hr;
2699 
2700  IUnknown_SetSite(*((IUnknown**)ppvOut), (IShellView *)this);
2701  }
2702  else if (IsEqualIID(riid, IID_IDispatch))
2703  {
2705  {
2707  if (FAILED_UNEXPECTEDLY(hr))
2708  return hr;
2709  }
2710  hr = m_pShellFolderViewDual->QueryInterface(riid, ppvOut);
2711  }
2712  break;
2713 
2714  case SVGIO_SELECTION:
2715  GetSelections();
2716  hr = m_pSFParent->GetUIObjectOf(m_hWnd, m_cidl, m_apidl, riid, 0, ppvOut);
2717  if (FAILED_UNEXPECTEDLY(hr))
2718  return hr;
2719 
2720  if (IsEqualIID(riid, IID_IContextMenu))
2721  IUnknown_SetSite(*((IUnknown**)ppvOut), (IShellView *)this);
2722 
2723  break;
2724  }
2725 
2726  TRACE("-- (%p)->(interface=%p)\n", this, *ppvOut);
2727 
2728  return hr;
2729 }
#define E_NOINTERFACE
Definition: winerror.h:2364
HRESULT WINAPI CDefViewDual_Constructor(REFIID riid, LPVOID *ppvOut)
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
CComPtr< IShellFolderViewDual > m_pShellFolderViewDual
Definition: CDefView.cpp:89
CComPtr< IShellFolder2 > m_pSF2Parent
Definition: CDefView.cpp:85
HRESULT CDefViewBckgrndMenu_CreateInstance(IShellFolder *psf, REFIID riid, void **ppv)
HRESULT WINAPI IUnknown_SetSite(IUnknown *obj, IUnknown *site)
Definition: ordinal.c:1404
#define E_INVALIDARG
Definition: ddrawi.h:101
#define debugstr_guid
Definition: kernel32.h:35
UINT GetSelections()
Definition: CDefView.cpp:1438
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:82
const GUID IID_IDispatch
CComPtr< IShellFolder > m_pSFParent
Definition: CDefView.cpp:84
HWND m_hWnd
Definition: atlwin.h:267
PCUITEMID_CHILD * m_apidl
Definition: CDefView.cpp:100
#define NULL
Definition: types.h:112
UINT m_cidl
Definition: CDefView.cpp:99
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

Referenced by FillFileMenu(), OnContextMenu(), OnExplorerCommand(), and OpenSelectedItems().

◆ GetItemPosition()

HRESULT STDMETHODCALLTYPE CDefView::GetItemPosition ( PCUITEMID_CHILD  pidl,
POINT ppt 
)
virtual

Implements IFolderView.

Definition at line 2842 of file CDefView.cpp.

2843 {
2844  int lvIndex = LV_FindItemByPidl(pidl);
2845  if (lvIndex == -1 || ppt == NULL)
2846  return E_INVALIDARG;
2847 
2848  m_ListView.GetItemPosition(lvIndex, ppt);
2849  return S_OK;
2850 }
int LV_FindItemByPidl(PCUITEMID_CHILD pidl)
Definition: CDefView.cpp:853
BOOL GetItemPosition(int nItem, POINT *pPoint)
Definition: rosctrls.h:231
#define E_INVALIDARG
Definition: ddrawi.h:101
CListView m_ListView
Definition: CDefView.cpp:90
#define S_OK
Definition: intsafe.h:52
#define NULL
Definition: types.h:112

◆ GetItemSpacing()

HRESULT STDMETHODCALLTYPE CDefView::GetItemSpacing ( ITEMSPACING spacing)
virtual

Definition at line 3221 of file CDefView.cpp.

3222 {
3223  FIXME("(%p)->(%p) stub\n", this, spacing);
3224  return E_NOTIMPL;
3225 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetObject()

HRESULT STDMETHODCALLTYPE CDefView::GetObject ( PITEMID_CHILD pidl,
UINT  item 
)
virtual

Definition at line 3081 of file CDefView.cpp.

3082 {
3083  TRACE("(%p)->(%p %d)\n", this, pidl, item);
3084  return Item(item, pidl);
3085 }
virtual HRESULT STDMETHODCALLTYPE Item(int iItemIndex, PITEMID_CHILD *ppidl)
Definition: CDefView.cpp:2794
#define TRACE(s)
Definition: solgame.cpp:4
static ATOM item
Definition: dde.c:856

Referenced by OnPrintClient().

◆ GetObjectCount()

HRESULT STDMETHODCALLTYPE CDefView::GetObjectCount ( UINT count)
virtual

Definition at line 3106 of file CDefView.cpp.

3107 {
3108  TRACE("(%p)->(%p)\n", this, count);
3110  return S_OK;
3111 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
int GetItemCount()
Definition: rosctrls.h:121
CListView m_ListView
Definition: CDefView.cpp:90
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:52

◆ GetSelectedCount()

HRESULT STDMETHODCALLTYPE CDefView::GetSelectedCount ( UINT count)
virtual

Definition at line 3138 of file CDefView.cpp.

3139 {
3140  FIXME("(%p)->(%p) stub\n", this, count);
3141  return E_NOTIMPL;
3142 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetSelectedObjects()

HRESULT STDMETHODCALLTYPE CDefView::GetSelectedObjects ( PCUITEMID_CHILD **  pidl,
UINT items 
)
virtual

Definition at line 3144 of file CDefView.cpp.

3145 {
3146  TRACE("(%p)->(%p %p)\n", this, pidl, items);
3147 
3148  *items = GetSelections();
3149 
3150  if (*items)
3151  {
3152  *pidl = static_cast<PCUITEMID_CHILD *>(LocalAlloc(0, *items * sizeof(PCUITEMID_CHILD)));
3153  if (!*pidl)
3154  {
3155  return E_OUTOFMEMORY;
3156  }
3157 
3158  /* it's documented that caller shouldn't PIDLs, only array itself */
3159  memcpy(*pidl, m_apidl, *items * sizeof(PCUITEMID_CHILD));
3160  }
3161 
3162  return S_OK;
3163 }
const ITEMID_CHILD UNALIGNED * PCUITEMID_CHILD
Definition: shtypes.idl:70
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
UINT GetSelections()
Definition: CDefView.cpp:1438
#define TRACE(s)
Definition: solgame.cpp:4
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
PCUITEMID_CHILD * m_apidl
Definition: CDefView.cpp:100
#define S_OK
Definition: intsafe.h:52
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:1373
static TCHAR * items[]
Definition: page1.c:45

◆ GetSelectionMarkedItem()

HRESULT STDMETHODCALLTYPE CDefView::GetSelectionMarkedItem ( int piItem)
virtual

Implements IFolderView.

Definition at line 2824 of file CDefView.cpp.

2825 {
2826  TRACE("(%p)->(%p)\n", this, piItem);
2827 
2828  *piItem = m_ListView.GetSelectionMark();
2829 
2830  return S_OK;
2831 }
int GetSelectionMark()
Definition: rosctrls.h:156
CListView m_ListView
Definition: CDefView.cpp:90
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:52

◆ GetSelections()

UINT CDefView::GetSelections ( )

Definition at line 1438 of file CDefView.cpp.

1439 {
1440  SHFree(m_apidl);
1441 
1443  m_apidl = static_cast<PCUITEMID_CHILD*>(SHAlloc(m_cidl * sizeof(PCUITEMID_CHILD)));
1444  if (!m_apidl)
1445  {
1446  m_cidl = 0;
1447  return 0;
1448  }
1449 
1450  TRACE("-- Items selected =%u\n", m_cidl);
1451 
1452  UINT i = 0;
1453  int lvIndex = -1;
1454  while ((lvIndex = m_ListView.GetNextItem(lvIndex, LVNI_SELECTED)) > -1)
1455  {
1456  m_apidl[i] = _PidlByItem(lvIndex);
1457  i++;
1458  if (i == m_cidl)
1459  break;
1460  TRACE("-- selected Item found\n");
1461  }
1462 
1463  return m_cidl;
1464 }
PCUITEMID_CHILD _PidlByItem(int i)
Definition: CDefView.cpp:840
int GetNextItem(int i, WORD flags)
Definition: rosctrls.h:161
const ITEMID_CHILD UNALIGNED * PCUITEMID_CHILD
Definition: shtypes.idl:70
#define LVNI_SELECTED
Definition: commctrl.h:2424
CListView m_ListView
Definition: CDefView.cpp:90
#define TRACE(s)
Definition: solgame.cpp:4
UINT GetSelectedCount()
Definition: rosctrls.h:136