ATMFONT.C

Go to the documentation of this file.
00001 /* --
00002 OpenFX - Modelling, Animation and Rendering Package
00003 -- */
00004 
00005 /* file ATMFONT.C  ATM font builder interface */
00006 
00007 #define MODULE_ATMFONT 1
00008 
00009 #include "design.h"
00010 
00011 #include "atm.h"
00012 
00013 BOOL BuildATMfontString(HWND hwnd){
00014  static HMODULE hLibTrace=NULL;
00015  static ATM_STRUCTURE AtmStructure,*Atm=NULL;
00016  int i;
00017  char lname[255];
00018  BOOL status=FALSE;
00019  FARPROC fpFun;
00020  X__STRUCTURE *Evs;
00021  BOOL (*fpFun1)(HWND, char *, X__STRUCTURE *, ATM_STRUCTURE *);
00022  if(hLibTrace != NULL){
00023    return FALSE;
00024  }
00025  EDIT_ACTION=YES;
00026  Evs=&EviStructure;
00027  if(Atm == NULL){
00028    Atm=&AtmStructure;
00029    ZeroMemory(Atm,sizeof(ATM_STRUCTURE));
00030    Atm->ATM_face_colour[0]=255;
00031    Atm->ATM_side_colour[2]=255;
00032    Atm->ATM_beve_colour[0]=255; Atm->ATM_beve_colour[1]=255;
00033    Atm->ATM_bevel_angle=45;
00034    Atm->ATM_char_preview='Q';
00035    Atm->FORB=1;
00036    Atm->ATM_cap=1;
00037  }
00038  strcpy(Atm->ATM_Letters,"");
00039  strcpy(lname,gszHomeDir); strcat(lname,"ATM.dll");
00040  if((hLibTrace=LoadLibrary(lname)) != NULL){
00041    strcpy(lname,gszHomeDir);
00042    if((fpFun=GetProcAddress(hLibTrace,"_ATMbuilder")) != NULL){
00043      fpFun1 = (void *)fpFun;
00044      status=(*fpFun1)(hwnd,lname,Evs,Atm);
00045      if(status == TRUE){
00046      ;
00047      }
00048    }
00049    else MessageBox(hwnd,
00050         (LPCTSTR) "Failed to get function in Font Builder DLL",
00051         (LPCTSTR) "",
00052         MB_OK | MB_TASKMODAL );
00053    FreeLibrary(hLibTrace);
00054  }
00055  else MessageBox(hwnd,
00056                 (LPCTSTR)lname,
00057                 (LPCTSTR) "Failed to load the Font Builder DLL",
00058                 MB_OK | MB_TASKMODAL );
00059  hLibTrace=NULL;
00060  return status;
00061 }
00062 
00063 #include  "ttf.h"
00064 
00065 BOOL BuildTTFfontString(HWND hwnd){
00066  static HMODULE hLibTrace=NULL;
00067  static TTF_STRUCTURE TtfStructure,*Ttf=NULL;
00068  int i;
00069  char lname[255];
00070  BOOL status=FALSE;
00071  FARPROC fpFun;
00072  X__STRUCTURE *Evs;
00073  BOOL (*fpFun1)(HWND, char *, X__STRUCTURE *, TTF_STRUCTURE *);
00074  if(hLibTrace != NULL){
00075    return FALSE;
00076  }
00077  EDIT_ACTION=YES;
00078  Evs=&EviStructure;
00079  if(Ttf == NULL){
00080    Ttf=&TtfStructure;
00081    ZeroMemory(Ttf,sizeof(TTF_STRUCTURE));
00082    Ttf->TTF_face_colour[0]=255;
00083    Ttf->TTF_side_colour[2]=255;
00084    Ttf->TTF_beve_colour[0]=255;
00085    Ttf->TTF_beve_colour[1]=255;
00086    Ttf->TTF_bevel_angle=45;
00087    Ttf->TTF_char_preview='Q';
00088    Ttf->FORB=1;
00089    Ttf->TTF_cap=1;
00090  }
00091  strcpy(Ttf->TTF_Letters,"");
00092  strcpy(lname,gszHomeDir); strcat(lname,"TTF.dll");
00093  if((hLibTrace=LoadLibrary(lname)) != NULL){
00094    strcpy(lname,gszHomeDir);
00095    if((fpFun=GetProcAddress(hLibTrace,"_TTFbuilder")) != NULL){
00096      fpFun1 = (void *)fpFun;
00097      status=(*fpFun1)(hwnd,lname,Evs,Ttf);
00098      if(status == TRUE){
00099      ;
00100      }
00101    }
00102    else MessageBox(hwnd,
00103         (LPCTSTR) "Failed to get function in Font Builder DLL",
00104         (LPCTSTR) "",
00105         MB_OK | MB_TASKMODAL );
00106    FreeLibrary(hLibTrace);
00107  }
00108  else MessageBox(hwnd,
00109                 (LPCTSTR)lname,
00110                 (LPCTSTR) "Failed to load the Font Builder DLL",
00111                 MB_OK | MB_TASKMODAL );
00112  hLibTrace=NULL;
00113  return status;
00114 }

Generated on Sun Apr 27 14:20:10 2014 for OpenFX by  doxygen 1.5.6