Hello! if you only check the string of the filename,you can check if the string have the list of "./?;'". if you check whether the file is existent, you can use code as follow in VC6.0 : BOOL CheckIfFileExists (LPCTSTR szFileName) { ASSERT( szFileName != NULL ); if( _tcslen(szFileName) == 0 ) return FALSE; DWORD dwAttr = GetFileAttributes(szFileName); if( dwAttr == 0xFFFFFFFF ) return FALSE; return (dwAttr & FILE_ATTRIBUTE_DIRECTORY) == 0; } dupengfei
PengFeidu
Posts
-
How to Detect Invalid Filenames -
Fatal errorYour program can't locate library named "fltk.lib" please add the correct directory of fltk.lib into setting panel in project menu. position: choose "link" category : input object/library modules : "your path of fltk.lib" dupengfei
-
Data type?hi Maybe your computer donot support Big5 code. CString is a good idea to process string. if you can't use it. I suggest that: to vc, char also is integer type, so you can do it as follow: static DWORD szChar[]={"你好嘛?"} hope a little help for you! dupengfei
-
Problem with CBitmap (MFC prog)hi! When you saved the temp file , I think you didnot make the properly bitmap header which is a struct "BITMAPINFO". so it displayed blank picture. good luck dupengfei
-
Fatal Error C1010 !!!please include"stdafx.h" in source file and header file, or turn using precompilerd header off in program setting. if you turn on using precompiled header, vc will compile the source code beginning at stdafx.h hope this helps to you. dupengfei
-
program nt responding--errorhi! where is onsearch() called in? Maybe you have called this function in other procedure actived by EN_SETFOCUS message. dupengfei
-
Why have header files?it make you clearer for your Class definition. at the same time ,It is a good iead to protected your source code. dupengfei
-
Visual Studio 6 : jumping to a methodI think the ide havenot create browse file for workspace. rebuild it,and cover cursor on the mothed, press F12,you can reach to where it definited. dupengfei
-
multiple undo/redoI suggest that : first way: maybe you can use IStorage and IStream; before user change the object, you create IStorage object and save user's object data to Storage. if user undo his change, load this object. secondly: use clipboard, you can create the different clip tags but the tags have the same letter such as "'object1', 'object2','object3'...." if user undo object3, you can load object2. certainly, the memory is limmitted. so can set fixed num for operatoring. hope helpful for you. good luck dupengfei
-
databaseODBC is a engine to access the database developping by ms. using it,you can access all kinds of database software which can be work on windows 9x&2k&xp. it construct a way from your platform software to the databse. sql is structure query language for short. your sql is a database management software developping by ms. Ocracle give you powerful function. it can manage the largest data. ADO is Com compenment and can place the odbc. dupengfei
-
is is posible to store GIF as resource?CMemFile fMem; LPBYTE lpByte = fMem.Detach(); after create the memory file , you can use this function "Detch" to get the pointer to file. then operator it with pointer freely. dupengfei
-
is is posible to store GIF as resource?CMemFile is the CFile-derived class But supports memory files . if you want particular content, press "CMemFile" in the index cote of MSDN. the article is detailed in msdn. dupengfei
-
is is posible to store GIF as resource?Maybe CMemFile help you. pengfeidu
-
Need some Help -- Kinda of Dense!for storing the object,I often use CFile class to write into disk, or use IStorage and IStream. dupengfei
-
compiler errors - I am confusedJoe Woodbury have detailed it. the same you can include"stdafx.h" to solve it . dupengfei
-
COM/DCOM Learningplease give the internet address out dupengfei
-
why CoCreateInstance( ... IID_IShellLink, ..) failedMaybe you didnot register on others' computer dupengfei
-
can not access the calss view????is the class view empty? yeah,when I link to the sourcesaft control, that is like you. dupengfei