Click here to Skip to main content
15,918,742 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralMemory Clean Pin
suresh_sathya3-Dec-02 0:19
suresh_sathya3-Dec-02 0:19 
GeneralRe: Memory Clean Pin
Christian Graus3-Dec-02 0:22
protectorChristian Graus3-Dec-02 0:22 
GeneralRe: Memory Clean Pin
dabs3-Dec-02 3:00
dabs3-Dec-02 3:00 
GeneralRe: Memory Clean Pin
Michael P Butler3-Dec-02 3:37
Michael P Butler3-Dec-02 3:37 
QuestionFlicker free List Ctrl ? Pin
Christoffer A. Andersen2-Dec-02 23:15
Christoffer A. Andersen2-Dec-02 23:15 
AnswerRe: Flicker free List Ctrl ? Pin
Christoffer A. Andersen3-Dec-02 0:00
Christoffer A. Andersen3-Dec-02 0:00 
GeneralRe: Flicker free List Ctrl ? Pin
KaЯl3-Dec-02 2:35
KaЯl3-Dec-02 2:35 
GeneralA problem related with DrawDibDraw Pin
springofcn2-Dec-02 22:23
springofcn2-Dec-02 22:23 
GeneralHelp On using CFontDialog in a Property sheets Pin
AnilG2-Dec-02 22:22
AnilG2-Dec-02 22:22 
GeneralActiveX Document Server Pin
Goa2-Dec-02 22:08
Goa2-Dec-02 22:08 
GeneralDialolgProc doesnt work Pin
Tili2-Dec-02 21:36
Tili2-Dec-02 21:36 
GeneralRe: DialolgProc doesnt work Pin
Rickard Andersson202-Dec-02 23:14
Rickard Andersson202-Dec-02 23:14 
GeneralRe: DialolgProc doesnt work Pin
Paul M Watt3-Dec-02 5:55
mentorPaul M Watt3-Dec-02 5:55 
GeneralRe: DialolgProc doesnt work Pin
Tili3-Dec-02 21:54
Tili3-Dec-02 21:54 
QuestionWhy can't use CFindReplaceDialog as A Base Class? Pin
zhdleonid2-Dec-02 21:17
zhdleonid2-Dec-02 21:17 
AnswerRe: Why can't use CFindReplaceDialog as A Base Class? Pin
jhwurmbach2-Dec-02 21:35
jhwurmbach2-Dec-02 21:35 
GeneralRe: Why can't use CFindReplaceDialog as A Base Class? Pin
zhdleonid2-Dec-02 22:02
zhdleonid2-Dec-02 22:02 
GeneralRe: Why can't use CFindReplaceDialog as A Base Class? Pin
zhdleonid2-Dec-02 23:17
zhdleonid2-Dec-02 23:17 
i have tried it .

but it is failed.

i find that if only replace the CDialog to CFindReplaceDialog is not the all
.
must be change more:
------------------------
<br />
// MyFindDlg.cpp : implementation file<br />
//<br />
#include "stdafx.h"<br />
#include "CFindTest.h"<br />
#include "MyFindDlg.h"<br />
#ifdef _DEBUG<br />
#define new DEBUG_NEW<br />
#undef THIS_FILE<br />
static char THIS_FILE[] = __FILE__;<br />
#endif<br />
<br />
/////////////////////////////////////////////////////////////////////////////<br />
// CMyFindDlg dialog<br />
<br />
IMPLEMENT_DYNAMIC(CMyFindDlg, CFindReplaceDialog) //NEW ADD:-O<br />
 <br />
CMyFindDlg::CMyFindDlg(BOOL bFindDialogOnly, LPCTSTR lpszFindWhat,<br />
             LPCTSTR lpszReplaceWith, DWORD dwFlags, CWnd* pParentWnd )<br />
	: CFindReplaceDialog() //NEW Add:-O<br />
  //you see CFindReplaceDialog() must be none parameter<br />
{<br />
}<br />
<br />
/*<br />
void CMyFindDlg::DoDataExchange(CDataExchange* pDX)<br />
{<br />
	CFindReplaceDialog::DoDataExchange(pDX);<br />
	//{{AFX_DATA_MAP(CMyFindDlg)<br />
		// NOTE: the ClassWizard will add DDX and DDV calls here<br />
	//}}AFX_DATA_MAP<br />
}<br />
*/ // it MUST BE DEL:-O<br />
<br />
BEGIN_MESSAGE_MAP(CMyFindDlg, CFindReplaceDialog)<br />
	//{{AFX_MSG_MAP(CMyFindDlg)<br />
	//}}AFX_MSG_MAP<br />
END_MESSAGE_MAP()<br />
<br />


-------------------------------------
<br />
#if !defined(AFX_MYFINDDLG_H__0F4D5405_8798_432C_91D0_46FB54833CE7__INCLUDED_)<br />
#define AFX_MYFINDDLG_H__0F4D5405_8798_432C_91D0_46FB54833CE7__INCLUDED_<br />
#if _MSC_VER > 1000<br />
#pragma once<br />
#endif // _MSC_VER > 1000<br />
// MyFindDlg.h : header file<br />
//<br />
/////////////////////////////////////////////////////////////////////////////<br />
// CMyFindDlg dialog<br />
class CMyFindDlg : public CFindReplaceDialog<br />
{<br />
	DECLARE_DYNAMIC(CMyFindDlg)  //NEW ADD:-O<br />
// Construction<br />
public:<br />
    CMyFindDlg( BOOL bFindDialogOnly,     //NEW ADD:-O<br />
             LPCTSTR lpszFindWhat,<br />
             LPCTSTR lpszReplaceWith = NULL,<br />
             DWORD dwFlags = FR_DOWN, <br />
             CWnd* pParentWnd = NULL );<br />
protected:<br />
	// Generated message map functions<br />
	//{{AFX_MSG(CMyFindDlg)<br />
	//}}AFX_MSG<br />
	DECLARE_MESSAGE_MAP()<br />
};<br />
//{{AFX_INSERT_LOCATION}}<br />
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.<br />
#endif // !defined(AFX_MYFINDDLG_H__0F4D5405_8798_432C_91D0_46FB54833CE7__INCLUDED_)<br />

---------------------

that is my NEW Class CMyFindDLg.

i use it in the CMainFrame ,but it has Failed.
void CMainFrame::OnFind() //a new
{
// TODO: Add your command handler code here
CMyFindDlg dlg; // i want to declare the Class CMyFindDlg object .Cry | :((
}

but have a error:
: error C2512: 'CMyFindDlg' : no appropriate default constructor available

how i will do ?????

thanks.

i feel good.
GeneralRe: Why can't use CFindReplaceDialog as A Base Class? Pin
jhwurmbach2-Dec-02 23:43
jhwurmbach2-Dec-02 23:43 
GeneralRe: Why can't use CFindReplaceDialog as A Base Class? Pin
zhdleonid3-Dec-02 0:49
zhdleonid3-Dec-02 0:49 
GeneralRe: Why can't use CFindReplaceDialog as A Base Class? Pin
jhwurmbach3-Dec-02 1:24
jhwurmbach3-Dec-02 1:24 
GeneralRe: Why can't use CFindReplaceDialog as A Base Class? Pin
zhdleonid3-Dec-02 2:40
zhdleonid3-Dec-02 2:40 
GeneralRe: Why can't use CFindReplaceDialog as A Base Class? Pin
Christian Graus2-Dec-02 23:43
protectorChristian Graus2-Dec-02 23:43 
GeneralRe: Why can't use CFindReplaceDialog as A Base Class? Pin
zhdleonid3-Dec-02 0:52
zhdleonid3-Dec-02 0:52 
GeneralRe: Why can't use CFindReplaceDialog as A Base Class? Pin
Christian Graus3-Dec-02 10:29
protectorChristian Graus3-Dec-02 10:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.