Thanks, I ended up finding that out before I read your post. Now I need some help with the API function TextOut. I'm trying to make a function(s) to draw text on the window(also more to remove the text and get the text). I can't get TextOut to work right. Here's the code for my function:
Code:
struct Label {
long XPos;
long YPos;
char Caption[255];
long TxtLength;
HDC hDC;
};
void CreateLabel(long XPos,long YPos,char Caption[255],HDC hDC,RECT aRect) {
strcpy(lTextLabel[TextLabelCount].Caption,Caption);
lTextLabel[TextLabelCount].TxtLength=sizeof(Caption);
lTextLabel[TextLabelCount].XPos=XPos;
lTextLabel[TextLabelCount].YPos=YPos;
lTextLabel[TextLabelCount].hDC=hDC;
SetBkMode(lTextLabel[TextLabelCount].hDC, TRANSPARENT);
BeginPath(lTextLabel[TextLabelCount].hDC);
TextOut(hDC,aRect.top,aRect.left,"sweet",5);
//TextOut(lTextLabel[TextLabelCount].hDC,lTextLabel[TextLabelCount].XPos,lTextLabel[TextLabelCount].YPos,(char *)lTextLabel[TextLabelCount].Caption,lTextLabel[TextLabelCount].TxtLength);
EndPath(lTextLabel[TextLabelCount].hDC);
TextLabelCount++;
}
It isn't printing anything to the board when I use:
CreateLabel(50,50,"mytext",hDC,aRect);
I've already checked out MSDN but It doesn't help too much. Anyone have experience with this function?