
iilegal call of non-static member function
Note that if you call the API funciton, you had better have a parent
HWND to associate it with; NULL HWND is an invitation to disaster,
because the messagebox can now fall underneath your app and be
invisible (since it is owned by the desktop).
::MessageBox(AfxGetMainWnd()->m_hWnd, ...)
should solve it.
joe
On Thu, 18 Oct 2001 13:42:18 +0100, "James Screech"
Quote:
>or the API messagebox
>::MessageBox()
>James
>message
>> > Hi,
>> > in my MFC-Application I'm using a callback function
>> > of a third party library (ssl) that can only call a
>> > static function, so that all functions I call within
>> > the static function must also be static. That's not
>> > a problem for my self-written functions, but how
>> > could I pop up a MessageBox. I got the error:
>> > Compiler Error C2352
>> > 'class::function' : illegal call of non-static member function
>> > bye
>> > Norbert
>> Hmm, use the global AfxMessageBox() instead ?
>> Lucian
Joseph M. Newcomer [MVP]
Web: http://www3.pgh.net/~newcomer
MVP Tips: http://www3.pgh.net/~newcomer/mvp_tips.htm