Hi Armend Gecaj
If you go to definition of D4D_DrawTextRectXY() function you can find:
#define D4D_DrawTextRectXY(x1, y1, x2, y2, buffText, colorText, colorBkgd) D4D_DrawTextRectTabXY(x1, y1, x2, y2, buffText, NULL, colorText, colorBkgd)
And the definition of D4D_DrawTextRectTabXY() function is:
void D4D_DrawTextRectTabXY(D4D_COOR x1, D4D_COOR y1, D4D_COOR x2, D4D_COOR y2, D4D_STRING* buffText, D4D_TAB* pTab, D4D_COLOR colorText, D4D_COLOR colorBkgd)
{
D4D_POINT tmp_point;
D4D_SIZE tmp_size;
tmp_point.x = x1;
tmp_point.y = y1;
tmp_size.cx = (D4D_COOR)(x2 - x1);
tmp_size.cy = (D4D_COOR)(y2 - y1);
D4D_DrawTextRectTab( &tmp_point, &tmp_size, buffText, pTab, colorText, colorBkgd);
}
where you can see that Text has to be a of type D4D_STRING*. As you can actually find D4D_STRING is a structure:
typedef struct D4D_STRING_S
{
D4D_TCHAR *pText;
D4D_INDEX buffSize;
D4D_FONT fontId;
D4D_STR_PROPERTIES *str_properties;
D4D_INDEX printLen;
D4D_INDEX printOff;
}D4D_STRING;
So, this is why you got the warning message, because you are from a (char *) to a D4D_STRING definition.
Hope this could helps you.
Have a great day,
Jorge Alcala
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------