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

C / C++ / MFC

 
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 
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 
//ok i fixed part of it but still need to get std::string out of it...
//here is what should be a compilable version of the code fragment...

#include <windows.h>
#include <string.h>
#include <stdio.h>

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;
}

int main(){
string ipp="c:\\";
#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);

}


//The Return is fine i get First file name is .
//which is what i think im looking for... however
//I still to need to get the string instead of the printed .
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: &quot;Navigate2 &quot; function error in ie7.0.. Pin
Hamid_RT3-Jun-06 5:03
Hamid_RT3-Jun-06 5:03 
GeneralRe: &quot;Navigate2 &quot; function error in ie7.0.. Pin
msj0191@gmail.com4-Jun-06 13:52
msj0191@gmail.com4-Jun-06 13:52 
GeneralRe: &quot;Navigate2 &quot; 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 
QuestionProblem on bitmap Pin
sahaja_p2-Jun-06 23:13
sahaja_p2-Jun-06 23:13 
AnswerRe: Problem on bitmap Pin
Laxman Auti3-Jun-06 1:17
Laxman Auti3-Jun-06 1:17 

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.