Hello,
we're using emWiin 3.96.
We want to draw buttons with custom rounded borders. I'm using the following code en the button's callback:
static void btnTestCallback(WM_MESSAGE * pMsg)
{
// I must call the previous callback, otherwise the button doesn't render ok
if (previousButtonCallback != 0)
previousButtonCallback(pMsg);
if (pMsg->MsgId == WM_PAINT )
{
// Paint custom borders: BUG: Borders paint randomly, sometimes ok, sometimes wrong...
paintButtonBorder(pMsg->hWinSrc);
}
// else
// WM_DefaultProc(pMsg);
}
but the borders appear randomly, sometimes ok and sometimes wrong. I attach a test file code to try it.
I saw in another thread a new Message ID WM_POST_PAINT but it's not available in our emWin version 3.96.
any idea?
Thanks in advance,
Raúl Truco,
we're using emWiin 3.96.
We want to draw buttons with custom rounded borders. I'm using the following code en the button's callback:
static void btnTestCallback(WM_MESSAGE * pMsg)
{
// I must call the previous callback, otherwise the button doesn't render ok
if (previousButtonCallback != 0)
previousButtonCallback(pMsg);
if (pMsg->MsgId == WM_PAINT )
{
// Paint custom borders: BUG: Borders paint randomly, sometimes ok, sometimes wrong...
paintButtonBorder(pMsg->hWinSrc);
}
// else
// WM_DefaultProc(pMsg);
}
but the borders appear randomly, sometimes ok and sometimes wrong. I attach a test file code to try it.
I saw in another thread a new Message ID WM_POST_PAINT but it's not available in our emWin version 3.96.
any idea?
Thanks in advance,
Raúl Truco,