|
Hehe, go figure.. get stumped on something for hours and figure it out only seconds after writing a post..
pCChildDialog[0]->SetDlgItemTextW(IDC_STATIC1, mystring); //This fixed it
|
|
|
|
|
Hey fellas..
Need a lil help..
I am starting up with a application of cryptography and steganography. But i am lil confused like which language to use. I have option to do it in C++(borland), C++.NET OR C#.NET. Not VC++...
All depends in which language would i get more reference over the net and more help.
Can C#.NET perform all the tasks that C++ can. I want to know it now so that i dont end up in a mess. As in stego i want to use carriers like .mp3, .jpeg, .pdf etc. So would that be fine with C#.NET.
Any suggestions are welcome...
Thanks a lot
|
|
|
|
|
I recommend you to:
1) write a brief design-document for the application you wish to write;
2) while writing, decide what components you will require (cryptography, compression, etc.)
3) search google/yahoo/whatever for that component. The first programming language to have all components you need written - that is your choice.
But at first, look at your programming skills.
-------------------------
Don't worry, be happy )
|
|
|
|
|
Hello everybody, I'm writing a program to take the contents for several .txt files and make them into one single .txt file. The separate txt files have to go in the single file at a certain order.
The problem with the code (see below) is that when I call getline(file,bline), bline is left empty after the call I don't understand what could be the problem. The file opens properly according to file.is_open but getline doesn't read. Here is the code:
<br />
<br />
fstream file;<br />
<br />
string bline;<br />
int i,j;<br />
<br />
<br />
string month[]={"01","02","03","04","05","06","07","08","09","10","11","12"};
string year[]={"1999","2000","2001","2002","2003","2004","2005","2006"};
<br />
for(j=0;j<=7;j++)<br />
for(i=0;i<=11;i++)<br />
{<br />
string fname="E:\\Month\\"+month[i]+"_"+year[j]+".txt";<br />
<br />
file.open(fname.c_str());<br />
if(file.is_open()){<br />
<br />
while(!file.eof()){<br />
ofstream ofile;<br />
ofile.open("C://allfile.txt",ios::app);<br />
getline(file,bline);<br />
ofile<<year[j]<<'\t'<<month[i]<<'\t'<<bline<<endl;<br />
}<br />
<br />
cout<<"Finished month "<<i+1<<" year "<<j+1999<<endl;<br />
<br />
}<br />
else<br />
cout<<"Cant open file"<<endl;<br />
<br />
<br />
}<br />
|
|
|
|
|
if you need to concatenate all the files, why do you read line by line ?
just read the entier file...
|
|
|
|
|
The files are huge... approx 9mb
|
|
|
|
|
that's ok you know. now constructors provide 1GB RAM
but if you think reading 10MB in one run is two much, you could always read by packets of 1 or 2 MB, without caring too much of the file contents... (because at last, all the characters will be moved)
|
|
|
|
|
Try something like this:
========================
// Console.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream> // For "cout" and "cerr".
#include <fstream> // For "ofstream" and "ifstream"
#include <string> // For "string"
#include <cstddef> // For "size_t"
int main()
{
using namespace std;
// Open the output file.
ofstream outFile("C://allfile.txt");
if (!outFile)
{
cerr << "Failed to open output file!" << endl;
return 1;
}
static const string months[] = {"01","02","03","04","05","06","07","08","09","10","11","12"}; // these are all the months in the files
static const string years[] = {"1999","2000","2001","2002","2003","2004","2005","2006"}; // and these are all the years
for (size_t m=0; m<sizeof(months)/sizeof(months[0]); ++m)
{
for (size_t y=0; y<sizeof(years)/sizeof(years[0]); ++y)
{
// Build the filename.
string fname = "E:\\Month\\" + months[m] + "_" + years[y] + ".txt";
// Attempt to open the input file.
ifstream inFile(fname.c_str());
if (inFile)
{
// We opened it so append it the the output file.
cout << "Appending '" << fname << "'..." << endl;
outFile << inFile.rdbuf();
}
else
{
// We failed to open it.
cout << "File '" << fname << "' not found!" << endl;
}
}
}
return 0;
}
Steve
|
|
|
|
|
stephen please, don't forget the <pre> tags
|
|
|
|
|
I used the "Ignore HTML tags in this message (good for code snippets)" option. There's no need for <pre> tags when this is selected. I can't see anything missing.
Steve
|
|
|
|
|
............
...........
else
cout<<"Cant open file"<
|
|
|
|
|
Is there a way to save and import components (.ogx files) in VS 2005 like there was in VC++6.0?
What I need is to transfer a dialog in VS2005 to a VC6.0 project.
Any help is appreciated.
Thanks
Dave
I'm pretty sure I would not like to live in a world in which I would never be offended.
I am absolutely certain I don't want to live in a world in which you would never be offended.
Dave
|
|
|
|
|
No component gallery om vc2005 (it was removed since vc2002).
To copy dialogs, copy the vc6 dialog part from resource file (.rc) into vc2005 resource file..
--
======
Arman
|
|
|
|
|
I need to access windows user account properties.
What I want to do is,
Whether a user account is part of,
a. local administrator
b. domain administrator
c. exchange administrator
d. local user
e. domain user
Apart from this I want to also display
a. local GPO(Group policy setting)
b. domain policy setting
c. security policy setting
d. domain controller policy setting
I want to get a windows user account name and display what properties and what GPO policy setting it has?
I tried using LDAP, ADSI, LSA, but could not get all these rights!
Please advise!
Ramesh
|
|
|
|
|
|
hello,
Suppose I am developing an application in VC++ which helps in modifying data in excel.
For doing so I use COM components to get connected to excel and add a sheet etc.
But Suppose I have written a program in VC++ which uses pointers and I want to use the program in VB then will I be able to run my methods written in VC++ from VB
Prithaa
|
|
|
|
|
If your VC++ app is a COM server then you can access from VB.
Cheers,
Suresh
|
|
|
|
|
Hello,
Thanks for your reply.
But even if VB does not support pointers and references can I use COM. I don't know whether VB supports pointers .But if it doesn't then in my COM classes I should not use pointers.Is it?
Prithaa
|
|
|
|
|
VB doesnt support Pointer, however you can use COMponents which use pointers in their code.
As we all know COM is a binary standard, you are basically re-using the binary code not the C++ source code.
Cheers,
Suresh
|
|
|
|
|
Hello,
Thanks for your reply.
Is there any link to elaborate your point.
I have sort of undestood.
Prithaa
|
|
|
|
|
|
Hi, I currently have bitmaps coming in as files from a usb input and I'm wondering what library is suitable for displaying the bitmaps into a video. If so can someone point me in the right direction?
Thanks
|
|
|
|
|
If you just want to display them as a video then you can draw the bitmaps to a window as they
come in.
If you want to save a video file then you'll need to know the file format, and if it's a compressed
format, how to compress the images into a video stream.
For free, if Windows Meda Format is acceptable, you can use the Windows Media Format SDK[^]
to write an image stream to a Windows Media Video (WMV) file.
There's lots of third party stuff available I'm sure, but I've never used any.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Thanks for the hints.
I've heard DirectShow can also be a relevant library, or is that mainly for displaying video?
|
|
|
|
|
DirectShow will work. The only problem I see with that is that there's no source filter available
to dump images into so you'd need to develop your own. Otherwise it would be similar to using
Windows Media Format. In fact, besides AVI, Windows Media (with MPEG-4) is the only included
way of writing files. Windows Media Format would be simpler than adding an extra layer on top
of it.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|