I've started using a label in an app instead of WinDrawChars
because the label's position is easier to localize, but I've run
into some problems trying to erase it.
   I suppose I've never understood the distinction between labels and
controls--why is it, for example, that CtlSetLabel sets a control's
label but FrmCopyLabel sets a label's "label"?
   CltEraseLabel doesn't erase a label, and there's no corresponding
FrmEraseLabel, so I've resorted to the following:

   FormLabelType *lbl = GetObjectPtr(idLabelScore);

   // clear the old score
   FontID oldFont = FntSetFont(lbl->fontID);
   StrCopy(string, lbl->text);
   WinInvertChars(string, StrLen(string), lbl->pos.x, lbl->pos.y);
   FntSetFont(oldFont);

Does anyone know of a better (read: using API's) way?

Thanks,
Daniel.


Reply via email to