XUTILS.C
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
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 }