XUTILS.C

Go to the documentation of this file.
00001 /* --
00002 OpenFX version 2.0 - Modelling, Animation and Rendering Package
00003 Copyright (C) 2000 - 2007 OpenFX Development Team
00004 -- */
00005 
00006 /* file xutils.c  */
00007 
00008 #include <windows.h>
00009 
00010 #include "..\animate\astruct.h"
00011 #include "..\animate\dstruct.h"
00012 
00013 void CentreDialogOnScreen(HWND hwnd){
00014  RECT rcDlg;
00015  long Xres,Yres;
00016  Yres=GetSystemMetrics(SM_CYSCREEN);
00017  Xres=GetSystemMetrics(SM_CXSCREEN);
00018  GetWindowRect(hwnd,&rcDlg);
00019  OffsetRect(&rcDlg,-rcDlg.left,-rcDlg.top);
00020  OffsetRect(&rcDlg,(Xres-rcDlg.right)/2,(Yres-rcDlg.bottom)/2);
00021  SetWindowPos(hwnd,HWND_TOP,rcDlg.left,rcDlg.top,0,0,SWP_NOSIZE);
00022  return;
00023 }
00024 
00025 long GetActorsID(void *lpevi, HWND parent){
00026  if(lpevi == NULL){
00027    MessageBox(parent,"Cannot Assign Actor",NULL,MB_OK);
00028    return -1;
00029  }
00030  lpEVI=(ANI_STRUCTURE *)lpevi;
00031  return SelectNodeID(parent);
00032 }
00033 
00034 char *GetActorsName(void *lpevi, long id){
00035  node *Np;
00036  if(lpevi == NULL)return NULL;
00037  lpEVI=(ANI_STRUCTURE *)lpevi;
00038  Np=MainNp; while(Np != NULL){
00039    if(Np->ID == id)return Np->actorname;
00040    Np=Np->last;
00041  }
00042  return NULL;
00043 }
00044 
00045 BOOL XimageFileName(void *lpevi, char *f_name, char *direct, char *title,
00046                    char *filter, HWND parent){
00047  char f_dir[256];
00048  lpEVI=(ANI_STRUCTURE *)lpevi;
00049  strcpy(f_dir,gszHomeDir); strcat(f_dir,direct);
00050  return SelectFileName(0,f_name,f_dir,title,filter,parent);
00051 }

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