?
=?iso-8859-2?Q?Piotr_W=F3jcicki?=
I want my class to draw on MainForm, when MainForm receives OnPaint Message
In MailFrame i have
BEGIN_MSG_MAP(CMainFrame)
CHAIN_MSG_MAP(Tekst)
END_MSG_MAP
//tekst.h
#include <atlbase.h>
#include <atlapp.h>
#include <atlcrack.h>
class Tekst
{
BEGIN_MSG_MAP_EX(Tekst)
MSG_WM_PAINT(OnPaint)
END_MSG_MAP
void OnPaint(HDC hdc)
{
TextOut(hdc, 20, 20, "22",2);
SetMsgHandled(false);
}
};
When i compile :
error c2352 : 'Tekst :rocessWindowMessage' : illegal call of non-static
memeber function.
I try to write some simple controls using WTL, so i want my class to be able
to manage messages in its own.
I believe i lack some knowledge, how to use chainmessages in WTL so i would
aprreciate for a piece of advice
Piotr Wojcicki
In MailFrame i have
BEGIN_MSG_MAP(CMainFrame)
CHAIN_MSG_MAP(Tekst)
END_MSG_MAP
//tekst.h
#include <atlbase.h>
#include <atlapp.h>
#include <atlcrack.h>
class Tekst
{
BEGIN_MSG_MAP_EX(Tekst)
MSG_WM_PAINT(OnPaint)
END_MSG_MAP
void OnPaint(HDC hdc)
{
TextOut(hdc, 20, 20, "22",2);
SetMsgHandled(false);
}
};
When i compile :
error c2352 : 'Tekst :rocessWindowMessage' : illegal call of non-static
memeber function.
I try to write some simple controls using WTL, so i want my class to be able
to manage messages in its own.
I believe i lack some knowledge, how to use chainmessages in WTL so i would
aprreciate for a piece of advice
Piotr Wojcicki