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

C / C++ / MFC

 
GeneralRe: LoadImage() memory leak. Pin
antlers30-Oct-03 7:58
antlers30-Oct-03 7:58 
GeneralRe: LoadImage() memory leak. Pin
Neha30-Oct-03 16:40
Neha30-Oct-03 16:40 
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 
Hi all,

i am creating a dialog like this:

CBDRMainDlg dlg(IDD_BDR_DIALOG);
dlg.AddTitleButton(<big>CBDRMainDlg::CloseDialog</big>,
		   IDB_CLOSE_BTN_UP,
		   IDB_CLOSE_BTN_DOWN,
		   IDB_CLOSE_BTN_OVER,
		   IDB_CLOSE_BTN_DISABLED);


as you can see the first parameter is a pointer to a method CBDRMainDlg::CloseDialog

the method AddTitleButton is defined like this:

typedef void (* FUNC_PTR)(...); // notice the function may or may not receive parameters
.
.
.
void AddTitleButton(FUNC_PTR func,
		    UINT idNormal, 
		    UINT idDown,
		    UINT idOver			  = 0,
		    UINT idDisabled		  = 0,
		    CString szTitle		  = _T(""),
		    COLORREF rgbTextColor = BUTTON_FX_BASE_TEXT_COLOR,
		    enBtnState eBtnState  = bsNormal);


as you can see the first parameter is a typedef of a pointer to a function.

the passed method is defined like this:

.
.
public:
	void CloseDialog();


trouble is a get an error compilation:
"error C2664: 'AddTitleButton' : cannot convert parameter 1 from 'void (__thiscall CBDRMainDlg::*)(void)' to 'void (__cdecl *)(...)'
There is no context in which this conversion is possible"

can any1 help?

thanks in advanced
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 2:50
jhwurmbach30-Oct-03 2:50 
GeneralRe: Error in compilation - help! Pin
YaronNir30-Oct-03 3:02
YaronNir30-Oct-03 3:02 
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 

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.