ReactOS  0.4.15-dev-4927-gfe8f806
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 769 of file COpenWithMenu.cpp.

Constructor & Destructor Documentation

◆ COpenWithDialog()

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

Definition at line 795 of file COpenWithMenu.cpp.

795  :
796  m_pInfo(pInfo), m_pAppList(pAppList), m_hImgList(NULL), m_bNoOpen(FALSE)
797 {
798  if (!m_pAppList)
799  {
802  }
803  else
805 }
#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 807 of file COpenWithMenu.cpp.

808 {
810  delete m_pAppList;
811  if (m_hImgList)
813 }
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 1026 of file COpenWithMenu.cpp.

1027 {
1029  if (pApp)
1030  {
1031  /* Set programm as default handler */
1032  if (SendDlgItemMessage(m_hDialog, 14003, BM_GETCHECK, 0, 0) == BST_CHECKED)
1034 
1035  /* Execute program */
1036  if (m_pInfo->oaifInFlags & OAIF_EXEC)
1038 
1039  EndDialog(m_hDialog, 1);
1040  }
1041 }
COpenWithList::SApp * GetCurrentApp()
LPCWSTR pcszFile
Definition: shlobj.h:2532
OPEN_AS_INFO_FLAGS oaifInFlags
Definition: shlobj.h:2534
#define SendDlgItemMessage
Definition: winuser.h:5822
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
const OPENASINFO * m_pInfo
#define BM_GETCHECK
Definition: winuser.h:1905
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 862 of file COpenWithMenu.cpp.

863 {
864  LPCWSTR pwszName = m_pAppList->GetName(pApp);
865  HICON hIcon = m_pAppList->GetIcon(pApp);
866 
867  TRACE("AddApp Cmd %ls Name %ls\n", pApp->wszCmd, pwszName);
868 
869  /* Add item to the list */
870  TVINSERTSTRUCT tvins;
871 
872  if (pApp->bRecommended)
873  tvins.hParent = tvins.hInsertAfter = m_hRecommend;
874  else
875  tvins.hParent = tvins.hInsertAfter = m_hOther;
876 
877  tvins.item.mask = TVIF_TEXT|TVIF_PARAM;
878  tvins.item.pszText = (LPWSTR)pwszName;
879  tvins.item.lParam = (LPARAM)pApp;
880 
881  if (hIcon)
882  {
883  tvins.item.mask |= TVIF_IMAGE | TVIF_SELECTEDIMAGE;
884  tvins.item.iImage = tvins.item.iSelectedImage = ImageList_AddIcon(m_hImgList, hIcon);
885  }
886 
888 
889  if (bSelected)
891 }
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 893 of file COpenWithMenu.cpp.

894 {
895  WCHAR wszTitle[64];
896  WCHAR wszFilter[256];
897  WCHAR wszPath[MAX_PATH];
899 
900  /* Initialize OPENFILENAMEW structure */
901  ZeroMemory(&ofn, sizeof(OPENFILENAMEW));
902  ofn.lStructSize = sizeof(OPENFILENAMEW);
906  ofn.nMaxFile = (sizeof(wszPath) / sizeof(WCHAR));
907  ofn.lpstrFile = wszPath;
908  ofn.lpstrInitialDir = L"%programfiles%";
909 
910  /* Init title */
911  if (LoadStringW(shell32_hInstance, IDS_OPEN_WITH, wszTitle, sizeof(wszTitle) / sizeof(WCHAR)))
912  {
913  ofn.lpstrTitle = wszTitle;
914  ofn.nMaxFileTitle = wcslen(wszTitle);
915  }
916 
917  /* Init the filter string */
920  ZeroMemory(wszPath, sizeof(wszPath));
921 
922  /* Create OpenFile dialog */
923  if (!GetOpenFileNameW(&ofn))
924  return;
925 
926  /* Setup context for insert proc */
927  COpenWithList::SApp *pApp = m_pAppList->Add(wszPath);
928  AddApp(pApp, TRUE);
929 }
#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:1667
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
#define L(x)
Definition: ntvdm.h:50
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
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 1043 of file COpenWithMenu.cpp.

1044 {
1045  COpenWithDialog *pThis = reinterpret_cast<COpenWithDialog *>(GetWindowLongPtr(hwndDlg, DWLP_USER));
1046 
1047  switch(uMsg)
1048  {
1049  case WM_INITDIALOG:
1050  {
1051  COpenWithDialog *pThis = reinterpret_cast<COpenWithDialog *>(lParam);
1052 
1053  pThis->Init(hwndDlg);
1054  return TRUE;
1055  }
1056  case WM_COMMAND:
1057  switch(LOWORD(wParam))
1058  {
1059  case 14004: /* browse */
1060  {
1061  pThis->Browse();
1062  return TRUE;
1063  }
1064  case IDOK: /* ok */
1065  {
1066  pThis->Accept();
1067  return TRUE;
1068  }
1069  case IDCANCEL: /* cancel */
1070  EndDialog(hwndDlg, 0);
1071  return TRUE;
1072  default:
1073  break;
1074  }
1075  break;
1076  case WM_NOTIFY:
1077  switch (((LPNMHDR)lParam)->code)
1078  {
1079  case TVN_SELCHANGED:
1080  EnableWindow(GetDlgItem(hwndDlg, IDOK), pThis->GetCurrentApp() ? TRUE : FALSE);
1081  break;
1082  case NM_DBLCLK:
1083  case NM_RETURN:
1084  pThis->Accept();
1085  break;
1086  }
1087  break;
1088  case WM_CLOSE:
1089  EndDialog(hwndDlg, 0);
1090  return TRUE;
1091  default:
1092  break;
1093  }
1094  return FALSE;
1095 }
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:1608
#define DWLP_USER
Definition: winuser.h:866
#define WM_COMMAND
Definition: winuser.h:1727
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:1726
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 931 of file COpenWithMenu.cpp.

932 {
933  TVITEM tvi;
934  tvi.hItem = TreeView_GetSelection(m_hTreeView);
935  if (!tvi.hItem)
936  return NULL;
937 
938  tvi.mask = TVIF_PARAM;
939  if (!TreeView_GetItem(m_hTreeView, &tvi))
940  return NULL;
941 
942  return (COpenWithList::SApp*)tvi.lParam;
943 }
#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 945 of file COpenWithMenu.cpp.

946 {
947  TRACE("COpenWithDialog::Init hwnd %p\n", hwnd);
948 
949  m_hDialog = hwnd;
951 
952  /* Handle register checkbox */
953  HWND hRegisterCheckbox = GetDlgItem(hwnd, 14003);
955  EnableWindow(hRegisterCheckbox, FALSE);
957  SendMessage(hRegisterCheckbox, BM_SETCHECK, BST_CHECKED, 0);
959  ShowWindow(hRegisterCheckbox, SW_HIDE);
960 
961  if (m_pInfo->pcszFile)
962  {
963  WCHAR wszBuf[MAX_PATH];
964  UINT cchBuf;
965 
966  /* Add filename to label */
967  cchBuf = GetDlgItemTextW(hwnd, 14001, wszBuf, _countof(wszBuf));
968  StringCchCopyW(wszBuf + cchBuf, _countof(wszBuf) - cchBuf, PathFindFileNameW(m_pInfo->pcszFile));
969  SetDlgItemTextW(hwnd, 14001, wszBuf);
970 
971  /* Load applications from registry */
972  m_pAppList->Load();
974 
975  /* Determine if the type of file can be opened directly from the shell */
976  if (m_pAppList->IsNoOpen() != FALSE)
977  m_bNoOpen = TRUE;
978 
979  /* Init treeview */
980  m_hTreeView = GetDlgItem(hwnd, 14002);
983 
984  /* If there are some recommendations add parent nodes: Recommended and Others */
985  UINT cRecommended = m_pAppList->GetRecommendedCount();
986  if (cRecommended > 0)
987  {
988  TVINSERTSTRUCT tvins;
989  HICON hFolderIcon;
990 
991  tvins.hParent = tvins.hInsertAfter = TVI_ROOT;
993  tvins.item.pszText = (LPWSTR)wszBuf;
994  tvins.item.state = tvins.item.stateMask = TVIS_EXPANDED;
996  tvins.item.iImage = tvins.item.iSelectedImage = ImageList_AddIcon(m_hImgList, hFolderIcon);
997 
1000 
1003  }
1004  else
1006 
1007  /* Add all applications */
1008  BOOL bNoAppSelected = TRUE;
1009  COpenWithList::SApp *pAppList = m_pAppList->GetList();
1010  for (UINT i = 0; i < m_pAppList->GetCount(); ++i)
1011  {
1012  if (!COpenWithList::IsHidden(&pAppList[i]))
1013  {
1014  if (bNoAppSelected && (pAppList[i].bRecommended || !cRecommended))
1015  {
1016  AddApp(&pAppList[i], TRUE);
1017  bNoAppSelected = FALSE;
1018  }
1019  else
1020  AddApp(&pAppList[i], FALSE);
1021  }
1022  }
1023  }
1024 }
#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:2532
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:2534
#define TVIF_SELECTEDIMAGE
Definition: commctrl.h:3271
#define IDI_SHELL_PROGRAMS_FOLDER
Definition: shresdef.h:543
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:1908
#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:5823
UINT GetRecommendedCount()
#define TVIF_STATE
Definition: commctrl.h:3269
#define LoadImage
Definition: winuser.h:5795
WCHAR * LPWSTR
Definition: xmlstorage.h:184
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4022
VOID AddApp(COpenWithList::SApp *pApp, BOOL bSelected)

Referenced by DialogProc().

◆ IsNoOpen()

BOOL COpenWithDialog::IsNoOpen ( HWND  hwnd)

Definition at line 843 of file COpenWithMenu.cpp.

844 {
845  /* Only do the actual check if the file type has the 'NoOpen' flag. */
846  if (m_bNoOpen)
847  {
849 
850  if (dReturnValue == IDNO)
851  return TRUE;
852  else if (dReturnValue == -1)
853  {
854  ERR("IsNoOpen failed to load the dialog box.\n");
855  return TRUE;
856  }
857  }
858 
859  return FALSE;
860 }
#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:5741
#define FALSE
Definition: types.h:117
#define ERR(fmt,...)
Definition: debug.h:110
#define shell32_hInstance
#define IDNO
Definition: winuser.h:830
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4022
#define IDD_NOOPEN
Definition: shresdef.h:492

Referenced by SHOpenWithDialog().

◆ NoOpenDlgProc()

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

Definition at line 815 of file COpenWithMenu.cpp.

816 {
817  switch(Message)
818  {
819  case WM_INITDIALOG:
820  {
821  return TRUE;
822  }
823  case WM_CLOSE:
824  EndDialog(hwnd, IDNO);
825  break;
826  case WM_COMMAND:
827  switch(LOWORD(wParam))
828  {
829  case IDYES:
830  EndDialog(hwnd, IDYES);
831  break;
832  case IDNO:
833  EndDialog(hwnd, IDNO);
834  break;
835  }
836  break;
837  default:
838  return FALSE;
839  }
840  return TRUE;
841 }
#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:1608
CHAR Message[80]
Definition: alive.c:5
#define WM_COMMAND
Definition: winuser.h:1727
#define IDNO
Definition: winuser.h:830
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4022
#define WM_INITDIALOG
Definition: winuser.h:1726
#define LOWORD(l)
Definition: pedump.c:82

Referenced by IsNoOpen().

Member Data Documentation

◆ m_bListAllocated

BOOL COpenWithDialog::m_bListAllocated
private

Definition at line 787 of file COpenWithMenu.cpp.

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

◆ m_bNoOpen

BOOL COpenWithDialog::m_bNoOpen
private

Definition at line 792 of file COpenWithMenu.cpp.

Referenced by Init(), and IsNoOpen().

◆ m_hDialog

HWND COpenWithDialog::m_hDialog
private

Definition at line 788 of file COpenWithMenu.cpp.

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

◆ m_hImgList

HIMAGELIST COpenWithDialog::m_hImgList
private

Definition at line 791 of file COpenWithMenu.cpp.

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

◆ m_hOther

HTREEITEM COpenWithDialog::m_hOther
private

Definition at line 790 of file COpenWithMenu.cpp.

Referenced by AddApp(), and Init().

◆ m_hRecommend

HTREEITEM COpenWithDialog::m_hRecommend
private

Definition at line 789 of file COpenWithMenu.cpp.

Referenced by AddApp(), and Init().

◆ m_hTreeView

HWND COpenWithDialog::m_hTreeView
private

Definition at line 788 of file COpenWithMenu.cpp.

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

◆ m_pAppList

COpenWithList* COpenWithDialog::m_pAppList
private

Definition at line 786 of file COpenWithMenu.cpp.

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

◆ m_pInfo

const OPENASINFO* COpenWithDialog::m_pInfo
private

Definition at line 785 of file COpenWithMenu.cpp.

Referenced by Accept(), and Init().


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