Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

68 lines
1.5 KiB

#include "shellprv.h"
#include "ids.h"
#include "ftcmmn.h"
#include "ftdlg.h"
#include "ftascstr.h" //there only for the new CFTAssocStore
CFTDlg::CFTDlg(ULONG_PTR ulpAHelpIDsArray) :
CBaseDlg(ulpAHelpIDsArray), _pAssocStore(NULL)
{}
CFTDlg::~CFTDlg()
{
if (_pAssocStore)
delete _pAssocStore;
}
HRESULT CFTDlg::_InitAssocStore()
{
ASSERT(!_pAssocStore);
_pAssocStore = new CFTAssocStore();
return _pAssocStore ? S_OK : E_OUTOFMEMORY;
}
///////////////////////////////////////////////////////////////////////////////
// Windows boiler plate code
LRESULT CFTDlg::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
LRESULT lRes = FALSE;
switch(uMsg)
{
case WM_CTRL_SETFOCUS:
lRes = OnCtrlSetFocus(wParam, lParam);
break;
default:
lRes = CBaseDlg::WndProc(uMsg, wParam, lParam);
break;
}
return lRes;
}
LRESULT CFTDlg::OnCtrlSetFocus(WPARAM wParam, LPARAM lParam)
{
SetFocus((HWND)lParam);
return TRUE;
}
//static
void CFTDlg::MakeDefaultProgIDDescrFromExt(LPTSTR pszProgIDDescr, DWORD cchProgIDDescr,
LPTSTR pszExt)
{
TCHAR szTemplate[25];
TCHAR szExt[MAX_EXT];
StringCchCopy(szExt, ARRAYSIZE(szExt), pszExt);
LoadString(g_hinst, IDS_EXTTYPETEMPLATE, szTemplate, ARRAYSIZE(szTemplate));
CharUpper(szExt);
StringCchPrintf(pszProgIDDescr, cchProgIDDescr, szTemplate, szExt);
}