from MSDN: https://msdn.microsoft.com/en-us/library/windows/desktop/dd145213%28v=vs.85%29.aspx
"An application returns zero if it processes this message."
see these code on my label control:
case WM_PAINT:
{
PAINTSTRUCT test;
BeginPaint(inst->hwnd, &test);
image imglabel(inst->imgtest.width(),inst->imgtest.height());
brush brshbackcolor(inst->clrBackColor);
imglabel.Backcolor=inst->clrBackColor;
brush brshTransparent;
FillRect(imglabel,&test.rcPaint,brshbackcolor);
if(inst->imgtest.haveimage())
DrawHICONtoHDC(imglabel, inst->imgtest);
imglabel.DrawText(inst->strCaption);
pen penColor(1,2,RGB(0,255,0));
penColor.ToDC(imglabel);
imglabel.DrawRectangle(10,10,10,10);
pen penColor2(1,2,RGB(255,0,0));
penColor2.ToDC(imglabel);
imglabel.DrawLine(0,0,20,20);
pen penColor3(1,2,RGB(0,0,255));
penColor3.ToDC(imglabel);
//brshTransparent.ToDC(imglabel);
imglabel.DrawEllipse(0,0,20,20);
//imglabel.DrawLine(0,0,20,20);
if(inst->blnBorder==true)
DrawEdge(imglabel, &test.rcPaint,BDR_SUNKENINNER | BDR_RAISEDOUTER,BF_RECT);
if(inst->blnTransparent==true)
{
//destroy the region
SetWindowRgn(inst->hwnd,NULL,FALSE);
//draw the image transparent
TransparentBlt(test.hdc,0,0,test.rcPaint.right,test.rcPaint.bottom,imglabel,0,0, test.rcPaint.right ,test.rcPaint.bottom, inst->clrBackColor);
//Create and set them region
inst->LabelRegion=RegionbyBitmap(imglabel, inst->clrBackColor);
SetWindowRgn(inst->hwnd,inst->LabelRegion,FALSE);
}
else
{
SetWindowRgn(inst->hwnd,NULL,FALSE);
BitBlt(test.hdc,0,0,imglabel.width(),imglabel.height(),imglabel,0,0,SRCCOPY);
}
EndPaint(inst->hwnd, &test);
return 0;
}
break;
some code can be confused, but like you see, i return 0.
but the ToolTip is blocked :(
if i put the label hidded, the ToolTip is showed. seems that i have here a problem. can anyone advice me?