Click here to Skip to main content
15,921,837 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: LoadImage() memory leak. Pin
melwyn31-Oct-03 2:50
melwyn31-Oct-03 2:50 
GeneralDLL Pin
hph30-Oct-03 2:27
hph30-Oct-03 2:27 
GeneralRe: DLL Pin
Alexander M.,30-Oct-03 2:32
Alexander M.,30-Oct-03 2:32 
GeneralRe: DLL Pin
hph2-Nov-03 22:19
hph2-Nov-03 22:19 
GeneralRe: DLL Pin
JWood30-Oct-03 5:15
JWood30-Oct-03 5:15 
GeneralError in compilation - help! Pin
YaronNir30-Oct-03 2:26
YaronNir30-Oct-03 2:26 
GeneralRe: Error in compilation - help! Pin
jhwurmbach30-Oct-03 2:50
jhwurmbach30-Oct-03 2:50 
GeneralRe: Error in compilation - help! Pin
YaronNir30-Oct-03 3:02
YaronNir30-Oct-03 3:02 
hi thanks for reply


trouble is when i change the mothod CloseDialog from :

public:
	void CloseDialog();

to

public:
	static void CloseDialog();


i get the following 2 errors:

"...... : error C2664: 'AddTitleButton' : cannot convert parameter 1 from 'void (__cdecl *)(void)' to 'void (__cdecl *)(...)'
        This conversion requires a reinterpret_cast, a C-style cast or function-style cast
Generating Code...
Compiling...
BDRMainDlg.cpp
...... : error C2352: 'CDialog::EndDialog' : illegal call of non-static member function
        c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2610) : see declaration of 'EndDialog'"


the method CloseDialog has this body :

void CBDRMainDlg::CloseDialog()
{
	EndDialog(1);
}


i know that the static method shouldn't call EndDialog.. one way to resolve that is to pass the dialog CBDRMainDlg pointer to the method CloseDialog as follows:

void CBDRMainDlg::CloseDialog(CBDRMainDlg* pDlg)
{
	pDlg->EndDialog(1);
}


but if i do that, how do i send the CBDRMainDlg* as a parameter in the method:

dlg.AddTitleButton(CBDRMainDlg::CloseDialog, <====what do i pass here???
IDB_CLOSE_BTN_UP,
IDB_CLOSE_BTN_DOWN,
IDB_CLOSE_BTN_OVER,
IDB_CLOSE_BTN_DISABLED);



thanks again

Yaron

Ask not what your application can do for you,
Ask what you can do for your application
GeneralRe: Error in compilation - help! Pin
jhwurmbach30-Oct-03 3:15
jhwurmbach30-Oct-03 3:15 
GeneralDeep trouble,mail merge. Pin
vcseeker30-Oct-03 2:23
vcseeker30-Oct-03 2:23 
Generalconverting an int to a hex String Pin
BoudewijnEctor30-Oct-03 2:00
BoudewijnEctor30-Oct-03 2:00 
GeneralRe: converting an int to a hex String Pin
michael_cowan30-Oct-03 2:15
michael_cowan30-Oct-03 2:15 
GeneralRe: converting an int to a hex String Pin
Michael Dunn30-Oct-03 7:14
sitebuilderMichael Dunn30-Oct-03 7:14 
GeneralRe: converting an int to a hex String Pin
LozEvans30-Oct-03 23:47
LozEvans30-Oct-03 23:47 
GeneralRe: converting an int to a hex String Pin
vladimir_india23-Dec-03 6:55
vladimir_india23-Dec-03 6:55 
GeneralOne for the template experts Pin
roel_30-Oct-03 1:55
roel_30-Oct-03 1:55 
GeneralRe: One for the template experts Pin
valikac30-Oct-03 5:56
valikac30-Oct-03 5:56 
GeneralRe: One for the template experts Pin
Anonymous30-Oct-03 21:46
Anonymous30-Oct-03 21:46 
QuestionHow to Add/remove the Dialog caption and border at run time? Pin
adara30-Oct-03 1:25
adara30-Oct-03 1:25 
AnswerRe: How to Add/remove the Dialog caption and border at run time? Pin
kotbegemot30-Oct-03 1:43
kotbegemot30-Oct-03 1:43 
GeneralDynamic memory Pin
bhangie30-Oct-03 0:29
bhangie30-Oct-03 0:29 
GeneralRe: Dynamic memory Pin
Anthony_Yio30-Oct-03 0:45
Anthony_Yio30-Oct-03 0:45 
GeneralRe: Dynamic memory Pin
BadJerry30-Oct-03 0:56
BadJerry30-Oct-03 0:56 
GeneralRe: Dynamic memory Pin
David Crow30-Oct-03 3:15
David Crow30-Oct-03 3:15 
GeneralProblem using CArray Pin
d00_ape30-Oct-03 0:27
sussd00_ape30-Oct-03 0:27 

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.