ReactOS  0.4.15-dev-3165-gdf6fff7
COpenWithDialog Class Reference
Collaboration diagram for COpenWithDialog:

Public Member Functions

 COpenWithDialog (const OPENASINFO *pInfo, COpenWithList *pAppList)
 
 ~COpenWithDialog ()
 
BOOL IsNoOpen (HWND hwnd)
 

Static Public Member Functions

static INT_PTR CALLBACK DialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 

Private Member Functions

VOID Init (HWND hwnd)
 
VOID AddApp (COpenWithList::SApp *pApp, BOOL bSelected)
 
VOID Browse ()
 
VOID Accept ()
 
COpenWithList::SAppGetCurrentApp ()
 

Static Private Member Functions

static INT_PTR CALLBACK NoOpenDlgProc (HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
 

Private Attributes

const OPENASINFOm_pInfo
 
COpenWithListm_pAppList
 
BOOL m_bListAllocated
 
HWND m_hDialog
 
HWND m_hTreeView
 
HTREEITEM m_hRecommend
 
HTREEITEM m_hOther
 
HIMAGELIST m_hImgList
 
BOOL m_bNoOpen
 

Detailed Description

Definition at line 749 of file COpenWithMenu.cpp.

Constructor & Destructor Documentation

◆ COpenWithDialog()

COpenWithDialog::COpenWithDialog ( const OPENASINFO pInfo,
COpenWithList pAppList = NULL 
)

Definition at line 775 of file COpenWithMenu.cpp.

775  :
776  m_pInfo(pInfo), m_pAppList(pAppList), m_hImgList(NULL), m_bNoOpen(FALSE)
777 {
778  if (!m_pAppList)
779  {
782  }
783  else
785 }
#define TRUE
Definition: types.h:120
HIMAGELIST m_hImgList
const OPENASINFO * m_pInfo
#define FALSE
Definition: types.h:117
COpenWithList * m_pAppList
#define NULL
Definition: types.h:112

◆ ~COpenWithDialog()

COpenWithDialog::~COpenWithDialog ( )

Definition at line 787 of file COpenWithMenu.cpp.

788 {
790  delete m_pAppList;
791  if (m_hImgList)
793 }
HIMAGELIST m_hImgList
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:928
COpenWithList * m_pAppList

Member Function Documentation

◆ Accept()

VOID COpenWithDialog::Accept ( )
private

Definition at line 1006 of file COpenWithMenu.cpp.

1007 {
1009  if (pApp)
1010  {
1011  /* Set programm as default handler */
1012  if (SendDlgItemMessage(m_hDialog, 14003, BM_GETCHECK, 0, 0) == BST_CHECKED)
1014 
1015  /* Execute program */
1016  if (m_pInfo->oaifInFlags & OAIF_EXEC)
1018 
1019  EndDialog(m_hDialog, 1);
1020  }
1021 }
COpenWithList::SApp * GetCurrentApp()
LPCWSTR pcszFile
Definition: shlobj.h:2498
OPEN_AS_INFO_FLAGS oaifInFlags
Definition: shlobj.h:2500
#define SendDlgItemMessage
Definition: winuser.h:5818
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
const OPENASINFO * m_pInfo
#define BM_GETCHECK
Definition: winuser.h:1901
BOOL SetDefaultHandler(SApp *pApp, LPCWSTR pwszFilename)
COpenWithList * m_pAppList
#define BST_CHECKED
Definition: winuser.h:197
static BOOL Execute(SApp *pApp, LPCWSTR pwszFilePath)

Referenced by DialogProc().

◆ AddApp()

VOID COpenWithDialog::AddApp ( COpenWithList::SApp pApp,
BOOL  bSelected 
)
private

Definition at line 842 of file COpenWithMenu.cpp.

843 {
844  LPCWSTR pwszName = m_pAppList->GetName(pApp);
845  HICON hIcon = m_pAppList->GetIcon(pApp);
846 
847  TRACE("AddApp Cmd %ls Name %ls\n", pApp->wszCmd, pwszName);
848 
849  /* Add item to the list */
850  TVINSERTSTRUCT tvins;
851 
852  if (pApp->bRecommended)
853  tvins.hParent = tvins.hInsertAfter = m_hRecommend;
854  else
855  tvins.hParent = tvins.hInsertAfter = m_hOther;
856 
857  tvins.item.mask = TVIF_TEXT|TVIF_PARAM;
858  tvins.item.pszText = (LPWSTR)pwszName;
859  tvins.item.lParam = (LPARAM)pApp;
860 
861  if (hIcon)
862  {
863  tvins.item.mask |= TVIF_IMAGE | TVIF_SELECTEDIMAGE;
864  tvins.item.iImage = tvins.item.iSelectedImage = ImageList_AddIcon(m_hImgList, hIcon);
865  }
866 
868 
869  if (bSelected)
871 }
static HICON
Definition: imagelist.c:84
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
HIMAGELIST m_hImgList
#define TVIF_SELECTEDIMAGE
Definition: commctrl.h:3271
static HICON GetIcon(SApp *pApp)
#define TreeView_InsertItem(hwnd, lpis)
Definition: commctrl.h:3412
static LPCWSTR GetName(SApp *pApp)
LONG_PTR LPARAM
Definition: windef.h:208
#define TRACE(s)
Definition: solgame.cpp:4
INT WINAPI ImageList_AddIcon(HIMAGELIST himl, HICON hIcon)
Definition: imagelist.c:540
COpenWithList * m_pAppList
#define TVIF_TEXT
Definition: commctrl.h:3266
HICON hIcon
Definition: msconfig.c:44
#define TreeView_SelectItem(hwnd, hitem)
Definition: commctrl.h:3481
WCHAR wszCmd[MAX_PATH]
HTREEITEM m_hRecommend
#define TVINSERTSTRUCT
Definition: commctrl.h:3402
#define TVIF_IMAGE
Definition: commctrl.h:3267
#define TVIF_PARAM
Definition: commctrl.h:3268
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by Browse(), and Init().

◆ Browse()

VOID COpenWithDialog::Browse ( )
private

Definition at line 873 of file COpenWithMenu.cpp.

874 {
875  WCHAR wszTitle[64];
876  WCHAR wszFilter[256];
877  WCHAR wszPath[MAX_PATH];
879 
880  /* Initialize OPENFILENAMEW structure */
881  ZeroMemory(&ofn, sizeof(OPENFILENAMEW));
882  ofn.lStructSize = sizeof(OPENFILENAMEW);
886  ofn.nMaxFile = (sizeof(wszPath) / sizeof(WCHAR));
887  ofn.lpstrFile = wszPath;
888  ofn.lpstrInitialDir = L"%programfiles%";
889 
890  /* Init title */
891  if (LoadStringW(shell32_hInstance, IDS_OPEN_WITH, wszTitle, sizeof(wszTitle) / sizeof(WCHAR)))
892  {
893  ofn.lpstrTitle = wszTitle;
894  ofn.nMaxFileTitle = wcslen(wszTitle);
895  }
896 
897  /* Init the filter string */
900  ZeroMemory(wszPath, sizeof(wszPath));
901 
902  /* Create OpenFile dialog */
903  if (!GetOpenFileNameW(&ofn))
904  return;
905 
906  /* Setup context for insert proc */
907  COpenWithList::SApp *pApp = m_pAppList->Add(wszPath);
908  AddApp(pApp, TRUE);
909 }
#define OFN_FILEMUSTEXIST
Definition: commdlg.h:106
#define OFN_EXPLORER
Definition: commdlg.h:104
SApp * Add(LPCWSTR pwszPath)
HWND hwndOwner
Definition: commdlg.h:330
#define TRUE
Definition: types.h:120
static WCHAR wszFilter[MAX_STRING_LEN *4+6 *3+5]
Definition: wordpad.c:72
OPENFILENAME ofn
Definition: main.cpp:37
#define ZeroMemory
Definition: winbase.h:1664
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
DWORD nMaxFile
Definition: commdlg.h:337
BOOL WINAPI GetOpenFileNameW(OPENFILENAMEW *ofn)
Definition: filedlg.c:4677
#define IDS_OPEN_WITH_FILTER
Definition: shresdef.h:145
HINSTANCE hInstance
Definition: commdlg.h:331
#define OFN_PATHMUSTEXIST
Definition: commdlg.h:117
__wchar_t WCHAR
Definition: xmlstorage.h:180
LPCSTR lpstrInitialDir
Definition: commdlg.h:340
#define MAX_PATH
Definition: compat.h:34
DWORD lStructSize
Definition: commdlg.h:329
static const WCHAR L[]
Definition: oid.c:1250
struct tagOFNW OPENFILENAMEW
COpenWithList * m_pAppList
#define shell32_hInstance
LPSTR lpstrFile
Definition: commdlg.h:336
#define IDS_OPEN_WITH
Definition: shresdef.h:134
LPCSTR lpstrFilter
Definition: commdlg.h:332
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
LPCSTR lpstrTitle
Definition: commdlg.h:341
VOID AddApp(COpenWithList::SApp *pApp, BOOL bSelected)
DWORD nMaxFileTitle
Definition: commdlg.h:339
DWORD Flags
Definition: commdlg.h:342

Referenced by DialogProc().

◆ DialogProc()

INT_PTR CALLBACK COpenWithDialog::DialogProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 1023 of file COpenWithMenu.cpp.

1024 {
1025  COpenWithDialog *pThis = reinterpret_cast<COpenWithDialog *>(GetWindowLongPtr(hwndDlg, DWLP_USER));
1026 
1027  switch(uMsg)
1028  {
1029  case WM_INITDIALOG:
1030  {
1031  COpenWithDialog *pThis = reinterpret_cast<COpenWithDialog *>(lParam);
1032 
1033  pThis->Init(hwndDlg);
1034  return TRUE;
1035  }
1036  case WM_COMMAND:
1037  switch(LOWORD(wParam))
1038  {
1039  case 14004: /* browse */
1040  {
1041  pThis->Browse();
1042  return TRUE;
1043  }
1044  case IDOK: /* ok */
1045  {
1046  pThis->Accept();
1047  return TRUE;
1048  }
1049  case IDCANCEL: /* cancel */
1050  EndDialog(hwndDlg, 0);
1051  return TRUE;
1052  default:
1053  break;
1054  }
1055  break;
1056  case WM_NOTIFY:
1057  switch (((LPNMHDR)lParam)->code)
1058  {
1059  case TVN_SELCHANGED:
1060  EnableWindow(GetDlgItem(hwndDlg, IDOK), pThis->GetCurrentApp() ? TRUE : FALSE);
1061  break;
1062  case NM_DBLCLK:
1063  case NM_RETURN:
1064  pThis->Accept();
1065  break;
1066  }
1067  break;
1068  case WM_CLOSE:
1069  EndDialog(hwndDlg, 0);
1070  return TRUE;
1071  default:
1072  break;
1073  }
1074  return FALSE;
1075 }
VOID Init(HWND hwnd)
#define IDOK
Definition: winuser.h:824
COpenWithList::SApp * GetCurrentApp()
UINT uMsg
Definition: menu.cpp:213
#define TRUE
Definition: types.h:120
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
WPARAM wParam
Definition: combotst.c:138
#define FALSE
Definition: types.h:117
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define TVN_SELCHANGED
Definition: commctrl.h:3735
#define WM_CLOSE
Definition: winuser.h:1604
#define DWLP_USER
Definition: winuser.h:866
#define WM_COMMAND
Definition: winuser.h:1723
Definition: inflate.c:139
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define NM_RETURN
Definition: commctrl.h:132
#define NM_DBLCLK
Definition: commctrl.h:131
#define GetWindowLongPtr
Definition: treelist.c:73
#define IDCANCEL
Definition: winuser.h:825
#define WM_INITDIALOG
Definition: winuser.h:1722
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define WM_NOTIFY
Definition: richedit.h:61

Referenced by SHOpenWithDialog().

◆ GetCurrentApp()

COpenWithList::SApp * COpenWithDialog::GetCurrentApp ( )
private

Definition at line 911 of file COpenWithMenu.cpp.

912 {
913  TVITEM tvi;
914  tvi.hItem = TreeView_GetSelection(m_hTreeView);
915  if (!tvi.hItem)
916  return NULL;
917 
918  tvi.mask = TVIF_PARAM;
919  if (!TreeView_GetItem(m_hTreeView, &tvi))
920  return NULL;
921 
922  return (COpenWithList::SApp*)tvi.lParam;
923 }
#define TreeView_GetSelection(hwnd)
Definition: commctrl.h:3473
#define TVITEM
Definition: commctrl.h:3365
#define NULL
Definition: types.h:112
#define TVIF_PARAM
Definition: commctrl.h:3268
#define TreeView_GetItem(hwnd, pitem)
Definition: commctrl.h:3490

Referenced by Accept(), and DialogProc().

◆ Init()

VOID COpenWithDialog::Init ( HWND  hwnd)
private

Definition at line 925 of file COpenWithMenu.cpp.

926 {
927  TRACE("COpenWithDialog::Init hwnd %p\n", hwnd);
928 
929  m_hDialog = hwnd;
931 
932  /* Handle register checkbox */
933  HWND hRegisterCheckbox = GetDlgItem(hwnd, 14003);
935  EnableWindow(hRegisterCheckbox, FALSE);
937  SendMessage(hRegisterCheckbox, BM_SETCHECK, BST_CHECKED, 0);
939  ShowWindow(hRegisterCheckbox, SW_HIDE);
940 
941  if (m_pInfo->pcszFile)
942  {
943  WCHAR wszBuf[MAX_PATH];
944  UINT cchBuf;
945 
946  /* Add filename to label */
947  cchBuf = GetDlgItemTextW(hwnd, 14001, wszBuf, _countof(wszBuf));
948  StringCchCopyW(wszBuf + cchBuf, _countof(wszBuf) - cchBuf, PathFindFileNameW(m_pInfo->pcszFile));
949  SetDlgItemTextW(hwnd, 14001, wszBuf);
950 
951  /* Load applications from registry */
952  m_pAppList->Load();
954 
955  /* Determine if the type of file can be opened directly from the shell */
956  if (m_pAppList->IsNoOpen() != FALSE)
957  m_bNoOpen = TRUE;
958 
959  /* Init treeview */
960  m_hTreeView = GetDlgItem(hwnd, 14002);
963 
964  /* If there are some recommendations add parent nodes: Recommended and Others */
965  UINT cRecommended = m_pAppList->GetRecommendedCount();
966  if (cRecommended > 0)
967  {
968  TVINSERTSTRUCT tvins;
969  HICON hFolderIcon;
970 
971  tvins.hParent = tvins.hInsertAfter = TVI_ROOT;
973  tvins.item.pszText = (LPWSTR)wszBuf;
974  tvins.item.state = tvins.item.stateMask = TVIS_EXPANDED;
976  tvins.item.iImage = tvins.item.iSelectedImage = ImageList_AddIcon(m_hImgList, hFolderIcon);
977 
980 
983  }
984  else
986 
987  /* Add all applications */
988  BOOL bNoAppSelected = TRUE;
989  COpenWithList::SApp *pAppList = m_pAppList->GetList();
990  for (UINT i = 0; i < m_pAppList->GetCount(); ++i)
991  {
992  if (!COpenWithList::IsHidden(&pAppList[i]))
993  {
994  if (bNoAppSelected && (pAppList[i].bRecommended || !cRecommended))
995  {
996  AddApp(&pAppList[i], TRUE);
997  bNoAppSelected = FALSE;
998  }
999  else
1000  AddApp(&pAppList[i], FALSE);
1001  }
1002  }
1003  }
1004 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define MAKEINTRESOURCE
Definition: winuser.h:591
static HICON
Definition: imagelist.c:84
UINT WINAPI GetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPWSTR lpString, int nMaxCount)
Definition: dialog.c:2263
#define IMAGE_ICON
Definition: winuser.h:212
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
LPCWSTR pcszFile
Definition: shlobj.h:2498
SApp * GetList()
#define TRUE
Definition: types.h:120
#define SW_HIDE
Definition: winuser.h:762
HIMAGELIST m_hImgList
OPEN_AS_INFO_FLAGS oaifInFlags
Definition: shlobj.h:2500
#define TVIF_SELECTEDIMAGE
Definition: commctrl.h:3271
#define IDI_SHELL_PROGRAMS_FOLDER
Definition: shresdef.h:541
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define SetWindowLongPtr
Definition: treelist.c:70
#define IDS_OPEN_WITH_RECOMMENDED
Definition: shresdef.h:189
#define ILC_COLOR32
Definition: commctrl.h:358
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
#define TreeView_InsertItem(hwnd, lpis)
Definition: commctrl.h:3412
const OPENASINFO * m_pInfo
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
Definition: imagelist.c:804
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
LPWSTR WINAPI PathFindFileNameW(LPCWSTR lpszPath)
Definition: path.c:394
#define TreeView_SetImageList(hwnd, himl, iImage)
Definition: commctrl.h:3447
BOOL LoadRecommended(LPCWSTR pwszFilePath)
#define BM_SETCHECK
Definition: winuser.h:1904
#define TRACE(s)
Definition: solgame.cpp:4
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define _countof(array)
Definition: sndvol32.h:68
#define MAX_PATH
Definition: compat.h:34
INT WINAPI ImageList_AddIcon(HIMAGELIST himl, HICON hIcon)
Definition: imagelist.c:540
#define IDS_OPEN_WITH_OTHER
Definition: shresdef.h:190
#define TVI_ROOT
Definition: commctrl.h:3368
#define DWLP_USER
Definition: winuser.h:866
#define ILC_MASK
Definition: commctrl.h:351
#define TVIS_EXPANDED
Definition: commctrl.h:3284
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
static BOOL IsHidden(SApp *pApp)
COpenWithList * m_pAppList
#define shell32_hInstance
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define TVIF_TEXT
Definition: commctrl.h:3266
HTREEITEM m_hRecommend
#define TVINSERTSTRUCT
Definition: commctrl.h:3402
#define TVIF_IMAGE
Definition: commctrl.h:3267
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
BOOL IsNoOpen(VOID)
#define BST_CHECKED
Definition: winuser.h:197
#define TVSIL_NORMAL
Definition: commctrl.h:3443
#define SendMessage
Definition: winuser.h:5819
UINT GetRecommendedCount()
#define TVIF_STATE
Definition: commctrl.h:3269
#define LoadImage
Definition: winuser.h:5791
WCHAR * LPWSTR
Definition: xmlstorage.h:184
VOID AddApp(COpenWithList::SApp *pApp, BOOL bSelected)

Referenced by DialogProc().

◆ IsNoOpen()

BOOL COpenWithDialog::IsNoOpen ( HWND  hwnd)

Definition at line 823 of file COpenWithMenu.cpp.

824 {
825  /* Only do the actual check if the file type has the 'NoOpen' flag. */
826  if (m_bNoOpen)
827  {
829 
830  if (dReturnValue == IDNO)
831  return TRUE;
832  else if (dReturnValue == -1)
833  {
834  ERR("IsNoOpen failed to load the dialog box.");
835  return TRUE;
836  }
837  }
838 
839  return FALSE;
840 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define TRUE
Definition: types.h:120
static INT_PTR CALLBACK NoOpenDlgProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
#define DialogBox
Definition: winuser.h:5737
#define FALSE
Definition: types.h:117
#define ERR(fmt,...)
Definition: debug.h:110
#define shell32_hInstance
#define IDNO
Definition: winuser.h:830
#define IDD_NOOPEN
Definition: shresdef.h:490

Referenced by SHOpenWithDialog().

◆ NoOpenDlgProc()

INT_PTR CALLBACK COpenWithDialog::NoOpenDlgProc ( HWND  hwnd,
UINT  Message,
WPARAM  wParam,
LPARAM  lParam 
)
staticprivate

Definition at line 795 of file COpenWithMenu.cpp.

796 {
797  switch(Message)
798  {
799  case WM_INITDIALOG:
800  {
801  return TRUE;
802  }
803  case WM_CLOSE:
804  EndDialog(hwnd, IDNO);
805  break;
806  case WM_COMMAND:
807  switch(LOWORD(wParam))
808  {
809  case IDYES:
810  EndDialog(hwnd, IDYES);
811  break;
812  case IDNO:
813  EndDialog(hwnd, IDNO);
814  break;
815  }
816  break;
817  default:
818  return FALSE;
819  }
820  return TRUE;
821 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define IDYES
Definition: winuser.h:829
#define TRUE
Definition: types.h:120
WPARAM wParam
Definition: combotst.c:138
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
#define FALSE
Definition: types.h:117
#define WM_CLOSE
Definition: winuser.h:1604
CHAR Message[80]
Definition: alive.c:5
#define WM_COMMAND
Definition: winuser.h:1723
#define IDNO
Definition: winuser.h:830
#define WM_INITDIALOG
Definition: winuser.h:1722
#define LOWORD(l)
Definition: pedump.c:82

Referenced by IsNoOpen().

Member Data Documentation

◆ m_bListAllocated

BOOL COpenWithDialog::m_bListAllocated
private

Definition at line 767 of file COpenWithMenu.cpp.

Referenced by COpenWithDialog(), and ~COpenWithDialog().

◆ m_bNoOpen

BOOL COpenWithDialog::m_bNoOpen
private

Definition at line 772 of file COpenWithMenu.cpp.

Referenced by Init(), and IsNoOpen().

◆ m_hDialog

HWND COpenWithDialog::m_hDialog
private

Definition at line 768 of file COpenWithMenu.cpp.

Referenced by Accept(), Browse(), and Init().

◆ m_hImgList

HIMAGELIST COpenWithDialog::m_hImgList
private

Definition at line 771 of file COpenWithMenu.cpp.

Referenced by AddApp(), Init(), and ~COpenWithDialog().

◆ m_hOther

HTREEITEM COpenWithDialog::m_hOther
private

Definition at line 770 of file COpenWithMenu.cpp.

Referenced by AddApp(), and Init().

◆ m_hRecommend

HTREEITEM COpenWithDialog::m_hRecommend
private

Definition at line 769 of file COpenWithMenu.cpp.

Referenced by AddApp(), and Init().

◆ m_hTreeView

HWND COpenWithDialog::m_hTreeView
private

Definition at line 768 of file COpenWithMenu.cpp.

Referenced by AddApp(), GetCurrentApp(), and Init().

◆ m_pAppList

COpenWithList* COpenWithDialog::m_pAppList
private

Definition at line 766 of file COpenWithMenu.cpp.

Referenced by Accept(), AddApp(), Browse(), COpenWithDialog(), Init(), and ~COpenWithDialog().

◆ m_pInfo

const OPENASINFO* COpenWithDialog::m_pInfo
private

Definition at line 765 of file COpenWithMenu.cpp.

Referenced by Accept(), and Init().


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