Click here to Skip to main content
15,887,854 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Ellipse, how to draw without been filled? Pin
includeh103-Jun-06 5:55
includeh103-Jun-06 5:55 
AnswerRe: Ellipse, how to draw without been filled? Pin
Hamid_RT3-Jun-06 6:00
Hamid_RT3-Jun-06 6:00 
GeneralRe: Ellipse, how to draw without been filled? Pin
includeh103-Jun-06 6:50
includeh103-Jun-06 6:50 
QuestionMigrating project from VS 6 to VS 8 Pin
Petryha3-Jun-06 2:07
Petryha3-Jun-06 2:07 
AnswerRe: Migrating project from VS 6 to VS 8 Pin
Kevin McFarlane3-Jun-06 3:16
Kevin McFarlane3-Jun-06 3:16 
QuestionFindFirstFile error in compilation [modified] Pin
darkcloud.42o3-Jun-06 1:43
darkcloud.42o3-Jun-06 1:43 
AnswerRe: FindFirstFile error in compilation [modified] Pin
_AnsHUMAN_ 3-Jun-06 2:00
_AnsHUMAN_ 3-Jun-06 2:00 
GeneralRe: FindFirstFile error in compilation [modified] Pin
darkcloud.42o3-Jun-06 2:36
darkcloud.42o3-Jun-06 2:36 
Hi,

Im using Visual Studio 2005 but ive figured that part out via searching long and hard on the web... however im stuck with another problem just the same....

heres what i got for that part....

std::wstring s2ws(const std::string& s){
int len;
int slength = (int)s.length() + 1;
len = MultiByteToWideChar(CP_ACP, 0, s.c_str(), slength, 0, 0);
wchar_t* buf = new wchar_t[len];
MultiByteToWideChar(CP_ACP, 0, s.c_str(), slength, buf, len);
std::wstring r(buf);
delete[] buf;
return r;
}

#ifdef UNICODE
std::wstring stemp = s2ws(ipp); // Temporary buffer is required
LPCWSTR result = stemp.c_str();
#endif

WIN32_FIND_DATA FindFileData;
HANDLE hFind = INVALID_HANDLE_VALUE;
char DirSpec[MAX_PATH + 1]; // directory specification
DWORD dwError;

hFind = FindFirstFile(result, &FindFileData);

printf ("First file name is %s\n", FindFileData.cFileName);

My problem is i cant seem to get the FindFileData function to return a readable string...
but i need FindFileData to be string s; for example...

GeneralRe: FindFirstFile error in compilation [modified] Pin
_AnsHUMAN_ 3-Jun-06 2:43
_AnsHUMAN_ 3-Jun-06 2:43 
GeneralRe: FindFirstFile error in compilation [modified] Pin
darkcloud.42o3-Jun-06 2:59
darkcloud.42o3-Jun-06 2:59 
GeneralRe: FindFirstFile error in compilation [modified] Pin
_AnsHUMAN_ 3-Jun-06 3:03
_AnsHUMAN_ 3-Jun-06 3:03 
GeneralRe: FindFirstFile error in compilation [modified] Pin
darkcloud.42o3-Jun-06 3:08
darkcloud.42o3-Jun-06 3:08 
GeneralRe: FindFirstFile error in compilation [modified] Pin
_AnsHUMAN_ 3-Jun-06 3:20
_AnsHUMAN_ 3-Jun-06 3:20 
GeneralRe: FindFirstFile error in compilation [modified] Pin
Justin Tay3-Jun-06 3:22
Justin Tay3-Jun-06 3:22 
GeneralRe: FindFirstFile error in compilation [modified] Pin
darkcloud.42o3-Jun-06 3:37
darkcloud.42o3-Jun-06 3:37 
GeneralRe: FindFirstFile error in compilation [modified] Pin
darkcloud.42o3-Jun-06 3:47
darkcloud.42o3-Jun-06 3:47 
GeneralRe: FindFirstFile error in compilation [modified] Pin
Justin Tay3-Jun-06 3:53
Justin Tay3-Jun-06 3:53 
AnswerRe: FindFirstFile error in compilation [modified] Pin
Hamid_RT3-Jun-06 4:32
Hamid_RT3-Jun-06 4:32 
Questionchage remote user password Pin
pandikumar3-Jun-06 0:11
pandikumar3-Jun-06 0:11 
AnswerRe: chage remote user password Pin
_AnsHUMAN_ 3-Jun-06 0:26
_AnsHUMAN_ 3-Jun-06 0:26 
Question"Navigate2 " function error in ie7.0.. Pin
msj0191@gmail.com2-Jun-06 23:26
msj0191@gmail.com2-Jun-06 23:26 
AnswerRe: "Navigate2 " function error in ie7.0.. Pin
Hamid_RT3-Jun-06 5:03
Hamid_RT3-Jun-06 5:03 
GeneralRe: "Navigate2 " function error in ie7.0.. Pin
msj0191@gmail.com4-Jun-06 13:52
msj0191@gmail.com4-Jun-06 13:52 
GeneralRe: "Navigate2 " function error in ie7.0.. Pin
Hamid_RT4-Jun-06 19:02
Hamid_RT4-Jun-06 19:02 
AnswerRe: "Navigate2 " function error in ie7.0.. Pin
jhhan27-Aug-10 12:42
jhhan27-Aug-10 12:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.