|
use CTime and CTimeSpan
nave
|
|
|
|
|
|
how can i speed my database and fill in my CListCTtrl ?
because i need all the data in my CListCtrl i can t use a virtual list ok !
it is simple i need all the data in my Clistctrl at once !
for now i fill 60 000 records in my CListCtrl in 1 min. and i need more speed because i want to fill more data and i will have more time to load and i don t want this i need more speed !
- for my database
- for my CListCtrl
Database = VisualFoxPro 6.0 .
for now this is my code :
void CNcontabile::FillList()
{
CDatabase_Plan* pPlan = new CDatabase_Plan();
if (!pPlan->Open())
return;
if (pPlan->IsOpen())
{
pPlan->SetRowsetSize(25);
while (!pPlan->IsEOF() )
{
int nRowsFetched = pPlan->GetRowsFetched();
m_list.InsertItem(nRowsFetched, pPlan->m_name);
m_list.SetItemText(nRowsFetched, 1, pPlan->m_city);
pPlan->Move(SQL_FETCH_NEXT);
pPlan->MoveNext();
}
}
//m_list.UnlockWindowUpdate();
m_list.Invalidate();
m_list.UpdateWindow();
pPlan->Close();
delete pPlan;
}
if you have an ideea on how can i get more speed please tell me !
i will wait your answer !
Thank you !
Bravoone
|
|
|
|
|
Hi Flaviu_2006,
You have 60,000 records in your database but i dont think you need to all records at a time you said you cant use of virtual list so i think its a good idea you show each 250 or 500 records at each the moment and also i search and i see you can see a lot of explains on the internet for speed up your database did you seach about it
|
|
|
|
|
how can i speed my database ? i have search for 1 week and i find ->nothing !
Bravoone
|
|
|
|
|
I guess you have a lot of ideas you must try to test theirs,did you try it?
|
|
|
|
|
Flaviu_2006 wrote: because i need all the data in my CListCtrl...
Why? I don't recall ever having the need to operate on such information en masse.
Flaviu_2006 wrote: ...i can t use a virtual list ok !
Why? Do you simply not know how, or do you know for certain that it cannot be used?
Flaviu_2006 wrote: if you have an ideea on how can i get more speed...
Where's the bottleneck currently?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello,
I have a dialog box application (VS2005) that use ActiveX Microsoft Control 6.0 (SP6) Control. On my computer it work well, but when I want start this application on a other computer it happend nothing.
I am sur that it come from this active X because I have try to delete the activeX from my project then the application start also on the other computer. I have try to use static Dll configuration but with the same result.
What can I do to fix this problem ?
Thank you !
AutreChien
|
|
|
|
|
Hi guys!
I'm begginer thus I'm really appreciate if you concern my question.
I got two dialog. The first one is Dlg1, the other is Dlg2.
There is a variable which calls root in Dlg1. It was declared when the Dlg1 was first appreared.
There is a variable which calls temp in Dlg2.
The problem is, I cant do:
temp=root;
Thanks for reading my question
hehe
|
|
|
|
|
sonyama wrote: There is a variable
What's the type of the variable? Is it the object of the class.
sonyama wrote: which calls root in Dlg1
What's root?
sonyama wrote: There is a variable which calls temp in Dlg2.
???
If you can better explain your query or post some code some one here would help you in a better manner.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
typedef struct point
{
CString code;
CString name;
float previous;
float present;
point *next;
} pointer;
pointer *root = new pointer;
I want temp in Dlg2 has the same type and data as root!
thanks for concerning my question
hehe
|
|
|
|
|
sonyama wrote: want temp in Dlg2 has the same type
You can pass a pointer from Dlg1 to Dlg2 and then access the variables of root directly in Dlg2.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I do have that kind of idea in mind but the problem is how to do so!
Thanks for concerning my question
hehe
|
|
|
|
|
Create a pointer variable for Dlg1 in Dlg2.h. Also #include "Dlg1.h"
Say Dlg1 *pDlg1; // This is to be done in Dlg2.h
Add #include "Dlg2.h" in Dlg1.h
Now when you are giving a call to Dlg2 you can write
Dlg2 *p2=new Dlg2;
p2->pDlg1=this;
p2->DoModal();
Then you would be able to access the variables for root from Dlg2.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Dlg2 *p2=new Dlg2;
p2->pDlg1=this;
p2->DoModal();
I tried to put these code in Dlg1. Everything seems to be fine but the only line:
p2->pDlg1=this;
with the error message: "pDlg1 is not a member of Dlg2"
What should I do?
Thanks for concerning my question
hehe
|
|
|
|
|
sonyama wrote: with the error message: "pDlg1 is not a member of Dlg2"
Probably you are missing to include a file some where. Either in Dlg1 or in Dlg2.
Check it out....
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
in PointerAppDlg dialog:
#include "stdafx.h"
#include "PointerApp.h"
#include "PointerAppDlg.h"
#include "Search.h"
typedef struct point
{
CString code;
CString name;
float previous;
float present;
point *next;
} pointer;
extern pointer *root = new pointer;
but in Search dialog:
it failed at
#include "stdafx.h"
#include "PointerApp.h"
#include "PointerAppDlg.h"
#include "Search.h"
pointer *root;
Thanks for concerning my question!
hehe
|
|
|
|
|
hello;
i wanted to make my editbox transparent
i used the cxstatic class from Codeproject
for the static ones is was OK
but the problem is in updating time for example
the new time is redrown on the old one !
|
|
|
|
|
fx9200 wrote: i wanted to make my editbox transparent
HBRUSH CYourDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
CBrush m_Brush;
m_Brush.CreateStockObject (NULL_BRUSH);
if(pWnd->GetDlgCtrlID()==IDC_EDIT1)
{
pDC->SetBkMode (1);
return (HBRUSH)m_Brush;
}
return hbr;
}
Try this for the edit box. I think I answered the same question yesterday. Didn't this solve your problem.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
See here[^] maybe it is some helpful to you
|
|
|
|
|
Does no vtables depends on no of objects of the Virtualclass ?
|
|
|
|
|
|
The number of vtables created are one for the base class and one for each of the subsequent classes that are derived from the base class.
Suppose Base and Derived are two classes. Class Derived is derived from Base.
then there would be two virtual tables that would be created. It does not depend on the number of objects.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
that means can i assume that Virtual base class Contains one Vtable, And the Entire hierarchy contains one VTable.
Totally two VTables
|
|
|
|
|
No!
Each of the classes that are derived from the base class would have a vtable of their own
Suppose Base, Derived1, Derived2 would be the three classes. Derived1 and Derived2 are classes that are derived from the base class. Now in this case there would be 3 vtables. One for base. One for Derived1 and one for Derived2.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|