(CW R4 (win), PalmPilot SDK 3.0)
When compiling my application that installs custom font, I'm getting this
warning (although it all compiles and works fine):


-----------------------------------------------------------
  Warning : illegal implicit enum conversion from 'int' to
  'fontID'
  MyApp.c line 576     FntDefineFont(myFont,fontP);
                                           -
-----------------------------------------------------------


when compiling this (only relevant excerpt):


-----------------------------------------------------------
  #define myFont                       129

   fontH=DmGetResource('Font',100);
   if (fontH!=NULL)
   {
    fontP=MemHandleLock(fontH);
    FntDefineFont(myFont,fontP);       //<<<<<<<WARNING!!!!!!!
   }
-----------------------------------------------------------


since parameters for FntDefineFont(FontID font, FontPtr fontP) are defined
in Font.h as:

-------------------------------------------------
enum fontID { 
  //not allowed to copy this but there are font names definitions
};

typedef enum fontID FontID;

extern Err FntDefineFont (FontID font, FontPtr fontP) ...sys trap etc...
-----------------------------------------------------

(custom font ID should be >128).


How should I define 'myFont' ID to avoid that warning (except changing
Font.h file)?



PS.
BTW, I have to say this: I had several questions about new font
installation here and directed to Palm, and NO Palm people ever gave any
answer or hint or reference. I thought it was real darkness in first,
although it wasn't. I don't understand why did they write to 'contact
Palm' for info near FntDefineFont function description in manual. The only
people that actually helped were Bozidar Benc and Constantine Klyatskin
from this group. Thanks guys!

Reply via email to