|
Flaviu_2006 wrote: ...i must wait up to 10 min to load the data !
How many items are being loaded? If it's more than just a few thousand, you'll need to use a "virtual" list control.
What does CNote::GetSQL() look like?
Flaviu_2006 wrote:
int x = 0;
while(!pNote->IsEOF())
{
int nItem = m_list4.InsertItem(x, pNote->m_name);
m_list4.SetItemText(nItem, 1, pNote->m_city);
pNote->MoveNext();
x++;
}
If my code was not any better than what you had, then why are you using it?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I think you modifiy his code in previous thread but i dont know why he doesnt try to use from answers
|
|
|
|
|
WhiteSky wrote: I think you modifiy his code in previous thread...
I was not questioning that.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Did you try to use from threads?
|
|
|
|
|
I wnat to create pointer to an array of 10 objects of class One. Can u tell me the various ways to do this.
Thank you.
KIRAN PINJARLA
|
|
|
|
|
kiran.pinjarla wrote: I wnat to create pointer to an array of 10 objects of class One. Can u tell me the various ways to do this.
Thank you.
new
CTypedPtrArray
CArray
STL Classes More Info[^].
|
|
|
|
|
|
|
Have you tried:
One arr[10];
One *p = arr;
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello,
I have selected my button style to be 'Flat'. I do not want the borders around it. Is there a way to do that?
Thanks.
Fortitudine Vincimus!
|
|
|
|
|
you may need to make owner drawn button.
|
|
|
|
|
Do you have derived CButton and if yes do you use from WM_DRAWITEM in your code
|
|
|
|
|
I got the idea what should be done.
Thanks.
Fortitudine Vincimus!
|
|
|
|
|
|
hi all,
in main class i created some class objects using NEW operator and in destructor i used delete operator to delete that created objects
but its not entering into destructor when i exit my application
plz help in this issue
Thank you
venu
|
|
|
|
|
g venu wrote: in main class i created some class objects using NEW operator and in destructor i used delete operator to delete that created objects
When you "new" an object the constructor for the corresponding object gets called and when you "delete" an object the destructor for that object get's called.
But you are saying it doesn't enter the destructor for the corresponding objects when you exit the application. The destructor get's called when you delete the object. Only objects created on stack get's destroyed automatically, the rest should be deleted.
|
|
|
|
|
Post some code, it's much more clear than an explanation. As I understand, you allocate some objects with new:
MyClass* pClass = new MyClass;
And you try to delete the memory inside the destructor ?
MyClass::~MyClass
{
delete this;
}
This will never work. When you create a class with new, its destructor will be called only when you delete the object. You must delete the object outside the destructor.
|
|
|
|
|
i created objects like this and
void mymainDlg::CreateTabWindows()
{
m_phoneDlg = new CGlobe7Phone();
m_phoneDlg->Create(IDD_PHONE,this);
m_TelevisionDlg = new CGlobe7Television();
m_TelevisionDlg->Create(IDD_DIALOG_INTERNET_TELEVISION,this);
m_MessageCenterDlg = new CGlobe7MessageCenter();
m_MessageCenterDlg->Create(IDD_DIALOG_MESSAGECENTER,this);
}
i used destructor like this but it does'nt work and showing memory leaks
mymainDlg::~mymainDlg()
{
delete m_phoneDlg;
delete m_TelevisionDlg;
delete m_MessageCenterDlg;
}
Thank you
venu
|
|
|
|
|
Looks alright to me. Try placing breakpoints in the destructor. The memory leak could be from any of your created dialogs too. Check that any allocated memory in those dialogs is freed when it is destroyed.
|
|
|
|
|
how mymainDlg object is created ? If its created using new, have you deleted it? You need to show that code.
|
|
|
|
|
yes i agree with Weiye Chen The memory leak could be from any of your created dialogs
Are you sure your error is in destructor
|
|
|
|
|
hi prasad,
mymainDlg is created in mymainApp class, i think its not necessary to delete in destructor ?
Thank you
venu
|
|
|
|
|
hi,
you are right ? memeory leaks are shown when my dialogs are created
i,e: in this function
void mymainDlg::CreateTabWindows()
{
m_phoneDlg = new CGlobe7Phone();
m_phoneDlg->Create(IDD_PHONE,this);
m_TelevisionDlg = new CGlobe7Television();
m_TelevisionDlg->Create(IDD_DIALOG_INTERNET_TELEVISION,this);
m_MessageCenterDlg = new CGlobe7MessageCenter();
m_MessageCenterDlg->Create(IDD_DIALOG_MESSAGECENTER,this);
}
but what's wrong in this ??
will u plz tell me
thank you
venu
|
|
|
|
|
hi,
its working when i created separte function
in that function i deleted all the objects which i created
like OnExit Function where my application exits
Thank you all
venu
|
|
|
|
|
g venu wrote: i think its not necessary to delete in destructor
If its created on stack , its d'tor will automatically get called.
But if its created using new, you must use delete.
Can you show code, where main dialog constucted, shown?
|
|
|
|