|
hi,
It hold the value like c:\path\dir\filename1 that it
|
|
|
|
|
|
what happens if you hard code it with "c:\\path\\dir\\filename1" ?
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
How to use readFiles can you show
whitesky
|
|
|
|
|
Check if you are binding the variables to the list box correctly. If affirmative you try building this piece of code in ReleaseMode.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
CStatusDlg status;
status.m_OUT.AddString(e->filename);
You cannot do this like that.
the m_OUT listbox will not be Create d until you call either DoModal or Create, so it will crash because the HWND will not exists.
One way is to fill the listbox in the OnInitDialog of your dialog.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
i said but he writes it dosent work
whitesky
|
|
|
|
|
vinaycool wrote: CStatusDlg status;
status.m_OUT.AddString(e->filename);
There are several things wrong here, namely status is a CStatusDlg object whose underlying window has not yet been created. At a minimum, you need to do something like:
CStatusDlg status;
status.DoModal();
...
BOOL CStatusDlg::OnInitDialog()
{
CDialog::OnInitDialog();
m_OUT.AddString("1");
m_OUT.AddString("Zoo");
} Until CStatusDlg 's window and the m_OUT control actually exist, calling AddString() will obviously result in an error.
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
Hi,
In the dialog window CStatusDlg i have one more class INDEX and it has its own header file.
i am not generating file name inside CStausDlg OninitDialog function i have used the seperate function for file name generation ..is there any way i can access list box from other class ???
|
|
|
|
|
vinaycool wrote: is there any way i can access list box from other class ???
Why would you even want to? The only class that should access the listbox control is the one that owns it, namely CStatusDlg . Anything else and you are just asking for trouble.
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
Why do i need copy constructor ,in call by value functions.
|
|
|
|
|
NiLeSh KoRpE wrote: Why do i need copy constructor ,in call by value functions.
To copy member values of one object to another object of the same type. To make the copied object's state exactly similar to the original.
So hence you need a copy constructor coz the compiler needs it during such operations.
An eg:
class CopyCons
{
CopyCons(CopyCons<code>&</code> ccons)
{
}
}
Note the ampersand in red. It is mandatory for copy constructors that you pass the object to be copied by reference or else it will result in calling the copy constructor again for the same object leading to trouble.
Nibu thomas
Software Developer
Faqs by Michael dunn
|
|
|
|
|
Nibu thomas wrote: Note the ampersand in red. It is mandatory for copy constructors that you pass the object to be copied by reference or else it will result in calling the copy constructor again for the same object leading to trouble.
Because it calls by value which makes a copy of the object which a copy constructor does so you'll get an infine call to a copy constructor, which will hang your system!
NiLeSh KoRpE wrote: Why do i need copy constructor ,in call by value functions.
NEVER!
a copy constuctor and is supplied by the compiler
it should be used when you have a property that allocates memory.
in in such a case it is beneficial to overide the assignment operator.
And a destructor (C++ does not do automatic memory management, like Java).
Also another another constructor (it's got to copy something)
e.g.
class foo{
public:
foo();
~foo();
foo(const foo &source);
foo& operator =(const foo &source);
private:
baz *m_data;
};
|
|
|
|
|
If I associate a file with a IOCP with a key, then read/write the file in an overlapped way. What is the use of the completion key which is specified when associating the file with the ICOP? It can only determine the file which got an completion notify, but can't determine weather an reading/writing is done, and I have to extend the OVERLAPPED structure to help this, is this true?
-- modified at 10:11 Tuesday 16th May, 2006
|
|
|
|
|
Hi...
Is there any method from which one can get back the coding from a .exe file.?????I know this means one is trying to still some one's code, but is it technically possible..?????
birajendu
CyberG India
Delhi
India
|
|
|
|
|
No
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Let me tell you that this not the easiest task in the world.
If you were allowed to do this a code that has been released will leak out (through decoding or retreival of code from EXE's) and thus the company that has released the exe's will be facing a huge set back. And after the first purchase everybody could get the code and expose the intricacies of the code.
You can use software utilities called Reflectors etc that can help you in some cases but still you will end up writing the most of the code yourself even after doing that
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
thanx..
But its seems to possible from a debug version of .exe build in VC++ compiler.....It seems that the compiler has the capability to do this..ya i dont have much more knowledge about compiler algo's...
Thanx a lot...
birajendu
CyberG India
Delhi
India
|
|
|
|
|
birajendu wrote: But its seems to possible from a debug version of .exe build in VC++ compiler.....It seems that the compiler has the capability to do this..ya i dont have much more knowledge about compiler algo's..
Compiler produce .pdb file for same, that why you can see sourcecode while debugging!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi,
I want to send Stream Bytes from VC++.Net Windows Application to VC++.Net MFC Active-X controls along with the length and i have to read that Bytes in Active-X control with length.
Please help me out.
Thanks.
|
|
|
|
|
HI ALL,
I have a series of BMP files.I need to convert those files to a movie..
Is there any software for converting bmp to AVI??
Help me please
cheers
sangeet
|
|
|
|
|
|
i need a help or hint by anyone here..please help me..this is the codes i ve done by c++..n now i want to do the same thing as a application in MFC using c++ how to change it....please tell me as soon as possible...or leave me ur msn messenger details so that i contact you directly..thank you..
I m a very beginner for MFC so plese help me on this!
<code>#include <ctime>
#include <iostream>
#include <string>
#include <algorithm>
#include <fstream>
using namespace std;
time_t tmStart, tmEnd;
void DoStuff()
{
tmStart = time(0);
ifstream fin;
fin.open("data.txt",ios::in);
ofstream File("MyFile.txt",ios::out);
//cout << "Enter digit: ";
char str[10];
//cout << "sr"<<endl;
fin.getline(str,sizeof(str),'\n');
string line(str);
//line.c_str (),100);
//fin.open("data.txt");
cout << str<<endl;
for (int i=0; i<50000; ++i)
{
random_shuffle(line.begin(), line.end());
File << "Randomised: " << line << endl;
// File << " : " << line << endl;
// File << " : " << line << endl;
// File << " : " << line << endl;
File << " "<< endl;
// File << "Single Row: " << s << " " << s << " " << s <<" " << s << endl;
File << " "<< endl;
tmEnd = time(0);
}
File.close ();
fin.close ();
cout << tmEnd-tmStart << " seconds " << endl;
}
int main(int argc, char* argv[])
{
DoStuff();
return 0;
}
</code>
|
|
|
|
|
Your question is a bit confusing because there really is nothing to do to make this work with mfc. Create a console application with mfc and drop in everything but the main. In the main that the console application creates for you call your DoStuff();
I assume this is not what you are looking for though... Please tell us what you need, Although this sounds like homework and we can not do that for you...
John
|
|
|
|
|
this is not homework...i am in industrial training..they put me in the MFC site..and there is no one to help thats why..
|
|
|
|