Joseph M. Newcomer wrote:
I missed that part where you are creating an instance of "STATIC". This is a Really Bad
Idea, because you get a lot of CStatic semantics. Once you've declared the parent to be
of type CWnd, it is very risky to use any built-in window type as your child class. As
pointed out, SS_NOTIFY is essential, but I think the real error here is specifying a class
at all. Just leave that as NULL and MFC will "invent" a class for you.
joe
On Fri, 2 Jun 2006 06:48:23 -0500, "Jeff Partch [MVP]" <jeffp@mvps.org> wrote:
<radishcarrot@yahoo.com> wrote in message
news:1149239166.757847.106390@h76g2000cwa.googlegroups.com...
So at class CTester, I have the following code for the create method
that calls the create method of the parent class:
void GLViewer::Create(int x, int y, int w, int h, void *father)
//should passin parameter
{
if(m_created==0) {
if(CGLWinTarget::Create(_T("STATIC"),NULL,WS_CHILD|WS_VISIBLE,CRect(x,y,w,h),
(CWnd *) father,0)) {
CDC *m_pDC = this->GetDC();
.....
}
}
}
But not sure as to why I cant access the mouse action... any clues??
thanks
Try giving it the SS_NOTIFY style as well, or intercepting WM_NCHITTEST -- I
believe that without this style and left to their own message handling,
static controls return HTTRANSPARENT in response.
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
thanks guys... it works after puting the SS_NOTIFY... cheers