Click here to Skip to main content
15,914,225 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to set focus on ActiveX control in CMDIChildWnd ? Pin
vipsy27-Aug-03 23:46
vipsy27-Aug-03 23:46 
GeneralBrowse Dlg Box Help !!!!!!!!!!!!!!!! Pin
27-Aug-03 23:44
suss27-Aug-03 23:44 
QuestionHow to chanhe clipping position of WindowLess ActiveX ? Pin
vgrigor27-Aug-03 22:47
vgrigor27-Aug-03 22:47 
GeneralEasy question Pin
Scozturk27-Aug-03 22:35
professionalScozturk27-Aug-03 22:35 
GeneralRe: Easy question Pin
Steve S27-Aug-03 22:38
Steve S27-Aug-03 22:38 
GeneralRe: Easy question Pin
Scozturk27-Aug-03 22:44
professionalScozturk27-Aug-03 22:44 
GeneralRe: Easy question Pin
Bob Stanneveld29-Aug-03 4:43
Bob Stanneveld29-Aug-03 4:43 
GeneralFiles Pin
Scozturk27-Aug-03 22:29
professionalScozturk27-Aug-03 22:29 
Hi!
I am making a program which will cut a file into several pieces. Using fstream.h functions I am reading a file byte by byte and writing it into another file ( in the size I want ). The problem is that I don't know how to automatically generate necessary files. Lets say my file to cut is 10000bytes. Ad I want to cut it into 10byte pieces, I will have to generate 1000 files but I don't know how to generate 1000files! The code i use is this:
------------------

LPCTSTR file1 = "data/filein.bin";
LPCTSTR fileoutf1 = "data/fileout1.bin";
LPCTSTR fileoutf2 = "data/fileout2.bin";
char * buffer;
int i= 0;
long l,m;
long bigness;
long requiredf = 0;

ifstream filecount(file1, ios::in|ios::binary);
l = filecount.tellg();
filecount.seekg(0, ios::end);
m = filecount.tellg();
filecount.close();
bigness = m - l;

requiredf = bigness / targetbytes + 1;

ifstream filein(file1, ios::in|ios::binary);
ofstream fileout1(fileoutf1, ios::out|ios::binary);
ofstream fileout2(fileoutf2, ios::out|ios::binary);
buffer = new char[1];

do{
filein.read(buffer, 1);
fileout1.write(buffer, 1);
i++;
}while(i
GeneralRe: Files Pin
David Crow28-Aug-03 2:49
David Crow28-Aug-03 2:49 
GeneralInterrupt a long time operation Pin
CodeBrain27-Aug-03 22:17
CodeBrain27-Aug-03 22:17 
GeneralRe: Interrupt a long time operation Pin
d_lite27-Aug-03 22:33
d_lite27-Aug-03 22:33 
GeneralRe: Interrupt a long time operation Pin
CodeBrain28-Aug-03 0:44
CodeBrain28-Aug-03 0:44 
GeneralRe: Interrupt a long time operation Pin
David Crow28-Aug-03 2:54
David Crow28-Aug-03 2:54 
GeneralRe: Interrupt a long time operation Pin
CodeBrain28-Aug-03 4:03
CodeBrain28-Aug-03 4:03 
GeneralCRichEditCtrl Pin
hph27-Aug-03 22:02
hph27-Aug-03 22:02 
GeneralRe: CRichEditCtrl Pin
CodeBrain27-Aug-03 22:23
CodeBrain27-Aug-03 22:23 
Generali need something look like TimeLine Window in Flash Pin
HeartFriend27-Aug-03 20:40
HeartFriend27-Aug-03 20:40 
GeneralUnicode sscanf from a CString Pin
Ravi Bhavnani27-Aug-03 19:38
professionalRavi Bhavnani27-Aug-03 19:38 
GeneralNever mind Pin
Ravi Bhavnani27-Aug-03 19:48
professionalRavi Bhavnani27-Aug-03 19:48 
GeneralFunny problem!!! Sucide Exe after reboot Pin
rohit.dhamija27-Aug-03 19:35
rohit.dhamija27-Aug-03 19:35 
GeneralRe: Funny problem!!! Sucide Exe after reboot Pin
Magnus Westin27-Aug-03 21:51
Magnus Westin27-Aug-03 21:51 
GeneralRe: Funny problem!!! Sucide Exe after reboot Pin
Scozturk27-Aug-03 22:32
professionalScozturk27-Aug-03 22:32 
GeneralRe: Funny problem!!! Sucide Exe after reboot Pin
rohit.dhamija27-Aug-03 22:39
rohit.dhamija27-Aug-03 22:39 
GeneralRe: Funny problem!!! Sucide Exe after reboot Pin
Scozturk27-Aug-03 22:46
professionalScozturk27-Aug-03 22:46 
GeneralRe: Funny problem!!! Sucide Exe after reboot Pin
Anders Molin28-Aug-03 0:02
professionalAnders Molin28-Aug-03 0:02 

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.