011
18.05.2004, 21:38 Uhr
Windalf
Der wo fast so viele Posts wie FloSoft... (Operator)
|
Bisher bin ich soweit... den Klassenassi zu benutzen war ne gute Idee... vielen Dank an mike
C++: |
#if !defined(AFX_EXCELTXTFILEDIALOG_H__37E14FAF_129B_4F34_80E4_870780EC9CFF__INCLUDED_) #define AFX_EXCELTXTFILEDIALOG_H__37E14FAF_129B_4F34_80E4_870780EC9CFF__INCLUDED_
#if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // ExcelTxtFileDialog.h : header file //
///////////////////////////////////////////////////////////////////////////// // CExcelTxtFileDialog dialog
class CExcelTxtFileDialog : public CFileDialog { DECLARE_DYNAMIC(CExcelTxtFileDialog)
public: CExcelTxtFileDialog(BOOL bOpenFileDialog, LPCTSTR lpszDefExt = NULL, LPCTSTR lpszFileName = NULL, DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, LPCTSTR lpszFilter = NULL, CWnd* pParentWnd = NULL);
protected: //{{AFX_MSG(CExcelTxtFileDialog) afx_msg void OnTypeChange(); //}}AFX_MSG DECLARE_MESSAGE_MAP() };
//{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_EXCELTXTFILEDIALOG_H__37E14FAF_129B_4F34_80E4_870780EC9CFF__INCLUDED_)
|
C++: |
#include "stdafx.h" #include "blabla.h" #include "ExcelTxtFileDialog.h"
#ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif
///////////////////////////////////////////////////////////////////////////// // CExcelTxtFileDialog
IMPLEMENT_DYNAMIC(CExcelTxtFileDialog, CFileDialog)
CExcelTxtFileDialog::CExcelTxtFileDialog(BOOL bOpenFileDialog, LPCTSTR lpszDefExt, LPCTSTR lpszFileName,DWORD dwFlags, LPCTSTR lpszFilter, CWnd* pParentWnd):CFileDialog(bOpenFileDialog, lpszDefExt, lpszFileName, dwFlags, lpszFilter, pParentWnd){}
BEGIN_MESSAGE_MAP(CExcelTxtFileDialog, CFileDialog) //{{AFX_MSG_MAP(CExcelTxtFileDialog) // NOTE - the ClassWizard will add and remove mapping macros here. //}}AFX_MSG_MAP END_MESSAGE_MAP()
void CExcelTxtFileDialog::OnTypeChange(){ //kann man hier nicht irgendwie anders drauf zugreifen..einfach nur hex480 ist ein wenig unbefriedigend GetParent()->GetDlgItem(0x480)->SetWindowText("Liste"); CFileDialog::OnTypeChange(); }
|
so das bringt mich abschliessend zu folgender Frage... Wie find ich heraus welchen Typ der user ausgewählt hat? -- ...fleißig wie zwei Weißbrote |