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

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
 
CLSID m_Category
 
BOOL m_Destroyed
 
SFVM_CUSTOMVIEWINFO_DATA m_viewinfo_data
 

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 60 of file CDefView.cpp.

Constructor & Destructor Documentation

◆ CDefView()

CDefView::CDefView ( )

Definition at line 365 of file CDefView.cpp.

365  :
366  m_ListView(),
368  m_hMenu(NULL),
373  m_uState(0),
374  m_cidl(0),
375  m_apidl(NULL),
377  m_hNotify(0),
378  m_hAccel(NULL),
379  m_dwAspects(0),
380  m_dwAdvf(0),
381  m_iDragOverItem(0),
382  m_cScrollDelay(0),
385 {
387  ZeroMemory(&m_sortInfo, sizeof(m_sortInfo));
389  ZeroMemory(&m_Category, sizeof(m_Category));
393 }
HMENU m_hMenuArrangeModes
Definition: CDefView.cpp:83
BOOL m_Destroyed
Definition: CDefView.cpp:112
HACCEL m_hAccel
Definition: CDefView.cpp:93
UINT m_cScrollDelay
Definition: CDefView.cpp:102
BOOL m_isEditing
Definition: CDefView.cpp:109
FOLDERSETTINGS m_FolderSettings
Definition: CDefView.cpp:81
#define ZeroMemory
Definition: winbase.h:1642
HMENU m_hMenu
Definition: CDefView.cpp:82
#define COLOR_WINDOW
Definition: winuser.h:908
DWORD WINAPI GetSysColor(_In_ int)
SFVM_CUSTOMVIEWINFO_DATA m_viewinfo_data
Definition: CDefView.cpp:113
HMENU m_hContextMenu
Definition: CDefView.cpp:85
PIDLIST_ABSOLUTE m_pidlParent
Definition: CDefView.cpp:90
smooth NULL
Definition: ftsmooth.c:416
ULONG m_hNotify
Definition: CDefView.cpp:92
CListView m_ListView
Definition: CDefView.cpp:79
HWND m_hWndParent
Definition: CDefView.cpp:80
UINT m_uState
Definition: CDefView.cpp:87
BOOL m_bmenuBarInitialized
Definition: CDefView.cpp:86
LISTVIEW_SORT_INFO m_sortInfo
Definition: CDefView.cpp:91
#define COLOR_WINDOWTEXT
Definition: winuser.h:911
LONG m_iDragOverItem
Definition: CDefView.cpp:101
POINT m_ptLastMousePos
Definition: CDefView.cpp:103
PCUITEMID_CHILD * m_apidl
Definition: CDefView.cpp:89
DWORD m_dwAdvf
Definition: CDefView.cpp:95
HMENU m_hMenuViewModes
Definition: CDefView.cpp:84
DWORD m_dwAspects
Definition: CDefView.cpp:94
UINT m_cidl
Definition: CDefView.cpp:88
CLSID m_Category
Definition: CDefView.cpp:111

◆ ~CDefView()

CDefView::~CDefView ( )

Definition at line 395 of file CDefView.cpp.

396 {
397  TRACE(" destroying IShellView(%p)\n", this);
398 
400  {
403  }
404 
405  if (m_hWnd)
406  {
408  }
409 
410  SHFree(m_apidl);
411 }
virtual HRESULT STDMETHODCALLTYPE DestroyViewWindow()
Definition: CDefView.cpp:2322
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
SFVM_CUSTOMVIEWINFO_DATA m_viewinfo_data
Definition: CDefView.cpp:113
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
HWND m_hWnd
Definition: atlwin.h:268
PCUITEMID_CHILD * m_apidl
Definition: CDefView.cpp:89
void WINAPI SHFree(LPVOID pv)
Definition: shellole.c:331

Member Function Documentation

◆ _DoFolderViewCB()

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

Definition at line 3437 of file CDefView.cpp.

3438 {
3439  HRESULT hr = E_NOTIMPL;
3440 
3442  {
3443  hr = m_pShellFolderViewCB->MessageSFVCB(uMsg, wParam, lParam);
3444  }
3445 
3446  if (hr == E_NOTIMPL)
3447  {
3448  hr = DefMessageSFVCB(uMsg, wParam, lParam);
3449  }
3450 
3451  return hr;
3452 }
HRESULT hr
Definition: shlfolder.c:183
WPARAM wParam
Definition: combotst.c:138
CComPtr< IShellFolderViewCB > m_pShellFolderViewCB
Definition: CDefView.cpp:75
HRESULT DefMessageSFVCB(UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: CDefView.cpp:3430
LONG HRESULT
Definition: typedefs.h:78
#define E_NOTIMPL
Definition: ddrawi.h:99
LPARAM lParam
Definition: combotst.c:139

Referenced by CreateList(), CreateViewWindow3(), FillList(), OnNotify(), and OnSize().

◆ _MergeToolbar()

HRESULT CDefView::_MergeToolbar ( )
private

Definition at line 3402 of file CDefView.cpp.

3403 {
3405  HRESULT hr = S_OK;
3406 
3407  hr = IUnknown_QueryService(m_pShellBrowser, IID_IExplorerToolbar, IID_PPV_ARG(IExplorerToolbar, &ptb));
3408  if (FAILED(hr))
3409  return hr;
3410 
3411  m_Category = CGID_DefViewFrame;
3412 
3413  hr = ptb->SetCommandTarget(static_cast<IOleCommandTarget*>(this), &m_Category, 0);
3414  if (FAILED(hr))
3415  return hr;
3416 
3417  if (hr == S_FALSE)
3418  return S_OK;
3419 
3420 #if 0
3421  hr = ptb->AddButtons(&m_Category, buttonsCount, buttons);
3422  if (FAILED(hr))
3423  return hr;
3424 #endif
3425 
3426  return S_OK;
3427 }
HRESULT hr
Definition: shlfolder.c:183
#define IID_PPV_ARG(Itype, ppType)
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1448
#define S_FALSE
Definition: winerror.h:2357
LONG HRESULT
Definition: typedefs.h:78
#define S_OK
Definition: intsafe.h:59
HWND buttons[5]
Definition: sndrec32.cpp:40
CComPtr< IShellBrowser > m_pShellBrowser
Definition: CDefView.cpp:76
CLSID m_Category
Definition: CDefView.cpp:111

Referenced by CreateViewWindow3().

◆ _PidlByItem() [1/2]

PCUITEMID_CHILD CDefView::_PidlByItem ( int  i)

Definition at line 761 of file CDefView.cpp.

762 {
763  return reinterpret_cast<PCUITEMID_CHILD>(m_ListView.GetItemData(i));
764 }
DWORD_PTR GetItemData(int i)
Definition: rosctrls.h:204
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
CListView m_ListView
Definition: CDefView.cpp:79

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

◆ _PidlByItem() [2/2]

PCUITEMID_CHILD CDefView::_PidlByItem ( LVITEM lvItem)

Definition at line 766 of file CDefView.cpp.

767 {
768  return reinterpret_cast<PCUITEMID_CHILD>(lvItem.lParam);
769 }

◆ _Sort()

BOOL CDefView::_Sort ( )
private

Definition at line 727 of file CDefView.cpp.

728 {
729  HWND hHeader;
730  HDITEM hColumn;
731 
732  if (m_ListView.GetWindowLongPtr(GWL_STYLE) & LVS_NOSORTHEADER)
733  return TRUE;
734 
735  hHeader = (HWND)m_ListView.SendMessage(LVM_GETHEADER, 0, 0);
736  ZeroMemory(&hColumn, sizeof(hColumn));
737 
738  /* If the sorting column changed, remove the sorting style from the old column */
739  if ( (m_sortInfo.nLastHeaderID != -1) &&
741  {
742  hColumn.mask = HDI_FORMAT;
743  Header_GetItem(hHeader, m_sortInfo.nLastHeaderID, &hColumn);
744  hColumn.fmt &= ~(HDF_SORTUP | HDF_SORTDOWN);
745  Header_SetItem(hHeader, m_sortInfo.nLastHeaderID, &hColumn);
746  }
747 
748  /* Set the sorting style to the new column */
749  hColumn.mask = HDI_FORMAT;
750  Header_GetItem(hHeader, m_sortInfo.nHeaderID, &hColumn);
751 
752  hColumn.fmt &= (m_sortInfo.bIsAscending ? ~HDF_SORTDOWN : ~HDF_SORTUP );
753  hColumn.fmt |= (m_sortInfo.bIsAscending ? HDF_SORTUP : HDF_SORTDOWN);
754  Header_SetItem(hHeader, m_sortInfo.nHeaderID, &hColumn);
755 
756  /* Sort the list, using the current values of nHeaderID and bIsAscending */
759 }
#define TRUE
Definition: types.h:120
static INT CALLBACK ListViewCompareItems(LPARAM lParam1, LPARAM lParam2, LPARAM lpData)
Definition: CDefView.cpp:711
HANDLE HWND
Definition: compat.h:13
#define ZeroMemory
Definition: winbase.h:1642
#define HDF_SORTUP
Definition: commctrl.h:720
#define HDITEM
Definition: commctrl.h:693
#define HDI_FORMAT
Definition: commctrl.h:701
#define Header_GetItem(hwndHD, i, phdi)
Definition: commctrl.h:747
CListView m_ListView
Definition: CDefView.cpp:79
LISTVIEW_SORT_INFO m_sortInfo
Definition: CDefView.cpp:91
#define HDF_SORTDOWN
Definition: commctrl.h:721
#define GWL_STYLE
Definition: winuser.h:846
#define LVM_GETHEADER
Definition: commctrl.h:2646
#define LVS_NOSORTHEADER
Definition: commctrl.h:2281
#define Header_SetItem(hwndHD, i, phdi)
Definition: commctrl.h:754
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 2833 of file CDefView.cpp.

2834 {
2835  TRACE("(%p)->(%p %p)\n", this, pidl, item);
2836  *item = LV_AddItem(pidl);
2837  return (int)*item >= 0 ? S_OK : E_OUTOFMEMORY;
2838 }
int LV_AddItem(PCUITEMID_CHILD pidl)
Definition: CDefView.cpp:794
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
static ATOM item
Definition: dde.c:856

◆ AddPropertySheetPages()

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

Implements IShellView.

Definition at line 2381 of file CDefView.cpp.

2382 {
2383  FIXME("(%p) stub\n", this);
2384 
2385  return E_NOTIMPL;
2386 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ArrangeGrid()

HRESULT STDMETHODCALLTYPE CDefView::ArrangeGrid ( )
virtual

Definition at line 2820 of file CDefView.cpp.

2821 {
2822  FIXME("(%p) stub\n", this);
2823  return E_NOTIMPL;
2824 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ AutoArrange()

HRESULT STDMETHODCALLTYPE CDefView::AutoArrange ( )
virtual

Definition at line 2826 of file CDefView.cpp.

2827 {
2828  m_ListView.ModifyStyle(0, LVS_AUTOARRANGE);
2830  return S_OK;
2831 }
BOOL Arrange(UINT nCode)
Definition: rosctrls.h:241
#define LVS_AUTOARRANGE
Definition: commctrl.h:2268
CListView m_ListView
Definition: CDefView.cpp:79
#define S_OK
Definition: intsafe.h:59
#define LVA_DEFAULT
Definition: commctrl.h:2523

Referenced by OnCommand().

◆ CheckToolbar()

void CDefView::CheckToolbar ( )

Definition at line 472 of file CDefView.cpp.

473 {
474  LRESULT result;
475 
476  TRACE("\n");
477 
478  if (m_pCommDlgBrowser != NULL)
479  {
480  m_pShellBrowser->SendControlMsg(FCW_TOOLBAR, TB_CHECKBUTTON,
482  m_pShellBrowser->SendControlMsg(FCW_TOOLBAR, TB_CHECKBUTTON,
484  m_pShellBrowser->SendControlMsg(FCW_TOOLBAR, TB_ENABLEBUTTON,
486  m_pShellBrowser->SendControlMsg(FCW_TOOLBAR, TB_ENABLEBUTTON,
488  }
489 }
#define TRUE
Definition: types.h:120
#define FCIDM_TB_REPORTVIEW
Definition: shresdef.h:782
FOLDERSETTINGS m_FolderSettings
Definition: CDefView.cpp:81
CComPtr< ICommDlgBrowser > m_pCommDlgBrowser
Definition: CDefView.cpp:77
#define TB_ENABLEBUTTON
Definition: commctrl.h:1038
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define TB_CHECKBUTTON
Definition: commctrl.h:1039
#define FCIDM_TB_SMALLICON
Definition: shresdef.h:781
CComPtr< IShellBrowser > m_pShellBrowser
Definition: CDefView.cpp:76
LONG_PTR LRESULT
Definition: windef.h:209
GLuint64EXT * result
Definition: glext.h:11304

Referenced by CreateViewWindow3(), and OnCommand().

◆ CheckViewMode()

HRESULT CDefView::CheckViewMode ( HMENU  hmenuView)

Definition at line 1297 of file CDefView.cpp.

1298 {
1300  {
1301  UINT iItemFirst = FCIDM_SHVIEW_BIGICON;
1302  UINT iItemLast = iItemFirst + FVM_LAST - FVM_FIRST;
1303  UINT iItem = iItemFirst + m_FolderSettings.ViewMode - FVM_FIRST;
1304  CheckMenuRadioItem(hmenuView, iItemFirst, iItemLast, iItem, MF_BYCOMMAND);
1305  }
1306 
1307  return S_OK;
1308 }
#define MF_BYCOMMAND
Definition: winuser.h:202
FOLDERSETTINGS m_FolderSettings
Definition: CDefView.cpp:81
BOOL WINAPI CheckMenuRadioItem(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT, _In_ UINT)
#define FCIDM_SHVIEW_BIGICON
Definition: shresdef.h:761
#define S_OK
Definition: intsafe.h:59
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 2233 of file CDefView.cpp.

2234 {
2235  FIXME("(%p) stub\n", this);
2236 
2237  return E_NOTIMPL;
2238 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ CreateList()

BOOL CDefView::CreateList ( )

Definition at line 521 of file CDefView.cpp.

522 {
523  HRESULT hr;
524  DWORD dwStyle, dwExStyle;
525  UINT ViewMode;
526 
527  TRACE("%p\n", this);
528 
531  dwExStyle = WS_EX_CLIENTEDGE;
532 
534  dwStyle |= LVS_ALIGNLEFT;
535  else
536  dwStyle |= LVS_ALIGNTOP | LVS_SHOWSELALWAYS;
537 
538  ViewMode = m_FolderSettings.ViewMode;
540  if (SUCCEEDED(hr))
541  {
542  if (ViewMode >= FVM_FIRST && ViewMode <= FVM_LAST)
543  m_FolderSettings.ViewMode = ViewMode;
544  else
545  ERR("Ignoring invalid ViewMode from SFVM_DEFVIEWMODE: %u (was: %u)\n", ViewMode, m_FolderSettings.ViewMode);
546  }
547 
548  switch (m_FolderSettings.ViewMode)
549  {
550  case FVM_ICON:
551  dwStyle |= LVS_ICON;
552  break;
553 
554  case FVM_DETAILS:
555  dwStyle |= LVS_REPORT;
556  break;
557 
558  case FVM_SMALLICON:
559  dwStyle |= LVS_SMALLICON;
560  break;
561 
562  case FVM_LIST:
563  dwStyle |= LVS_LIST;
564  break;
565 
566  default:
567  dwStyle |= LVS_LIST;
568  break;
569  }
570 
572  dwStyle |= LVS_AUTOARRANGE;
573 
576 
578  dwStyle |= LVS_SINGLESEL;
579 
581  dwExStyle &= ~WS_EX_CLIENTEDGE;
582 
583  RECT rcListView = {0,0,0,0};
584  m_ListView.Create(m_hWnd, rcListView, L"FolderView", dwStyle, dwExStyle, ID_LISTVIEW);
585 
586  if (!m_ListView)
587  return FALSE;
588 
590  m_sortInfo.nHeaderID = -1;
592 
593  /* UpdateShellSettings(); */
594  return TRUE;
595 }
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define TRUE
Definition: types.h:120
HRESULT hr
Definition: shlfolder.c:183
#define LVS_SHOWSELALWAYS
Definition: commctrl.h:2263
FOLDERSETTINGS m_FolderSettings
Definition: CDefView.cpp:81
#define LVS_REPORT
Definition: commctrl.h:2258
#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:2266
#define LVS_ALIGNLEFT
Definition: commctrl.h:2276
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define LVS_AUTOARRANGE
Definition: commctrl.h:2268
CListView m_ListView
Definition: CDefView.cpp:79
#define LVS_LIST
Definition: commctrl.h:2260
#define WS_CHILDWINDOW
Definition: pedump.c:639
#define TRACE(s)
Definition: solgame.cpp:4
LISTVIEW_SORT_INFO m_sortInfo
Definition: CDefView.cpp:91
LONG HRESULT
Definition: typedefs.h:78
#define LVS_SINGLESEL
Definition: commctrl.h:2262
unsigned long DWORD
Definition: ntddk_ex.h:95
#define LVS_ICON
Definition: commctrl.h:2257
#define SFVM_DEFVIEWMODE
Definition: shlobj.h:1244
static const WCHAR L[]
Definition: oid.c:1250
HWND m_hWnd
Definition: atlwin.h:268
#define WS_TABSTOP
Definition: pedump.c:634
#define ERR(fmt,...)
Definition: debug.h:109
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
#define LVS_EDITLABELS
Definition: commctrl.h:2269
unsigned int UINT
Definition: ndis.h:50
#define WS_VISIBLE
Definition: pedump.c:620
#define ID_LISTVIEW
Definition: CDefView.cpp:356
#define LVS_SMALLICON
Definition: commctrl.h:2259
#define SUCCEEDED(hr)
Definition: intsafe.h:57
HRESULT _DoFolderViewCB(UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: CDefView.cpp:3437
#define LVS_ALIGNTOP
Definition: commctrl.h:2275

Referenced by OnCreate().

◆ CreateViewWindow()

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

Implements IShellView.

Definition at line 2316 of file CDefView.cpp.

2317 {
2318  return CreateViewWindow3(psb, lpPrevView, SV3CVW3_DEFAULT,
2319  (FOLDERFLAGS)lpfs->fFlags, (FOLDERFLAGS)lpfs->fFlags, (FOLDERVIEWMODE)lpfs->ViewMode, NULL, prcView, phWnd);
2320 }
smooth NULL
Definition: ftsmooth.c:416
FOLDERVIEWMODE
Definition: shobjidl.idl:663
FOLDERFLAGS
Definition: shobjidl.idl:627
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:2713

◆ CreateViewWindow2()

HRESULT STDMETHODCALLTYPE CDefView::CreateViewWindow2 ( LPSV2CVW2_PARAMS  view_params)
virtual

Implements IShellView2.

Definition at line 2706 of file CDefView.cpp.

2707 {
2708  return CreateViewWindow3(view_params->psbOwner, view_params->psvPrev,
2709  SV3CVW3_DEFAULT, (FOLDERFLAGS)view_params->pfs->fFlags, (FOLDERFLAGS)view_params->pfs->fFlags,
2710  (FOLDERVIEWMODE)view_params->pfs->ViewMode, view_params->pvid, view_params->prcView, &view_params->hwndView);
2711 }
FOLDERVIEWMODE
Definition: shobjidl.idl:663
FOLDERFLAGS
Definition: shobjidl.idl:627
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:2713

◆ 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 2713 of file CDefView.cpp.

2714 {
2715  OLEMENUGROUPWIDTHS omw = { { 0, 0, 0, 0, 0, 0 } };
2716 
2717  *hwnd = NULL;
2718 
2719  TRACE("(%p)->(shlview=%p shlbrs=%p rec=%p hwnd=%p vmode=%x flags=%x)\n", this, psvPrevious, psb, prcView, hwnd, mode, flags);
2720  if (prcView != NULL)
2721  TRACE("-- left=%i top=%i right=%i bottom=%i\n", prcView->left, prcView->top, prcView->right, prcView->bottom);
2722 
2723  /* Validate the Shell Browser */
2724  if (psb == NULL || m_hWnd)
2725  return E_UNEXPECTED;
2726 
2727  if (view_flags != SV3CVW3_DEFAULT)
2728  FIXME("unsupported view flags 0x%08x\n", view_flags);
2729 
2730  /* Set up the member variables */
2731  m_pShellBrowser = psb;
2734 
2735  if (view_id)
2736  {
2737  if (IsEqualIID(*view_id, VID_LargeIcons))
2739  else if (IsEqualIID(*view_id, VID_SmallIcons))
2741  else if (IsEqualIID(*view_id, VID_List))
2743  else if (IsEqualIID(*view_id, VID_Details))
2745  else if (IsEqualIID(*view_id, VID_Thumbnails))
2747  else if (IsEqualIID(*view_id, VID_Tile))
2749  else if (IsEqualIID(*view_id, VID_ThumbStrip))
2751  else
2752  FIXME("Ignoring unrecognized VID %s\n", debugstr_guid(view_id));
2753  }
2754 
2755  /* Get our parent window */
2756  m_pShellBrowser->GetWindow(&m_hWndParent);
2757 
2758  /* Try to get the ICommDlgBrowserInterface, adds a reference !!! */
2761  {
2762  TRACE("-- CommDlgBrowser\n");
2763  }
2764 
2766  if (m_hWnd == NULL)
2767  return E_FAIL;
2768 
2769  *hwnd = m_hWnd;
2770 
2771  CheckToolbar();
2772 
2773  if (!*hwnd)
2774  return E_FAIL;
2775 
2777 
2779  UpdateWindow();
2780 
2781  if (!m_hMenu)
2782  {
2783  m_hMenu = CreateMenu();
2784  m_pShellBrowser->InsertMenusSB(m_hMenu, &omw);
2785  TRACE("-- after fnInsertMenusSB\n");
2786  }
2787 
2788  _MergeToolbar();
2789 
2790  return S_OK;
2791 }
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
HMENU WINAPI CreateMenu(void)
Definition: menu.c:837
FOLDERSETTINGS m_FolderSettings
Definition: CDefView.cpp:81
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:1631
#define U(x)
Definition: wordpad.c:46
CComPtr< ICommDlgBrowser > m_pCommDlgBrowser
Definition: CDefView.cpp:77
BOOL SetWindowPos(HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags)
Definition: atlwin.h:1220
LONG top
Definition: windef.h:307
#define HWND_TOP
Definition: winuser.h:1193
UINT_PTR WPARAM
Definition: windef.h:207
#define WS_CHILD
Definition: pedump.c:617
HMENU m_hMenu
Definition: CDefView.cpp:82
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
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
HRESULT _MergeToolbar()
Definition: CDefView.cpp:3402
#define debugstr_guid
Definition: kernel32.h:35
HWND m_hWndParent
Definition: CDefView.cpp:80
#define TRACE(s)
Definition: solgame.cpp:4
#define SFVM_WINDOWCREATED
Definition: shlobj.h:1234
BOOL UpdateWindow()
Definition: atlwin.h:1277
void CheckToolbar()
Definition: CDefView.cpp:472
GLbitfield flags
Definition: glext.h:7161
HWND m_hWnd
Definition: atlwin.h:268
#define WS_TABSTOP
Definition: pedump.c:634
GLenum mode
Definition: glext.h:6217
#define SWP_NOSIZE
Definition: winuser.h:1230
#define S_OK
Definition: intsafe.h:59
#define SWP_SHOWWINDOW
Definition: winuser.h:1233
#define E_UNEXPECTED
Definition: winerror.h:2456
CComPtr< IShellBrowser > m_pShellBrowser
Definition: CDefView.cpp:76
LONG bottom
Definition: windef.h:309
#define SWP_NOMOVE
Definition: winuser.h:1229
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define SUCCEEDED(hr)
Definition: intsafe.h:57
HRESULT _DoFolderViewCB(UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: CDefView.cpp:3437

Referenced by CreateViewWindow(), and CreateViewWindow2().

◆ DefMessageSFVCB()

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

Definition at line 3430 of file CDefView.cpp.

3431 {
3432  // TODO: SFVM_GET_CUSTOMVIEWINFO, SFVM_WINDOWCREATED
3433  TRACE("CDefView::DefMessageSFVCB uMsg=%u\n", uMsg);
3434  return E_NOTIMPL;
3435 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

Referenced by _DoFolderViewCB().

◆ DestroyViewWindow()

HRESULT WINAPI CDefView::DestroyViewWindow ( )
virtual

Implements IShellView.

Definition at line 2322 of file CDefView.cpp.

2323 {
2324  TRACE("(%p)\n", this);
2325 
2326  /* Make absolutely sure all our UI is cleaned up */
2328 
2329  if (m_hAccel)
2330  {
2331  // "Accelerator tables loaded from resources are freed automatically when the application terminates." -- MSDN
2332  m_hAccel = NULL;
2333  }
2334 
2335  if (m_hMenuArrangeModes)
2336  {
2339  }
2340 
2341  if (m_hMenuViewModes)
2342  {
2345  }
2346 
2347  if (m_hMenu)
2348  {
2350  m_hMenu = NULL;
2351  }
2352 
2353  if (m_ListView)
2354  {
2355  m_ListView.DestroyWindow();
2356  }
2357 
2358  if (m_hWnd)
2359  {
2360  DestroyWindow();
2361  }
2362 
2365 
2366  return S_OK;
2367 }
HMENU m_hMenuArrangeModes
Definition: CDefView.cpp:83
HACCEL m_hAccel
Definition: CDefView.cpp:93
CComPtr< ICommDlgBrowser > m_pCommDlgBrowser
Definition: CDefView.cpp:77
HMENU m_hMenu
Definition: CDefView.cpp:82
virtual HRESULT STDMETHODCALLTYPE UIActivate(UINT uState)
Definition: CDefView.cpp:2269
smooth NULL
Definition: ftsmooth.c:416
CListView m_ListView
Definition: CDefView.cpp:79
#define TRACE(s)
Definition: solgame.cpp:4
HWND m_hWnd
Definition: atlwin.h:268
BOOL DestroyWindow()
Definition: atlwin.h:428
BOOL WINAPI DestroyMenu(_In_ HMENU)
#define S_OK
Definition: intsafe.h:59
void Release()
Definition: atlcomcli.h:140
HMENU m_hMenuViewModes
Definition: CDefView.cpp:84
CComPtr< IShellBrowser > m_pShellBrowser
Definition: CDefView.cpp:76

Referenced by ~CDefView().

◆ DoActivate()

void CDefView::DoActivate ( UINT  uState)

Definition at line 1604 of file CDefView.cpp.

1605 {
1606  TRACE("%p uState=%x\n", this, uState);
1607 
1608  /*don't do anything if the state isn't really changing */
1609  if (m_uState == uState)
1610  {
1611  return;
1612  }
1613 
1614  if (uState == SVUIA_DEACTIVATE)
1615  {
1616  OnDeactivate();
1617  }
1618  else
1619  {
1621  {
1622  FillEditMenu();
1623  FillViewMenu();
1624  m_pShellBrowser->SetMenuSB(m_hMenu, 0, m_hWnd);
1626  }
1627 
1628  if (SVUIA_ACTIVATE_FOCUS == uState)
1629  {
1630  m_ListView.SetFocus();
1631  }
1632  }
1633 
1634  m_uState = uState;
1635  TRACE("--\n");
1636 }
HRESULT FillViewMenu()
Definition: CDefView.cpp:1250
HRESULT FillEditMenu()
Definition: CDefView.cpp:1233
#define TRUE
Definition: types.h:120
HMENU m_hMenu
Definition: CDefView.cpp:82
CListView m_ListView
Definition: CDefView.cpp:79
#define TRACE(s)
Definition: solgame.cpp:4
UINT m_uState
Definition: CDefView.cpp:87
BOOL m_bmenuBarInitialized
Definition: CDefView.cpp:86
HWND m_hWnd
Definition: atlwin.h:268
CComPtr< IShellBrowser > m_pShellBrowser
Definition: CDefView.cpp:76
void OnDeactivate()
Definition: CDefView.cpp:1592

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

◆ drag_notify_subitem()

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

Definition at line 3101 of file CDefView.cpp.

3102 {
3103  LONG lResult;
3104  HRESULT hr;
3105  RECT clientRect;
3106 
3107  /* The key state on drop doesn't have MK_LBUTTON or MK_RBUTTON because it
3108  reflects the key state after the user released the button, so we need
3109  to remember the last key state when the button was pressed */
3110  m_grfKeyState = grfKeyState;
3111 
3112  /* Map from global to client coordinates and query the index of the listview-item, which is
3113  * currently under the mouse cursor. */
3114  LVHITTESTINFO htinfo = {{pt.x, pt.y}, LVHT_ONITEM};
3115  ScreenToClient(&htinfo.pt);
3116  lResult = m_ListView.HitTest(&htinfo);
3117 
3118  /* Send WM_*SCROLL messages every 250 ms during drag-scrolling */
3119  ::GetClientRect(m_ListView, &clientRect);
3120  if (htinfo.pt.x == m_ptLastMousePos.x && htinfo.pt.y == m_ptLastMousePos.y &&
3121  (htinfo.pt.x < SCROLLAREAWIDTH || htinfo.pt.x > clientRect.right - SCROLLAREAWIDTH ||
3122  htinfo.pt.y < SCROLLAREAWIDTH || htinfo.pt.y > clientRect.bottom - SCROLLAREAWIDTH ))
3123  {
3124  m_cScrollDelay = (m_cScrollDelay + 1) % 5; /* DragOver is called every 50 ms */
3125  if (m_cScrollDelay == 0)
3126  {
3127  /* Mouse did hover another 250 ms over the scroll-area */
3128  if (htinfo.pt.x < SCROLLAREAWIDTH)
3129  m_ListView.SendMessageW(WM_HSCROLL, SB_LINEUP, 0);
3130 
3131  if (htinfo.pt.x > clientRect.right - SCROLLAREAWIDTH)
3132  m_ListView.SendMessageW(WM_HSCROLL, SB_LINEDOWN, 0);
3133 
3134  if (htinfo.pt.y < SCROLLAREAWIDTH)
3135  m_ListView.SendMessageW(WM_VSCROLL, SB_LINEUP, 0);
3136 
3137  if (htinfo.pt.y > clientRect.bottom - SCROLLAREAWIDTH)
3138  m_ListView.SendMessageW(WM_VSCROLL, SB_LINEDOWN, 0);
3139  }
3140  }
3141  else
3142  {
3143  m_cScrollDelay = 0; /* Reset, if the cursor is not over the listview's scroll-area */
3144  }
3145 
3146  m_ptLastMousePos = htinfo.pt;
3147 
3148  /* We need to check if we drag the selection over itself */
3149  if (lResult != -1 && m_pSourceDataObject.p != NULL)
3150  {
3151  PCUITEMID_CHILD pidl = _PidlByItem(lResult);
3152 
3153  for (UINT i = 0; i < m_cidl; i++)
3154  {
3155  if (pidl == m_apidl[i])
3156  {
3157  /* The item that is being draged is hovering itself. */
3158  lResult = -1;
3159  break;
3160  }
3161  }
3162  }
3163 
3164  /* If we are still over the previous sub-item, notify it via DragOver and return. */
3165  if (m_pCurDropTarget && lResult == m_iDragOverItem)
3166  return m_pCurDropTarget->DragOver(grfKeyState, pt, pdwEffect);
3167 
3168  /* We've left the previous sub-item, notify it via DragLeave and Release it. */
3169  if (m_pCurDropTarget)
3170  {
3172  if (pidl)
3173  SelectItem(pidl, 0);
3174 
3175  m_pCurDropTarget->DragLeave();
3177  }
3178 
3179  m_iDragOverItem = lResult;
3180 
3181  if (lResult == -1)
3182  {
3183  /* We are not above one of the listview's subitems. Bind to the parent folder's
3184  * DropTarget interface. */
3185  hr = m_pSFParent->CreateViewObject(NULL, IID_PPV_ARG(IDropTarget,&m_pCurDropTarget));
3186  }
3187  else
3188  {
3189  /* Query the relative PIDL of the shellfolder object represented by the currently
3190  * dragged over listview-item ... */
3191  PCUITEMID_CHILD pidl = _PidlByItem(lResult);
3192 
3193  /* ... and bind m_pCurDropTarget to the IDropTarget interface of an UIObject of this object */
3194  hr = m_pSFParent->GetUIObjectOf(m_ListView, 1, &pidl, IID_NULL_PPV_ARG(IDropTarget, &m_pCurDropTarget));
3195  }
3196 
3198 
3199  /* If anything failed, m_pCurDropTarget should be NULL now, which ought to be a save state. */
3200  if (FAILED(hr))
3201  {
3202  *pdwEffect = DROPEFFECT_NONE;
3203  return hr;
3204  }
3205 
3206  if (m_iDragOverItem != -1)
3207  {
3208  SelectItem(m_iDragOverItem, SVSI_SELECT);
3209  }
3210 
3211  /* Notify the item just entered via DragEnter. */
3212  return m_pCurDropTarget->DragEnter(m_pCurDataObject, grfKeyState, pt, pdwEffect);
3213 }
UINT m_cScrollDelay
Definition: CDefView.cpp:102
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:761
const ITEMID_CHILD UNALIGNED * PCUITEMID_CHILD
Definition: shtypes.idl:70
#define LVHT_ONITEM
Definition: commctrl.h:2493
LONG right
Definition: windef.h:308
#define IID_PPV_ARG(Itype, ppType)
const DWORD DROPEFFECT_NONE
Definition: oleidl.idl:929
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
long LONG
Definition: pedump.c:60
CComPtr< IDataObject > m_pCurDataObject
Definition: CDefView.cpp:100
virtual HRESULT STDMETHODCALLTYPE SelectItem(PCUITEMID_CHILD pidlItem, SVSIF uFlags)
HRESULT WINAPI IUnknown_SetSite(IUnknown *obj, IUnknown *site)
Definition: ordinal.c:1358
BOOL GetClientRect(LPRECT lpRect) const
Definition: atlwin.h:507
smooth NULL
Definition: ftsmooth.c:416
CListView m_ListView
Definition: CDefView.cpp:79
#define SCROLLAREAWIDTH
Definition: CDefView.cpp:3099
CComPtr< IDataObject > m_pSourceDataObject
Definition: CDefView.cpp:98
#define IID_NULL_PPV_ARG(Itype, ppType)
LONG HRESULT
Definition: typedefs.h:78
LONG m_iDragOverItem
Definition: CDefView.cpp:101
POINT m_ptLastMousePos
Definition: CDefView.cpp:103
BOOL ScreenToClient(LPPOINT lpPoint) const
Definition: atlwin.h:1024
CComPtr< IShellFolder > m_pSFParent
Definition: CDefView.cpp:73
CComPtr< IDropTarget > m_pCurDropTarget
Definition: CDefView.cpp:99
PCUITEMID_CHILD * m_apidl
Definition: CDefView.cpp:89
DWORD m_grfKeyState
Definition: CDefView.cpp:105
void Release()
Definition: atlcomcli.h:140
unsigned int UINT
Definition: ndis.h:50
#define SB_LINEDOWN
Definition: winuser.h:565
#define WM_HSCROLL
Definition: winuser.h:1725
#define SB_LINEUP
Definition: winuser.h:564
LONG bottom
Definition: windef.h:309
UINT m_cidl
Definition: CDefView.cpp:88
#define WM_VSCROLL
Definition: winuser.h:1726
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 3215 of file CDefView.cpp.

3216 {
3217  if (*pdwEffect == DROPEFFECT_NONE)
3218  return S_OK;
3219 
3220  /* Get a hold on the data object for later calls to DragEnter on the sub-folders */
3221  m_pCurDataObject = pDataObject;
3222 
3223  HRESULT hr = drag_notify_subitem(grfKeyState, pt, pdwEffect);
3224  if (SUCCEEDED(hr))
3225  {
3226  POINT ptClient = {pt.x, pt.y};
3227  ScreenToClient(&ptClient);
3228  ImageList_DragEnter(m_hWnd, ptClient.x, ptClient.y);
3229  }
3230 
3231  return hr;
3232 }
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:100
LONG HRESULT
Definition: typedefs.h:78
BOOL ScreenToClient(LPPOINT lpPoint) const
Definition: atlwin.h:1024
HWND m_hWnd
Definition: atlwin.h:268
#define S_OK
Definition: intsafe.h:59
HRESULT drag_notify_subitem(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
Definition: CDefView.cpp:3101
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ DragLeave()

HRESULT WINAPI CDefView::DragLeave ( void  )
virtual

Implements IDropTarget.

Definition at line 3242 of file CDefView.cpp.

3243 {
3245 
3246  if (m_pCurDropTarget)
3247  {
3248  m_pCurDropTarget->DragLeave();
3250  }
3251 
3252  if (m_pCurDataObject != NULL)
3253  {
3255  }
3256 
3257  m_iDragOverItem = 0;
3258 
3259  return S_OK;
3260 }
CComPtr< IDataObject > m_pCurDataObject
Definition: CDefView.cpp:100
smooth NULL
Definition: ftsmooth.c:416
LONG m_iDragOverItem
Definition: CDefView.cpp:101
HWND m_hWnd
Definition: atlwin.h:268
CComPtr< IDropTarget > m_pCurDropTarget
Definition: CDefView.cpp:99
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI ImageList_DragLeave(HWND hwndLock)
Definition: imagelist.c:992
void Release()
Definition: atlcomcli.h:140

◆ DragOver()

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

Implements IDropTarget.

Definition at line 3234 of file CDefView.cpp.

3235 {
3236  POINT ptClient = {pt.x, pt.y};
3237  ScreenToClient(&ptClient);
3238  ImageList_DragMove(ptClient.x, ptClient.y);
3239  return drag_notify_subitem(grfKeyState, pt, pdwEffect);
3240 }
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:1024
HRESULT drag_notify_subitem(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
Definition: CDefView.cpp:3101

◆ 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 3333 of file CDefView.cpp.

3334 {
3335  FIXME("Stub: this=%p\n", this);
3336 
3337  return E_NOTIMPL;
3338 }
#define FIXME(fmt,...)
Definition: debug.h:110
#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 3262 of file CDefView.cpp.

3263 {
3266 
3267  if ((IsDropOnSource(NULL) == S_OK) &&
3268  (*pdwEffect & DROPEFFECT_MOVE) &&
3270  {
3271  if (m_pCurDropTarget)
3272  {
3273  m_pCurDropTarget->DragLeave();
3275  }
3276 
3277  /* Restore the selection */
3279  for (UINT i = 0 ; i < m_cidl; i++)
3280  SelectItem(m_apidl[i], SVSI_SELECT);
3281 
3282  /* Reposition the items */
3283  int lvIndex = -1;
3284  while ((lvIndex = m_ListView.GetNextItem(lvIndex, LVNI_SELECTED)) > -1)
3285  {
3286  POINT ptItem;
3287  if (m_ListView.GetItemPosition(lvIndex, &ptItem))
3288  {
3289  ptItem.x += pt.x - m_ptFirstMousePos.x;
3290  ptItem.y += pt.y - m_ptFirstMousePos.y;
3291  m_ListView.SetItemPosition(lvIndex, &ptItem);
3292  }
3293  }
3294  }
3295  else if (m_pCurDropTarget)
3296  {
3297  m_pCurDropTarget->Drop(pDataObject, grfKeyState, pt, pdwEffect);
3299  }
3300 
3302  m_iDragOverItem = 0;
3303  return S_OK;
3304 }
POINT m_ptFirstMousePos
Definition: CDefView.cpp:104
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
#define MK_LBUTTON
Definition: winuser.h:2342
#define pt(x, y)
Definition: drawing.c:79
int GetNextItem(int i, WORD flags)
Definition: rosctrls.h:161
#define LVNI_SELECTED
Definition: commctrl.h:2420
VOID WINAPI ImageList_EndDrag(void)
Definition: imagelist.c:1847
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
CComPtr< IDataObject > m_pCurDataObject
Definition: CDefView.cpp:100
BOOL GetItemPosition(int nItem, POINT *pPoint)
Definition: rosctrls.h:231
virtual HRESULT STDMETHODCALLTYPE SelectItem(PCUITEMID_CHILD pidlItem, SVSIF uFlags)
smooth NULL
Definition: ftsmooth.c:416
#define LVIS_SELECTED
Definition: commctrl.h:2315
CListView m_ListView
Definition: CDefView.cpp:79
LONG m_iDragOverItem
Definition: CDefView.cpp:101
virtual HRESULT STDMETHODCALLTYPE IsDropOnSource(IDropTarget *drop_target)
Definition: CDefView.cpp:2924
HWND m_hWnd
Definition: atlwin.h:268
CComPtr< IDropTarget > m_pCurDropTarget
Definition: CDefView.cpp:99
PCUITEMID_CHILD * m_apidl
Definition: CDefView.cpp:89
#define S_OK
Definition: intsafe.h:59
DWORD m_grfKeyState
Definition: CDefView.cpp:105
void SetItemState(int i, UINT state, UINT mask)
Definition: rosctrls.h:178
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
unsigned int UINT
Definition: ndis.h:50
UINT m_cidl
Definition: CDefView.cpp:88

◆ EnableModeless()

HRESULT WINAPI CDefView::EnableModeless ( BOOL  fEnable)
virtual

Implements IShellView.

Definition at line 2262 of file CDefView.cpp.

2263 {
2264  FIXME("(%p) stub\n", this);
2265 
2266  return E_NOTIMPL;
2267 }
#define FIXME(fmt,...)
Definition: debug.h:110
#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 3038 of file CDefView.cpp.

3039 {
3040  FIXME("(%p)->(\n\tTarget GUID:%s Command:0x%08x Opt:0x%08x %p %p)\n",
3041  this, debugstr_guid(pguidCmdGroup), nCmdID, nCmdexecopt, pvaIn, pvaOut);
3042 
3043  if (!pguidCmdGroup)
3044  return OLECMDERR_E_UNKNOWNGROUP;
3045 
3046  if (IsEqualCLSID(*pguidCmdGroup, m_Category))
3047  {
3048  if (nCmdID == FCIDM_SHVIEW_AUTOARRANGE)
3049  {
3050  if (V_VT(pvaIn) != VT_INT_PTR)
3051  return OLECMDERR_E_NOTSUPPORTED;
3052 
3053  TPMPARAMS params;
3054  params.cbSize = sizeof(params);
3055  params.rcExclude = *(RECT*) V_INTREF(pvaIn);
3056 
3057  if (m_hMenuViewModes)
3058  {
3059  /* Duplicate all but the last two items of the view modes menu */
3060  HMENU hmenuViewPopup = CreatePopupMenu();
3061  Shell_MergeMenus(hmenuViewPopup, m_hMenuViewModes, 0, 0, 0xFFFF, 0);
3062  DeleteMenu(hmenuViewPopup, GetMenuItemCount(hmenuViewPopup) - 1, MF_BYPOSITION);
3063  DeleteMenu(hmenuViewPopup, GetMenuItemCount(hmenuViewPopup) - 1, MF_BYPOSITION);
3064  CheckViewMode(hmenuViewPopup);
3065  TrackPopupMenuEx(hmenuViewPopup, TPM_LEFTALIGN | TPM_TOPALIGN, params.rcExclude.left, params.rcExclude.bottom, m_hWndParent, &params);
3066  ::DestroyMenu(hmenuViewPopup);
3067  }
3068 
3069  // pvaOut is VT_I4 with value 0x403 (cmd id of the new mode maybe?)
3070  V_VT(pvaOut) = VT_I4;
3071  V_I4(pvaOut) = 0x403;
3072  }
3073  }
3074 
3075  if (IsEqualIID(*pguidCmdGroup, CGID_Explorer) &&
3076  (nCmdID == 0x29) &&
3077  (nCmdexecopt == 4) && pvaOut)
3078  return S_OK;
3079 
3080  if (IsEqualIID(*pguidCmdGroup, CGID_ShellDocView) &&
3081  (nCmdID == 9) &&
3082  (nCmdexecopt == 0))
3083  return 1;
3084 
3085  return OLECMDERR_E_UNKNOWNGROUP;
3086 }
Definition: compat.h:1947
UINT WINAPI Shell_MergeMenus(HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags)
Definition: shlmenu.c:857
#define FCIDM_SHVIEW_AUTOARRANGE
Definition: shresdef.h:766
#define TPM_LEFTALIGN
Definition: winuser.h:2352
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:2358
#define FIXME(fmt,...)
Definition: debug.h:110
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
HRESULT CheckViewMode(HMENU hmenuView)
Definition: CDefView.cpp:1297
#define debugstr_guid
Definition: kernel32.h:35
#define V_INTREF(A)
Definition: oleauto.h:252
HWND m_hWndParent
Definition: CDefView.cpp:80
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:59
HMENU WINAPI CreatePopupMenu(void)
Definition: menu.c:846
HMENU m_hMenuViewModes
Definition: CDefView.cpp:84
#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:111

◆ fill_list()

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

Definition at line 891 of file CDefView.cpp.

892 {
893  PITEMID_CHILD pidl = static_cast<PITEMID_CHILD>(ptr);
894  CDefView *pThis = static_cast<CDefView *>(arg);
895 
896  /* in a commdlg This works as a filemask*/
897  if (pThis->IncludeObject(pidl) == S_OK)
898  pThis->LV_AddItem(pidl);
899 
900  SHFree(pidl);
901  return TRUE;
902 }
int LV_AddItem(PCUITEMID_CHILD pidl)
Definition: CDefView.cpp:794
#define TRUE
Definition: types.h:120
static PVOID ptr
Definition: dispmode.c:27
HRESULT IncludeObject(PCUITEMID_CHILD pidl)
Definition: CDefView.cpp:425
#define S_OK
Definition: intsafe.h:59
void WINAPI SHFree(LPVOID pv)
Definition: shellole.c:331

Referenced by FillList().

◆ FillArrangeAsMenu()

HRESULT CDefView::FillArrangeAsMenu ( HMENU  hmenuArrange)

Definition at line 1266 of file CDefView.cpp.

1267 {
1268  /* We only need to fill this once */
1269  if (GetMenuItemID(hmenuArrange, 0) == FCIDM_SHVIEW_AUTOARRANGE)
1270  {
1271  Shell_MergeMenus(hmenuArrange, m_hMenuArrangeModes, 0, 0, 0xFFFF,0);
1272  }
1273 
1274  /* Also check the menu item according to which we sort */
1275  CheckMenuRadioItem(hmenuArrange,
1276  0x30,
1277  0x100,
1278  m_sortInfo.nHeaderID + 0x30,
1279  MF_BYCOMMAND);
1280 
1282  {
1284  }
1285  else
1286  {
1288 
1289  if (GetAutoArrange() == S_OK)
1291  }
1292 
1293 
1294  return S_OK;
1295 }
HMENU m_hMenuArrangeModes
Definition: CDefView.cpp:83
virtual HRESULT STDMETHODCALLTYPE GetAutoArrange()
Definition: CDefView.cpp:2641
#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:857
#define FCIDM_SHVIEW_AUTOARRANGE
Definition: shresdef.h:766
FOLDERSETTINGS m_FolderSettings
Definition: CDefView.cpp:81
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:91
DWORD WINAPI CheckMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define S_OK
Definition: intsafe.h:59
UINT WINAPI GetMenuItemID(_In_ HMENU, _In_ int)
#define MF_GRAYED
Definition: winuser.h:129

Referenced by OnInitMenuPopup().

◆ FillEditMenu()

HRESULT CDefView::FillEditMenu ( )

Definition at line 1233 of file CDefView.cpp.

1234 {
1236  if (!hEditMenu)
1237  return E_FAIL;
1238 
1239  HMENU hmenuContents = ::LoadMenuW(shell32_hInstance, L"MENU_003");
1240  if (!hmenuContents)
1241  return E_FAIL;
1242 
1243  Shell_MergeMenus(hEditMenu, hmenuContents, 0, 0, 0xFFFF, 0);
1244 
1245  ::DestroyMenu(hmenuContents);
1246 
1247  return S_OK;
1248 }
UINT WINAPI Shell_MergeMenus(HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags)
Definition: shlmenu.c:857
HMENU m_hMenu
Definition: CDefView.cpp:82
#define E_FAIL
Definition: ddrawi.h:102
#define FCIDM_MENU_EDIT
Definition: shlobj.h:557
HINSTANCE shell32_hInstance
Definition: misc.cpp:82
static const WCHAR L[]
Definition: oid.c:1250
BOOL WINAPI DestroyMenu(_In_ HMENU)
HMENU GetSubmenuByID(HMENU hmenu, UINT id)
Definition: CDefView.cpp:1176
#define S_OK
Definition: intsafe.h:59
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 1196 of file CDefView.cpp.

1197 {
1199  if (!hFileMenu)
1200  return E_FAIL;
1201 
1202  /* Cleanup the items added previously */
1203  for (int i = GetMenuItemCount(hFileMenu) - 1; i >= 0; i--)
1204  {
1205  UINT id = GetMenuItemID(hFileMenu, i);
1207  DeleteMenu(hFileMenu, i, MF_BYPOSITION);
1208  }
1209 
1211 
1212  /* Store the context menu in m_pCM and keep it in order to invoke the selected command later on */
1215  if (FAILED_UNEXPECTEDLY(hr))
1216  return hr;
1217 
1219 
1220  hr = m_pCM->QueryContextMenu(hmenu, 0, FCIDM_SHVIEWFIRST, FCIDM_SHVIEWLAST, 0);
1221  if (FAILED_UNEXPECTEDLY(hr))
1222  return hr;
1223 
1224  // TODO: filter or something
1225 
1226  Shell_MergeMenus(hFileMenu, hmenu, 0, 0, 0xFFFF, MM_ADDSEPARATOR | MM_SUBMENUSHAVEIDS);
1227 
1229 
1230  return S_OK;
1231 }
UINT WINAPI Shell_MergeMenus(HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags)
Definition: shlmenu.c:857
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:82
virtual HRESULT STDMETHODCALLTYPE GetItemObject(UINT uItem, REFIID riid, void **ppv)
Definition: CDefView.cpp:2445
#define IID_PPV_ARG(Itype, ppType)
#define E_FAIL
Definition: ddrawi.h:102
#define FCIDM_BROWSERLAST
Definition: shlobj.h:549
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
#define MF_BYPOSITION
Definition: winuser.h:203
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
CListView m_ListView
Definition: CDefView.cpp:79
#define FCIDM_SHVIEWLAST
Definition: shlobj.h:540
#define FCIDM_MENU_FILE
Definition: shlobj.h:556
#define MM_ADDSEPARATOR
Definition: shlobj.h:2344
LONG HRESULT
Definition: typedefs.h:78
BOOL WINAPI DeleteMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
UINT GetSelectedCount()
Definition: rosctrls.h:136
CComPtr< IContextMenu > m_pCM
Definition: CDefView.cpp:107
BOOL WINAPI DestroyMenu(_In_ HMENU)
HMENU GetSubmenuByID(HMENU hmenu, UINT id)
Definition: CDefView.cpp:1176
#define S_OK
Definition: intsafe.h:59
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:2345
GLenum GLuint id
Definition: glext.h:5579
UINT m_cidl
Definition: CDefView.cpp:88
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 904 of file CDefView.cpp.

905 {
906  CComPtr<IEnumIDList> pEnumIDList;
907  PITEMID_CHILD pidl;
908  DWORD dwFetched;
909  HRESULT hRes;
910  HDPA hdpa;
911  DWORD dFlags = SHCONTF_NONFOLDERS | SHCONTF_FOLDERS;
912  DWORD dwValue, cbValue;
913 
914  TRACE("%p\n", this);
915 
916  /* determine if there is a setting to show all the hidden files/folders */
917  dwValue = 1;
918  cbValue = sizeof(dwValue);
920  L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
921  L"Hidden", NULL, &dwValue, &cbValue);
922  if (dwValue == 1)
923  {
924  dFlags |= SHCONTF_INCLUDEHIDDEN;
925  m_ListView.SendMessageW(LVM_SETCALLBACKMASK, LVIS_CUT, 0);
926  }
927 
928  dwValue = 0;
929  cbValue = sizeof(dwValue);
931  L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
932  L"ShowSuperHidden", NULL, &dwValue, &cbValue);
933  if (dwValue)
934  {
935  dFlags |= SHCONTF_INCLUDESUPERHIDDEN;
936  m_ListView.SendMessageW(LVM_SETCALLBACKMASK, LVIS_CUT, 0);
937  }
938 
939  /* get the itemlist from the shfolder */
940  hRes = m_pSFParent->EnumObjects(m_hWnd, dFlags, &pEnumIDList);
941  if (hRes != S_OK)
942  {
943  if (hRes == S_FALSE)
944  return(NOERROR);
945  return(hRes);
946  }
947 
948  /* create a pointer array */
949  hdpa = DPA_Create(16);
950  if (!hdpa)
951  {
952  return(E_OUTOFMEMORY);
953  }
954 
955  /* copy the items into the array*/
956  while((S_OK == pEnumIDList->Next(1, &pidl, &dwFetched)) && dwFetched)
957  {
958  if (DPA_InsertPtr(hdpa, 0x7fff, pidl) == -1)
959  {
960  SHFree(pidl);
961  }
962  }
963 
964  /*turn the listview's redrawing off*/
966 
967  DPA_DestroyCallback( hdpa, fill_list, this);
968 
969  /* sort the array */
970  if (m_pSF2Parent)
971  {
972  m_pSF2Parent->GetDefaultColumn(NULL, (ULONG*)&m_sortInfo.nHeaderID, NULL);
973  }
974  else
975  {
976  FIXME("no m_pSF2Parent\n");
977  }
979  _Sort();
980 
982  {
985  }
986 
987  // load custom background image and custom text color
990 
991  /*turn the listview's redrawing back on and force it to draw*/
993 
995 
997  {
998  // redraw now
999  m_ListView.InvalidateRect(NULL, TRUE);
1000  }
1001 
1003 
1004  return S_OK;
1005 }
void WINAPI DPA_DestroyCallback(HDPA hdpa, PFNDPAENUMCALLBACK enumProc, LPVOID lParam)
Definition: dpa.c:1003
#define TRUE
Definition: types.h:120
HDPA WINAPI DPA_Create(INT nGrow)
Definition: dpa.c:950
#define NOERROR
Definition: winerror.h:2354
FOLDERSETTINGS m_FolderSettings
Definition: CDefView.cpp:81
#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:2316
#define LVM_SETCALLBACKMASK
Definition: commctrl.h:2415
#define SFVM_GET_CUSTOMVIEWINFO
CComPtr< IShellFolder2 > m_pSF2Parent
Definition: CDefView.cpp:74
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
SFVM_CUSTOMVIEWINFO_DATA m_viewinfo_data
Definition: CDefView.cpp:113
#define FIXME(fmt,...)
Definition: debug.h:110
#define SFVM_LISTREFRESHED
#define S_FALSE
Definition: winerror.h:2357
static INT CALLBACK fill_list(LPVOID ptr, LPVOID arg)
Definition: CDefView.cpp:891
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
CListView m_ListView
Definition: CDefView.cpp:79
void UpdateListColors()
Definition: CDefView.cpp:597
#define TRACE(s)
Definition: solgame.cpp:4
LISTVIEW_SORT_INFO m_sortInfo
Definition: CDefView.cpp:91
LONG HRESULT
Definition: typedefs.h:78
unsigned long DWORD
Definition: ntddk_ex.h:95
static const WCHAR L[]
Definition: oid.c:1250
INT WINAPI DPA_InsertPtr(HDPA hdpa, INT i, LPVOID p)
Definition: dpa.c:591
BOOL _Sort()
Definition: CDefView.cpp:727
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:73
HWND m_hWnd
Definition: atlwin.h:268
#define S_OK
Definition: intsafe.h:59
void WINAPI SHFree(LPVOID pv)
Definition: shellole.c:331
unsigned int ULONG
Definition: retypes.h:1
Definition: dpa.c:48
HRESULT _DoFolderViewCB(UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: CDefView.cpp:3437

Referenced by OnCreate(), and Refresh().

◆ FillViewMenu()

HRESULT CDefView::FillViewMenu ( )

Definition at line 1250 of file CDefView.cpp.

1251 {
1253  if (!hViewMenu)
1254  return E_FAIL;
1255 
1257  if (!m_hMenuViewModes)
1258  return E_FAIL;
1259 
1262 
1263  return S_OK;
1264 }
UINT WINAPI Shell_MergeMenus(HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags)
Definition: shlmenu.c:857
#define FCIDM_MENU_VIEW_SEP_OPTIONS
Definition: shlobj.h:559
HMENU m_hMenu
Definition: CDefView.cpp:82
#define E_FAIL
Definition: ddrawi.h:102
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
HINSTANCE shell32_hInstance
Definition: misc.cpp:82
DWORD WINAPI SHMenuIndexFromID(HMENU hMenu, UINT uID)
Definition: ordinal.c:4333
#define FCIDM_MENU_VIEW
Definition: shlobj.h:558
#define MM_ADDSEPARATOR
Definition: shlobj.h:2344
static const WCHAR L[]
Definition: oid.c:1250
HMENU GetSubmenuByID(HMENU hmenu, UINT id)
Definition: CDefView.cpp:1176
#define S_OK
Definition: intsafe.h:59
unsigned int UINT
Definition: ndis.h:50
HMENU m_hMenuViewModes
Definition: CDefView.cpp:84
#define MM_SUBMENUSHAVEIDS
Definition: shlobj.h:2345
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:2346

Referenced by DoActivate().

◆ Freeze()

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

Implements IViewObject.

Definition at line 3347 of file CDefView.cpp.

3348 {
3349  FIXME("Stub: this=%p\n", this);
3350 
3351  return E_NOTIMPL;
3352 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetAdvise()

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

Implements IViewObject.

Definition at line 3373 of file CDefView.cpp.

3374 {
3375  TRACE("this=%p pAspects=%p pAdvf=%p ppAdvSink=%p\n", this, pAspects, pAdvf, ppAdvSink);
3376 
3377  if (ppAdvSink)
3378  {
3379  *ppAdvSink = m_pAdvSink;
3380  m_pAdvSink.p->AddRef();
3381  }
3382 
3383  if (pAspects)
3384  *pAspects = m_dwAspects;
3385 
3386  if (pAdvf)
3387  *pAdvf = m_dwAdvf;
3388 
3389  return S_OK;
3390 }
CComPtr< IAdviseSink > m_pAdvSink
Definition: CDefView.cpp:96
#define TRACE(s)
Definition: solgame.cpp:4
ULONG AddRef()
#define S_OK
Definition: intsafe.h:59
DWORD m_dwAdvf
Definition: CDefView.cpp:95
DWORD m_dwAspects
Definition: CDefView.cpp:94

◆ GetArrangeParam()

HRESULT STDMETHODCALLTYPE CDefView::GetArrangeParam ( LPARAM sort)
virtual

Definition at line 2814 of file CDefView.cpp.

2815 {
2816  FIXME("(%p)->(%p) stub\n", this, sort);
2817  return E_NOTIMPL;
2818 }
_STLP_MOVE_TO_STD_NAMESPACE void sort(_RandomAccessIter __first, _RandomAccessIter __last)
Definition: _algo.c:993
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetAutoArrange()

HRESULT STDMETHODCALLTYPE CDefView::GetAutoArrange ( )
virtual

Implements IFolderView.

Definition at line 2641 of file CDefView.cpp.

2642 {
2643  return ((m_ListView.GetStyle() & LVS_AUTOARRANGE) ? S_OK : S_FALSE);
2644 }
#define S_FALSE
Definition: winerror.h:2357
#define LVS_AUTOARRANGE
Definition: commctrl.h:2268
CListView m_ListView
Definition: CDefView.cpp:79
#define S_OK
Definition: intsafe.h:59

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 3340 of file CDefView.cpp.

3341 {
3342  FIXME("Stub: this=%p\n", this);
3343 
3344  return E_NOTIMPL;
3345 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetCurrentInfo()

HRESULT WINAPI CDefView::GetCurrentInfo ( LPFOLDERSETTINGS  pfs)
virtual

Implements IShellView.

Definition at line 2369 of file CDefView.cpp.

2370 {
2371  TRACE("(%p)->(%p) vmode=%x flags=%x\n", this, lpfs,
2373 
2374  if (!lpfs)
2375  return E_INVALIDARG;
2376 
2377  *lpfs = m_FolderSettings;
2378  return S_OK;
2379 }
FOLDERSETTINGS m_FolderSettings
Definition: CDefView.cpp:81
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ GetCurrentViewMode()

HRESULT STDMETHODCALLTYPE CDefView::GetCurrentViewMode ( UINT pViewMode)
virtual

Implements IFolderView.

Definition at line 2496 of file CDefView.cpp.

2497 {
2498  TRACE("(%p)->(%p), stub\n", this, pViewMode);
2499 
2500  if (!pViewMode)
2501  return E_INVALIDARG;
2502 
2503  *pViewMode = m_FolderSettings.ViewMode;
2504  return S_OK;
2505 }
FOLDERSETTINGS m_FolderSettings
Definition: CDefView.cpp:81
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ GetDefaultSpacing()

HRESULT STDMETHODCALLTYPE CDefView::GetDefaultSpacing ( POINT ppt)
virtual

Implements IFolderView.

Definition at line 2636 of file CDefView.cpp.

2637 {
2638  return E_NOTIMPL;
2639 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetDragPoint()

HRESULT STDMETHODCALLTYPE CDefView::GetDragPoint ( POINT pt)
virtual

Definition at line 2935 of file CDefView.cpp.

2936 {
2937  if (!pt)
2938  return E_INVALIDARG;
2939 
2940  *pt = m_ptFirstMousePos;
2941  return S_OK;
2942 }
POINT m_ptFirstMousePos
Definition: CDefView.cpp:104
#define pt(x, y)
Definition: drawing.c:79
#define E_INVALIDARG
Definition: ddrawi.h:101
#define S_OK
Definition: intsafe.h:59

◆ GetDropPoint()

HRESULT STDMETHODCALLTYPE CDefView::GetDropPoint ( POINT pt)
virtual

Definition at line 2944 of file CDefView.cpp.

2945 {
2946  FIXME("(%p)->(%p) stub\n", this, pt);
2947  return E_NOTIMPL;
2948 }
#define pt(x, y)
Definition: drawing.c:79
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetFocusedItem()

HRESULT STDMETHODCALLTYPE CDefView::GetFocusedItem ( int piItem)
virtual

Implements IFolderView.

Definition at line 2598 of file CDefView.cpp.

2599 {
2600  TRACE("(%p)->(%p)\n", this, piItem);
2601 
2602  *piItem = m_ListView.GetNextItem(-1, LVNI_FOCUSED);
2603 
2604  return S_OK;
2605 }
int GetNextItem(int i, WORD flags)
Definition: rosctrls.h:161
CListView m_ListView
Definition: CDefView.cpp:79
#define LVNI_FOCUSED
Definition: commctrl.h:2419
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ GetFolder()

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

Implements IFolderView.

Definition at line 2551 of file CDefView.cpp.

2552 {
2553  if (m_pSFParent == NULL)
2554  return E_FAIL;
2555 
2556  return m_pSFParent->QueryInterface(riid, ppv);
2557 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define E_FAIL
Definition: ddrawi.h:102
smooth NULL
Definition: ftsmooth.c:416
CComPtr< IShellFolder > m_pSFParent
Definition: CDefView.cpp:73

◆ GetItemObject()

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

Implements IShellView.

Definition at line 2445 of file CDefView.cpp.

2446 {
2448 
2449  TRACE("(%p)->(uItem=0x%08x,\n\tIID=%s, ppv=%p)\n", this, uItem, debugstr_guid(&riid), ppvOut);
2450 
2451  if (!ppvOut)
2452  return E_INVALIDARG;
2453 
2454  *ppvOut = NULL;
2455 
2456  switch (uItem)
2457  {
2458  case SVGIO_BACKGROUND:
2459  if (IsEqualIID(riid, IID_IContextMenu))
2460  {
2462  if (FAILED_UNEXPECTEDLY(hr))
2463  return hr;
2464 
2465  IUnknown_SetSite(*((IUnknown**)ppvOut), (IShellView *)this);
2466  }
2467  else if (IsEqualIID(riid, IID_IDispatch))
2468  {
2470  {
2472  if (FAILED_UNEXPECTEDLY(hr))
2473  return hr;
2474  }
2475  hr = m_pShellFolderViewDual->QueryInterface(riid, ppvOut);
2476  }
2477  break;
2478 
2479  case SVGIO_SELECTION:
2480  GetSelections();
2481  hr = m_pSFParent->GetUIObjectOf(m_hWnd, m_cidl, m_apidl, riid, 0, ppvOut);
2482  if (FAILED_UNEXPECTEDLY(hr))
2483  return hr;
2484 
2485  if (IsEqualIID(riid, IID_IContextMenu))
2486  IUnknown_SetSite(*((IUnknown**)ppvOut), (IShellView *)this);
2487 
2488  break;
2489  }
2490 
2491  TRACE("-- (%p)->(interface=%p)\n", this, *ppvOut);
2492 
2493  return hr;
2494 }
#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:78
CComPtr< IShellFolder2 > m_pSF2Parent
Definition: CDefView.cpp:74
HRESULT CDefViewBckgrndMenu_CreateInstance(IShellFolder *psf, REFIID riid, void **ppv)
HRESULT WINAPI IUnknown_SetSite(IUnknown *obj, IUnknown *site)
Definition: ordinal.c:1358
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
UINT GetSelections()
Definition: CDefView.cpp:1318
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:78
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
const GUID IID_IDispatch
CComPtr< IShellFolder > m_pSFParent
Definition: CDefView.cpp:73
HWND m_hWnd
Definition: atlwin.h:268
PCUITEMID_CHILD * m_apidl
Definition: CDefView.cpp:89
UINT m_cidl
Definition: CDefView.cpp:88
#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 2607 of file CDefView.cpp.

2608 {
2609  int lvIndex = LV_FindItemByPidl(pidl);
2610  if (lvIndex == -1 || ppt == NULL)
2611  return E_INVALIDARG;
2612 
2613  m_ListView.GetItemPosition(lvIndex, ppt);
2614  return S_OK;
2615 }
int LV_FindItemByPidl(PCUITEMID_CHILD pidl)
Definition: CDefView.cpp:774
BOOL GetItemPosition(int nItem, POINT *pPoint)
Definition: rosctrls.h:231
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
CListView m_ListView
Definition: CDefView.cpp:79
#define S_OK
Definition: intsafe.h:59

◆ GetItemSpacing()

HRESULT STDMETHODCALLTYPE CDefView::GetItemSpacing ( ITEMSPACING spacing)
virtual

Definition at line 2980 of file CDefView.cpp.

2981 {
2982  FIXME("(%p)->(%p) stub\n", this, spacing);
2983  return E_NOTIMPL;
2984 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetObject()

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

Definition at line 2840 of file CDefView.cpp.

2841 {
2842  TRACE("(%p)->(%p %d)\n", this, pidl, item);
2843  return Item(item, pidl);
2844 }
virtual HRESULT STDMETHODCALLTYPE Item(int iItemIndex, PITEMID_CHILD *ppidl)
Definition: CDefView.cpp:2559
#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 2865 of file CDefView.cpp.

2866 {
2867  TRACE("(%p)->(%p)\n", this, count);
2869  return S_OK;
2870 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
int GetItemCount()
Definition: rosctrls.h:121
CListView m_ListView
Definition: CDefView.cpp:79
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ GetSelectedCount()

HRESULT STDMETHODCALLTYPE CDefView::GetSelectedCount ( UINT count)
virtual

Definition at line 2897 of file CDefView.cpp.

2898 {
2899  FIXME("(%p)->(%p) stub\n", this, count);
2900  return E_NOTIMPL;
2901 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetSelectedObjects()

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

Definition at line 2903 of file CDefView.cpp.

2904 {
2905  TRACE("(%p)->(%p %p)\n", this, pidl, items);
2906 
2907  *items = GetSelections();
2908 
2909  if (*items)
2910  {
2911  *pidl = static_cast<PCUITEMID_CHILD *>(LocalAlloc(0, *items * sizeof(PCUITEMID_CHILD)));
2912  if (!*pidl)
2913  {
2914  return E_OUTOFMEMORY;
2915  }
2916 
2917  /* it's documented that caller shouldn't PIDLs, only array itself */
2918  memcpy(*pidl, m_apidl, *items * sizeof(PCUITEMID_CHILD));
2919  }
2920 
2921  return S_OK;
2922 }
const ITEMID_CHILD UNALIGNED * PCUITEMID_CHILD
Definition: shtypes.idl:70
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
UINT GetSelections()
Definition: CDefView.cpp:1318
#define TRACE(s)
Definition: solgame.cpp:4
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
PCUITEMID_CHILD * m_apidl
Definition: CDefView.cpp:89
#define S_OK
Definition: intsafe.h:59
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 2589 of file CDefView.cpp.

2590 {
2591  TRACE("(%p)->(%p)\n", this, piItem);
2592 
2593  *piItem = m_ListView.GetSelectionMark();
2594 
2595  return S_OK;
2596 }
int GetSelectionMark()
Definition: rosctrls.h:156
CListView m_ListView
Definition: CDefView.cpp:79
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ GetSelections()

UINT CDefView::GetSelections ( )

Definition at line 1318 of file CDefView.cpp.

1319 {
1320  SHFree(m_apidl);
1321 
1323  m_apidl = static_cast<PCUITEMID_CHILD*>(SHAlloc(m_cidl * sizeof(PCUITEMID_CHILD)));
1324  if (!m_apidl)
1325  {
1326  m_cidl = 0;
1327  return 0;
1328  }
1329 
1330  TRACE("-- Items selected =%u\n", m_cidl);
1331 
1332  UINT i = 0;
1333  int lvIndex = -1;
1334  while ((lvIndex = m_ListView.GetNextItem(lvIndex, LVNI_SELECTED)) > -1)
1335  {
1336  m_apidl[i] = _PidlByItem(lvIndex);
1337  i++;
1338  if (i == m_cidl)
1339  break;
1340  TRACE("-- selected Item found\n");
1341  }
1342 
1343  return m_cidl;
1344 }
PCUITEMID_CHILD _PidlByItem(int i)
Definition: CDefView.cpp:761
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:2420
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
CListView m_ListView
Definition: CDefView.cpp:79
#define TRACE(s)
Definition: solgame.cpp:4
UINT GetSelectedCount()
Definition: rosctrls.h:136
PCUITEMID_CHILD * m_apidl
Definition: CDefView.cpp:89
unsigned int UINT
Definition: ndis.h:50
void WINAPI SHFree(LPVOID pv)
Definition: shellole.c:331
UINT m_cidl
Definition: CDefView.cpp:88
LPVOID WINAPI SHAlloc(SIZE_T len)
Definition: shellole.c:309

Referenced by GetItemObject(), GetSelectedObjects(), and OnNotify().

◆ GetSpacing()

HRESULT STDMETHODCALLTYPE CDefView::GetSpacing ( POINT ppt)
virtual

Implements IFolderView.

Definition at line 2617 of file CDefView.cpp.

2618 {
2619  TRACE("(%p)->(%p)\n", this, ppt);
2620 
2621  if (!m_ListView)
2622  return S_FALSE;
2623 
2624  if (ppt)
2625  {
2626  SIZE spacing;
2627  m_ListView.GetItemSpacing(spacing);
2628 
2629  ppt->x = spacing.cx;
2630  ppt->y = spacing.cy;
2631  }
2632 
2633  return S_OK;
2634 }
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
#define S_FALSE
Definition: winerror.h:2357
LONG cx
Definition: windef.h:334
CListView m_ListView
Definition: CDefView.cpp:79
#define TRACE(s)
Definition: solgame.cpp:4
void GetItemSpacing(SIZE &spacing, BOOL bSmallIconView=FALSE)
Definition: rosctrls.h:166
#define S_OK
Definition: intsafe.h:59
LONG cy
Definition: windef.h:335

◆ GetView()

HRESULT STDMETHODCALLTYPE CDefView::GetView ( SHELLVIEWID view_guid,
ULONG  view_type 
)
virtual

Implements IShellView2.

Definition at line 2700 of file CDefView.cpp.

2701 {
2702  FIXME("(%p)->(%p, %lu) stub\n", this, view_guid, view_type);
2703  return E_NOTIMPL;
2704 }
view_type
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetWindow()

HRESULT WINAPI CDefView::GetWindow ( HWND lphwnd)
virtual

Implements IOleWindow.

Definition at line 2224 of file CDefView.cpp.

2225 {
2226  TRACE("(%p)\n", this);
2227 
2228  *phWnd = m_hWnd;
2229 
2230  return S_OK;
2231 }
#define TRACE(s)
Definition: solgame.cpp:4
HWND m_hWnd
Definition: atlwin.h:268
#define S_OK
Definition: intsafe.h:59

◆ GetWindowProc()

virtual WNDPROC CDefView::GetWindowProc ( )
inlinevirtual

Reimplemented from ATL::CWindowImplBaseT< CWindow, CControlWinTraits >.

Definition at line 292 of file CDefView.cpp.

293  {
294  return WindowProc;
295  }
static LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: CDefView.cpp:297

◆ GetWndClassInfo()

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

Definition at line 279 of file CDefView.cpp.

280  {
281  static ATL::CWndClassInfo wc =
282  {
284  0, 0, NULL, NULL,
286  },
287  NULL, NULL, IDC_ARROW, TRUE, 0, _T("")
288  };
289  return wc;
290  }
#define TRUE
Definition: types.h:120
static const WCHAR SV_CLASS_NAME[]
Definition: CDefView.cpp:45
smooth NULL
Definition: ftsmooth.c:416
#define _T(x)
Definition: vfdio.h:22
static LRESULT CALLBACK StartWindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: atlwin.h:1529
#define LoadCursor
Definition: winuser.h:5787
#define IDC_ARROW
Definition: winuser.h:682
WNDCLASSEXA WNDCLASSEX
Definition: winuser.h:5694
#define CS_PARENTDC
Definition: winuser.h:651

◆ GiveFeedback()

HRESULT WINAPI CDefView::GiveFeedback ( DWORD  dwEffect)
virtual

Implements IDropSource.

Definition at line 3322 of file CDefView.cpp.

3323 {
3324  TRACE("(%p)\n", this);
3325 
3327 }
#define TRACE(s)
Definition: solgame.cpp:4
#define DRAGDROP_S_USEDEFAULTCURSORS
Definition: winerror.h:2648

◆ HandleRename()

HRESULT STDMETHODCALLTYPE CDefView::HandleRename ( LPCITEMIDLIST  new_pidl)
virtual

Definition at line 2793 of file CDefView.cpp.

2794 {
2795  FIXME("(%p)->(%p) stub\n", this, new_pidl);
2796  return E_NOTIMPL;
2797 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IncludeObject()

HRESULT CDefView::IncludeObject ( PCUITEMID_CHILD  pidl)

Definition at line 425 of file CDefView.cpp.

426 {
427  HRESULT ret = S_OK;
428 
429  if (m_pCommDlgBrowser.p != NULL)
430  {
431  TRACE("ICommDlgBrowser::IncludeObject pidl=%p\n", pidl);
432  ret = m_pCommDlgBrowser->IncludeObject(this, pidl);
433  TRACE("-- returns 0x%08x\n", ret);
434  }
435 
436  return ret;
437 }
CComPtr< ICommDlgBrowser > m_pCommDlgBrowser
Definition: CDefView.cpp:77
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:78
int ret
#define S_OK
Definition: intsafe.h:59

Referenced by fill_list().

◆ Initialize()

HRESULT WINAPI CDefView::Initialize ( IShellFolder shellFolder)

Definition at line 413 of file CDefView.cpp.

414 {
415  m_pSFParent = shellFolder;
417 
418  return S_OK;
419 }
#define IID_PPV_ARG(Itype, ppType)
CComPtr< IShellFolder2 > m_pSF2Parent
Definition: CDefView.cpp:74
CComPtr< IShellFolder > m_pSFParent
Definition: CDefView.cpp:73
#define S_OK
Definition: intsafe.h:59
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)

◆ InitList()

BOOL CDefView::InitList ( )

Definition at line 658 of file CDefView.cpp.

659 {
661  WCHAR szTemp[50];
662  HIMAGELIST big_icons, small_icons;
663 
664  TRACE("%p\n", this);
665 
667 
669 
670  if (m_pSF2Parent)
671  {
672  for (int i = 0; 1; i++)
673  {
674  if (FAILED(m_pSF2Parent->GetDetailsOf(NULL, i, &sd)))
675  break;
676  StrRetToStrNW( szTemp, 50, &sd.str, NULL);
677  m_ListView.InsertColumn(i, szTemp, sd.fmt, sd.cxChar * 8);
678 
679  InsertMenuW(m_hMenuArrangeModes, -1, MF_STRING, 0x30 + i, szTemp);
680  }
681 
683  }
684  else
685  {
686  FIXME("no m_pSF2Parent\n");
687  }
688 
689  Shell_GetImageLists(&big_icons, &small_icons);
691  m_ListView.SetImageList(small_icons, LVSIL_SMALL);
692 
693  return TRUE;
694 }
HMENU m_hMenuArrangeModes
Definition: CDefView.cpp:83
HMENU WINAPI CreateMenu(void)
Definition: menu.c:837
#define TRUE
Definition: types.h:120
#define LVSIL_SMALL
Definition: commctrl.h:2295
BOOL WINAPI InsertMenuW(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCWSTR)
#define MF_STRING
Definition: winuser.h:138
CComPtr< IShellFolder2 > m_pSF2Parent
Definition: CDefView.cpp:74
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
BOOL DeleteAllItems()
Definition: rosctrls.h:126
#define MF_BYPOSITION
Definition: winuser.h:203
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define MF_SEPARATOR
Definition: winuser.h:137
CListView m_ListView
Definition: CDefView.cpp:79
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
static const WCHAR sd[]
Definition: suminfo.c:287
#define LVSIL_NORMAL
Definition: commctrl.h:2294
BOOL WINAPI Shell_GetImageLists(HIMAGELIST *lpBigList, HIMAGELIST *lpSmallList)
Definition: iconcache.cpp:706
int InsertColumn(int iCol, LV_COLUMN *pcol)
Definition: rosctrls.h:52
HIMAGELIST SetImageList(HIMAGELIST himl, int iImageList)
Definition: rosctrls.h:91
BOOL WINAPI StrRetToStrNW(LPWSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl)
Definition: shellstring.c:84

Referenced by OnCreate().

◆ InvokeContextMenuCommand()

HRESULT CDefView::InvokeContextMenuCommand ( UINT  uCommand)

Definition at line 1346 of file CDefView.cpp.

1347 {
1348  CMINVOKECOMMANDINFO cmi;
1349 
1350  ZeroMemory(&cmi, sizeof(cmi));
1351  cmi.cbSize = sizeof(cmi);
1352  cmi.lpVerb = MAKEINTRESOURCEA(uCommand);
1353  cmi.hwnd = m_hWnd;
1354 
1355  if (GetKeyState(VK_SHIFT) & 0x8000)
1356  cmi.fMask |= CMIC_MASK_SHIFT_DOWN;
1357 
1358  if (GetKeyState(VK_CONTROL) & 0x8000)
1359  cmi.fMask |= CMIC_MASK_CONTROL_DOWN;
1360 
1361  HRESULT hr = m_pCM->InvokeCommand(&cmi);
1362  if (FAILED_UNEXPECTEDLY(hr))
1363  return hr;
1364 
1365  return S_OK;
1366 }
HRESULT hr
Definition: shlfolder.c:183
#define ZeroMemory
Definition: winbase.h:1642
#define MAKEINTRESOURCEA(i)
Definition: winuser.h:581
#define VK_SHIFT
Definition: winuser.h:2177
SHORT WINAPI GetKeyState(_In_ int)
LONG HRESULT
Definition: typedefs.h:78
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
HWND m_hWnd
Definition: atlwin.h:268
CComPtr< IContextMenu > m_pCM
Definition: CDefView.cpp:107
#define S_OK
Definition: intsafe.h:59
#define VK_CONTROL
Definition: winuser.h:2178

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

◆ IsBkDropTarget()

HRESULT STDMETHODCALLTYPE CDefView::IsBkDropTarget ( IDropTarget drop_target)
virtual

Definition at line 2962 of file CDefView.cpp.

2963 {
2964  FIXME("(%p)->(%p) stub\n", this, drop_target);
2965  return E_NOTIMPL;
2966 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IsDropOnSource()

HRESULT STDMETHODCALLTYPE CDefView::IsDropOnSource ( IDropTarget drop_target)
virtual

Definition at line 2924 of file CDefView.cpp.

2925 {
2926  if ((m_iDragOverItem == -1 || m_pCurDropTarget == NULL) &&
2928  {
2929  return S_OK;
2930  }
2931 
2932  return S_FALSE;
2933 }
#define S_FALSE
Definition: winerror.h:2357
smooth NULL
Definition: ftsmooth.c:416
CComPtr< IDataObject > m_pSourceDataObject
Definition: CDefView.cpp:98
LONG m_iDragOverItem
Definition: CDefView.cpp:101
CComPtr< IDropTarget > m_pCurDropTarget
Definition: CDefView.cpp:99
#define S_OK
Definition: intsafe.h:59

Referenced by Drop().

◆ Item()

HRESULT STDMETHODCALLTYPE CDefView::Item ( int  iItemIndex,
PITEMID_CHILD ppidl 
)
virtual

Implements IFolderView.

Definition at line 2559 of file CDefView.cpp.

2560 {
2561  PCUITEMID_CHILD pidl = _PidlByItem(iItemIndex);
2562  if (pidl)
2563  {
2564  *ppidl = ILClone(pidl);
2565  return S_OK;
2566  }
2567 
2568  *ppidl = 0;
2569  return E_INVALIDARG;
2570 }
PCUITEMID_CHILD _PidlByItem(int i)
Definition: CDefView.cpp:761
const ITEMID_CHILD UNALIGNED * PCUITEMID_CHILD
Definition: shtypes.idl:70
#define E_INVALIDARG
Definition: ddrawi.h:101
#define S_OK
Definition: intsafe.h:59
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228

Referenced by GetObject().

◆ ItemCount()

HRESULT STDMETHODCALLTYPE CDefView::ItemCount ( UINT  uFlags,
int pcItems 
)
virtual

Implements IFolderView.

Definition at line 2572 of file CDefView.cpp.

2573 {
2574  TRACE("(%p)->(%u %p)\n", this, uFlags, pcItems);
2575 
2576  if (uFlags != SVGIO_ALLVIEW)
2577  FIXME("some flags unsupported, %x\n", uFlags & ~SVGIO_ALLVIEW);
2578 
2580 
2581  return S_OK;
2582 }
static int int const SCRIPT_CONTROL const SCRIPT_STATE SCRIPT_ITEM ULONG int * pcItems
Definition: usp10.c:62
UINT uFlags
Definition: api.c:59
int GetItemCount()
Definition: rosctrls.h:121
#define FIXME(fmt,...)
Definition: debug.h:110
CListView m_ListView
Definition: CDefView.cpp:79
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ Items()

HRESULT STDMETHODCALLTYPE CDefView::Items ( UINT  uFlags,
REFIID  riid,