|
CStatusDlg is child of CDialog?
Check if IDD_INDEX_STATUS_DIALOG is the right id of a Dialog resource.
else follow the functions's call using F11, and, surely, you will find the point that give the error.
|
|
|
|
|
Possible error:
CStatusDlg status;<br />
status.Create(IDD_INDEX_STATUS_DIALOG);
->Use this:
CStatusDlg status(IDD_INDEX_STATUS_DIALOG);
|
|
|
|
|
Hi,
i did that i am getting compile time error
CStatusDlg status(IDD_INDEX_STATUS_DIALOG);
'CStatusDlg::CStatusDlg' : cannot convert parameter 1 from 'const int' to 'class CWnd *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
|
|
|
|
|
Then, follow the create function using F10 and F11.
Be sure that the ID (and resource object) IDD_INDEX_STATUS_DIALOG is correct.
|
|
|
|
|
Hai,
I have checked the Dialog ID its correct.
I am not able to trace with f11, how to do that ?? its keep on entering the loop its not breaking.
|
|
|
|
|
Simply press F11 in place of F10 when you want to show the code of a called function (in your case Create )
|
|
|
|
|
fp = fopen (e->filename, "r");<br />
...<br />
if ((s = (char*)strrchr(e->filename, '/')) == NULL)
mmm....
fp = fopen (e->filename, "r");<br />
...<br />
if ((s = (char*)strrchr(e->filename, '\\')) == NULL)
Is this a good correction?
|
|
|
|
|
Hi,
I have checked with out adding items it works corectly whn i add the additems to list box i am getting error.
|
|
|
|
|
can you please show the value of e->fileName ?
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
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"
|
|
|
|