00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include "pcggui.h"
00014
00015 extern ClassDesc2* GetpcgguiDesc();
00016
00017 HINSTANCE hInstance;
00018 int controlsInit = FALSE;
00019
00020
00021
00022
00023
00024
00025
00026 BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
00027 {
00028 hInstance = hinstDLL;
00029
00030 if (!controlsInit) {
00031 controlsInit = TRUE;
00032 InitCustomControls(hInstance);
00033 InitCommonControls();
00034 }
00035
00036 return (TRUE);
00037 }
00038
00039
00040
00041 __declspec( dllexport ) const TCHAR* LibDescription()
00042 {
00043 return GetString(IDS_LIBDESCRIPTION);
00044 }
00045
00046
00047
00048 __declspec( dllexport ) int LibNumberClasses()
00049 {
00050 return 1;
00051 }
00052
00053
00054 __declspec( dllexport ) ClassDesc* LibClassDesc(int i)
00055 {
00056 switch(i) {
00057 case 0: return GetpcgguiDesc();
00058 default: return 0;
00059 }
00060 }
00061
00062
00063
00064
00065 __declspec( dllexport ) ULONG LibVersion()
00066 {
00067 return VERSION_3DSMAX;
00068 }
00069
00070 TCHAR *GetString(int id)
00071 {
00072 static TCHAR buf[256];
00073
00074 if (hInstance)
00075 return LoadString(hInstance, id, buf, sizeof(buf)) ? buf : NULL;
00076 return NULL;
00077 }
00078