G
gw7rib
Suppose I have a function, whose protoype is somewhat complicated, for
example, with some #defines and typedefs, it looks like this:
INT_PTR CALLBACK PropDlgProc(HWND hDlg, UINT message, WPARAM wParam,
LPARAM lParam);
and I'm not allowed to make it a member function <OT> because it's a
dialog box function </OT>.
I want to make it a friend of my class, because it updates class
members and I don't really want the class members to be public.
Can I do something simple like:
friend PropDlgProc;
or does it have to be the full-blown:
friend INT_PTR CALLBACK PropDlgProc(HWND hDlg, UINT message, WPARAM
wParam, LPARAM lParam);
It seems a bit unnecessary to spell it all out again, particularly as
I'm going to spell it all out a third time when I get to the function
body.
Can anyone advise?
TIA
Paul.
example, with some #defines and typedefs, it looks like this:
INT_PTR CALLBACK PropDlgProc(HWND hDlg, UINT message, WPARAM wParam,
LPARAM lParam);
and I'm not allowed to make it a member function <OT> because it's a
dialog box function </OT>.
I want to make it a friend of my class, because it updates class
members and I don't really want the class members to be public.
Can I do something simple like:
friend PropDlgProc;
or does it have to be the full-blown:
friend INT_PTR CALLBACK PropDlgProc(HWND hDlg, UINT message, WPARAM
wParam, LPARAM lParam);
It seems a bit unnecessary to spell it all out again, particularly as
I'm going to spell it all out a third time when I get to the function
body.
Can anyone advise?
TIA
Paul.