|
ya most time i am getin this error in my other projects also
but when i'm not declaring variable through ddx i am not getin error here
|
|
|
|
|
show off a piece of the code you wrote...
|
|
|
|
|
In debug mode i am getin error as unhandled exception and accec violation at statement
lResult = pWnd->WindowProc(nMsg, wParam, lParam);
in funtion AfxCallWndProc
|
|
|
|
|
What error (e.g., compiler, linker, exception, assertion)? What does the DDX statement look like? Is the variable present in the class' definition?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
// Dialog Data
//{{AFX_DATA(CGCU)
enum { IDD = IDD_DIALOG_GCUAPP };
CButton m_ImuRecord;
CString m_ImuAzimuth;
//}}AFX_DATA
void CGCU::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CGCU)
DDX_Control(pDX, IDC_BUTTON_IMU_REC, m_ImuRecord);
DDX_Text(pDX, IDC_EDIT_IMU_AZ, m_ImuAzimuth);
//}}AFX_DATA_MAP
}
there is no error when i declare a ddx_Text only for controls i'm getin error
|
|
|
|
|
I think the 11-year sunspot cycle is nearing its most active point right now...
|
|
|
|
|
I want to handle Desktop menu context, the menu is shown when you rightclick on every blank point on the Desktop. Could you tell me how to do that please?
Thank you in advance!
|
|
|
|
|
|
Yes, thank you very much! I admire you and your work!
By the way, I want to ask for one thing more. I have a dialog. When I right click on that, I want to show Desktop menu context as well as add my own menu item. Could you be kind enough to help me please? Thank you very much!
Have a nice day!
|
|
|
|
|
Check out Raymond Chen's series of posts on hosting a context menu, starting here[^]
|
|
|
|
|
Many thanks to you. I will read it. Have a nice weekend!
|
|
|
|
|
Hi there,
I would like to know if I can call the destuctor explicitly in case of
containership.
Lets consider an example:
class A
{
public:
~A()
{
cout <<"~A()"<
|
|
|
|
|
There's no need of calling the destructor of A explicitly. Since the object of class A is being created in B, after the destructor of B get's called the destructor of class A is also called.
#include <iostream>
using namespace std;
class A
{
public:
~A()
{
cout <<"~A()"<<endl;
}
};
class b
{
a="" a;
public:
~b()
{
="" cout="" <<="" "~b()"="" endl;
="" a.~a();="" try="" uncommenting="" this="" line
="" please="" pay="" extra="" concentration="" here..
}
b()
{
="" cout<<"b's="" constructor\n";
}
};
void="" main()
{
="" b="" b1;
="" *b="new" b();
="" do="" something="" here
="" delete="" b;
}=""
=""
<div="" class="ForumSig">Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
Raj Prathap wrote: In the above case should the destructor of A be called explictly? If I dont call, the destructor for A is never called.
Thanks in advance,
Pratap Reddy
No, It will be called before B's d'tor.
|
|
|
|
|
Raj Prathap wrote: In the above case should the destructor of A be called explictly?
No. It will happen automatically when the A object goes out of scope.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi,
If this is not the right place, please suggest me the right one...
I wish to display the all the items (Appointments, Calendar, Folders, Email,
Tasks, etc.) by reading the raw data of the OST File...That means I don't
wish to use installing outlook, MAPI, CDO and even third Party tools. It should be done in VC++.
Please suggest me where I will get
The source code for reading the raw data of the OST file (or)
Documents releated to OST file structure (or else)
The source code for Conversion of OST file to PST file...
I'm eagerly waiting for ur response....
Regards,
nag.
|
|
|
|
|
Hi,
If this is not the right place, please suggest me the right one...
I wish to display the all the items (Appointments, Calendar, Folders, Email,
Tasks, etc.) by reading the raw data of the OST File...That means I don't
wish to use installing outlook, MAPI, CDO and even third Party tools. It should be done in VC++.
Please suggest me where I will get
The source code for reading the raw data of the OST file (or)
Documents releated to OST file structure (or else)
The source code for Conversion of OST file to PST file...
I'm eagerly waiting for ur response....
Regards,
nag.
|
|
|
|
|
PST/OST format is microsoft proprietary. You can not find its internal structure. To read pst/ost items you need Microsoft COM controls installed on machine.
Manish Agarwal
manish.k.agarwal @ gmail DOT com
|
|
|
|
|
Hi Manish,
I'm thankful for ur prompt response...For reading PST file, I have seen
Libpst...Just for testing, I tried OST file with this, but no use...
Coming OST file to PST file conversion, I have seen ost2pst tool, but I'm unable to find source code for conversion of OST file to PST file...
Regards,
nag.
|
|
|
|
|
See here[^] maybe its some helpful for you
|
|
|
|
|
I have been playing with PC-lint and reading the Scott Meyers Effective/More Effective C++ books and have a question about implicitly calling constructors. This may be a style issue, or it may turn out to be something more important.
For example, suppose you have a class that contains a std::string (or CString ), and the strings should be empty ("") when the class is created. I have always let the compiler implicitly call the string constructor, and hence would have something that looks like this:
class foo
{
private:
std::string str_;
public:
foo()
{
}
};
However, it has been suggested that all members should appear in the constructors initialization list, and that I should change my constructor to one of the following:
foo() : str_("")
or
foo() : str_()
Which of the abiove you use? Any solid reasons why? Also, in the case of a string, would you explicitly initialize it to an empty string (str_("") ) or call the strings default constructor (str_() )?
Kicking squealing Gucci little piggy.
|
|
|
|
|
Rob Caldecott wrote: Which of the abiove you use? Any solid reasons why? Also, in the case of a string, would you explicitly initialize it to an empty string (str_("")) or call the strings default constructor (str_())?
Since str_("") doesn't serve any better purpose that str_() I would go for str_(). Since a good default constructor will set it's member elements to a predefined state. This should suffice.
|
|
|
|
|
calling str_() would save on having to pass a parameter. (not much of a difference, just me being picky).
|
|
|
|
|
Rob Caldecott wrote: For example, suppose you have a class that contains a std::string (or CString), and the strings should be empty ("") when the class is created. I have always let the compiler implicitly call the string constructor, and hence would have something that looks like this:
class foo{private: std::string str_;public: foo() /* str_ constructor implicitly called */ { }};
you are right.
Rob Caldecott wrote: However, it has been suggested that all members should appear in the constructors initialization list, and that I should change my constructor to one of the following:
foo() : str_("")
or
foo() : str_()
In this case it doesn't make sense to initialize member variable in initialization list. Because, generally, well designed classes takes care of default initialization.
Only difference, here would hapeen is, if you doesn't use member initialization list, default c'tor will be called, and copy c'tor otherwise.
It is advised to use member initialization list, because it save assignment operator call; if you are going to assign some value to member variable.
consider this scenario,
class foo
{
CStrin m_sMyString;
public:
foo()
{
m_sMyString = "This string i want as default";
}
}; where as this is efficient,
class foo
{
CStrin m_sMyString;
public:
foo(): m_sMyString("This string i want as default")
{
}
};
|
|
|
|