Click here to Skip to main content
15,902,189 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralHelp! How to build a VC++ program from the command line Pin
Wayne Jin2-May-05 13:31
Wayne Jin2-May-05 13:31 
GeneralRe: Help! How to build a VC++ program from the command line Pin
Christian Graus2-May-05 13:56
protectorChristian Graus2-May-05 13:56 
GeneralRe: Help! How to build a VC++ program from the command line Pin
Wayne Jin2-May-05 14:06
Wayne Jin2-May-05 14:06 
GeneralRe: Help! How to build a VC++ program from the command line Pin
Christian Graus2-May-05 14:09
protectorChristian Graus2-May-05 14:09 
GeneralRe: Help! How to build a VC++ program from the command line Pin
Wayne Jin2-May-05 14:28
Wayne Jin2-May-05 14:28 
GeneralHelp getting Unicode FILENAMES into an array Pin
stvprg2-May-05 13:09
stvprg2-May-05 13:09 
GeneralRe: Help getting Unicode FILENAMES into an array Pin
Ryan Binns2-May-05 18:31
Ryan Binns2-May-05 18:31 
GeneralRe: Help getting Unicode FILENAMES into an array Pin
stvprg2-May-05 19:24
stvprg2-May-05 19:24 
I had been playing around with FindFirstFileW but couldn't get it work. Here's the code I've dabbled using.
Does anyone have a link or small clip of code including #includes that works?

//THIS CODE DOESN'T WORK

#include "stdafx.h"
#include <iostream>
#include <fstream>
using namespace std;

#define _WIN32_WINNT 0x0501

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

int main(int argc, char *argv[])
{
WIN32_FIND_DATAW FindFileData;
LPCWSTR lpFileName = (const unsigned short *) "*";

HANDLE hFind;

ofstream outfile("new.txt");

hFind = FindFirstFileW(lpFileName, &FindFileData);

if (hFind == INVALID_HANDLE_VALUE)
{
printf ("Invalid File Handle. GetLastError reports %d\n",
GetLastError ());
return (0);
}
else
{
printf ("The first file found is %s\n", FindFileData.cFileName);


while (FindNextFileW(hFind, &FindFileData) != 0)
{
printf ("Next file name is %s\n", FindFileData.cFileName);
outfile << FindFileData.cFileName << endl;

}

FindClose(hFind);
return (1);
}
}
GeneralRe: Help getting Unicode FILENAMES into an array Pin
Ryan Binns3-May-05 0:14
Ryan Binns3-May-05 0:14 
GeneralHelp to get WIN32_FIND_DATAW FindFileData from FindFirstFilesW into a file Pin
stvprg4-May-05 7:32
stvprg4-May-05 7:32 
GeneralRe: Help to get WIN32_FIND_DATAW FindFileData from FindFirstFilesW into a file Pin
Ryan Binns4-May-05 23:39
Ryan Binns4-May-05 23:39 
GeneralAvailable DLL / C++-SourceCode for 3D-presentation of rectangular solids of different sizes Pin
Roland F.2-May-05 12:26
Roland F.2-May-05 12:26 
GeneralRe: Available DLL / C++-SourceCode for 3D-presentation of rectangular solids of different sizes Pin
Christian Graus2-May-05 13:20
protectorChristian Graus2-May-05 13:20 
Generali still need just a little help Pin
Anonymous2-May-05 11:58
Anonymous2-May-05 11:58 
GeneralRe: i still need just a little help Pin
Christian Graus2-May-05 13:23
protectorChristian Graus2-May-05 13:23 
GeneralRe: i still need just a little help Pin
Anonymous2-May-05 14:25
Anonymous2-May-05 14:25 
GeneralRe: i still need just a little help Pin
Christian Graus2-May-05 14:32
protectorChristian Graus2-May-05 14:32 
GeneralRe: i still need just a little help Pin
Anonymous2-May-05 15:06
Anonymous2-May-05 15:06 
GeneralRe: i still need just a little help Pin
Christian Graus2-May-05 15:31
protectorChristian Graus2-May-05 15:31 
QuestionUrgent ! How to instanciate an OCX control in an Office app? Pin
turenne2-May-05 11:50
turenne2-May-05 11:50 
GeneralMenu+Bitmaps recommendation Pin
peterchen2-May-05 11:43
peterchen2-May-05 11:43 
GeneralWMI Pin
Alex_Y2-May-05 8:40
Alex_Y2-May-05 8:40 
QuestionByte Chunker? Pin
OutlawTornNMT2-May-05 7:46
OutlawTornNMT2-May-05 7:46 
AnswerRe: Byte Chunker? Pin
Christian Graus2-May-05 13:24
protectorChristian Graus2-May-05 13:24 
QuestionHow to use &quot;Windows classic&quot; look on XP? Pin
Alan C. Balkany2-May-05 7:44
Alan C. Balkany2-May-05 7:44 

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.