|
thank u sir. will check this link for information. thnak u for your help
vijay
|
|
|
|
|
my system is to show an image,for instance, "shutter show", during the middle way of show, i would like to pause this show.so how to write this code.thank you!!!!
Li Zhiyuan
11/09/2006
|
|
|
|
|
li zhiyuan wrote: my system is to show an image,for instance, "shutter show", during the middle way of show, i would like to pause this show.so how to write this code.thank you!!!!
Sleep()
"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
Support CRY- Child Relief and You
|
|
|
|
|
Hi,
In a text file, are the data types of the values in the file all of the type char or can there be integers inside?
I wrote a code which produces random numbers and they are to be written to a text file.
int value;
ofstream outClientFile("1111 combination.txt",ios::out);
value = rand()%2;
outClientFile<
|
|
|
|
|
The operator<< of ostream will convert everything it takes to string, and then insert into the stream. So of course the value will be converted to string.
If you'd like to write as a integer but not a string, you may use the write() method.
|
|
|
|
|
KaKa' wrote: ofstream outClientFile("1111 combination.txt",ios::out);
value = rand()%2;
outClientFile<<value;>
it upto to you treat data in file... every thing written in file is string or binary digit (in case of binary file, which in turn also a string!)..
"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
Support CRY- Child Relief and You
|
|
|
|
|
How can i load my data more fast in my ListCtrl ?
I have my database in another computer on ODBC so in my computer !
VisualFoxpro 6.0 database !
This code works and i have some speed but if is posibile to have more speed please help me with an example !
this is my code :
...must be something to do , to have more speed !!!!!!!!
void CMyListCtrl::FillList()
{
CDatabase_Plan* pPlan = new CDatabase_Plan();
if (!pPlan->Open())
return;
if (pPlan->IsOpen())
{
int x = 0;
m_list.LockWindowUpdate();
while (!pPlan->IsEOF() )
{
int nItem = m_list.InsertItem(x, pPlan->m_name);
m_list.SetItemText(nItem, 1, pPlan->m_den);
pPlan->MoveNext();
x++;
}
}
m_list.UnlockWindowUpdate();
m_list.Invalidate();
m_list.UpdateWindow();
pPlan->Close();
}
Bravoone
|
|
|
|
|
Please use the notification LVN_GETDISPINFO for implementing virtual list concept
for example see the link http://www.codeproject.com/listctrl/virtuallist.asp
Regards
RinuRaj
|
|
|
|
|
No , my code works but he need ... something ... maybe MoveNext have a problem i dont no please help me !
Bravoone
|
|
|
|
|
Whats problem with MoveNext
|
|
|
|
|
maybe MoveNext is slow !? i dont now! please help !
Bravoone
|
|
|
|
|
Have you tried profiling to code to see why it's too slow?
I recommend looking at the DevPartner Profiler from here[^]
|
|
|
|
|
Rinu_Raj wrote: Please use the notification LVN_GETDISPINFO for implementing virtual list concept
This type of control has already been suggested here, and probably more than once. He's not into research, though, but just wants someone else to do all of his work.
"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 wondered, why you use this:
<br />
m_list.LockWindowUpdate();
nt nItem = m_list.InsertItem(x, pPlan->m_name);
m_list.SetItemText(x, 1, pPlan->m_den);<br />
pPlan->MoveNext(); <br />
x++;<br />
this maybe:
<br />
void CMyListCtrl::FillList()<br />
{<br />
<br />
CDatabase_Plan* pPlan = new CDatabase_Plan();<br />
if (!pPlan->Open())<br />
return;<br />
<br />
<br />
if (pPlan->IsOpen())<br />
{<br />
int x = 0;<br />
<br />
<br />
while (!pPlan->IsEOF() )<br />
{<br />
<br />
m_list.InsertItem(x, pPlan->m_name);<br />
m_list.SetItemText(x, 1, pPlan->m_den);
pPlan->MoveNext();<br />
<br />
x++;<br />
}<br />
}<br />
<br />
m_list.Invalidate();<br />
m_list.UpdateWindow();<br />
<br />
pPlan->Close();<br />
<br />
<br />
}<br />
<br />
this is an litle idea from me...hope this helps litle :)<br />
<br />
regards<br />
break;
|
|
|
|
|
ok Thanks for your help but my problem i think is movenext !?
please help !
is slow i need more speed how ?!!!!
Bravoone
|
|
|
|
|
Hello,
if this is an CRecordset, try to use an open type like CRecordset::forwardOnly, means you want only to rad one more, from begin to end!
This brings you litle more speed, if you solve you problem please post here for me and others to now how!
regards
|
|
|
|
|
how to use forwardonly ?my CRecordSet is snapshot !!!!
Bravoone
|
|
|
|
|
again if it is the recordset and specialy the MoveNext part you could do the following:
make sure you don't collect record by record. Normaly a movenext requests only the next item from the server meaning just on record per fetch(data receivig)
you can retrieve multilple records in a single fetch.
Check the following Fetching Records in Bulk[^] for more details.
codito ergo sum
|
|
|
|
|
how ? please help me with an example !
Bravoone
|
|
|
|
|
Please help me because i dont understand how can i implement this !?
Bravoone
|
|
|
|
|
How can i do this with my code ?
void CDatabase_Note::DoBulkFieldExchange( CFieldExchange* pFX )
{
// call the Bulk RFX functions
// for field data members
pFX->SetFieldType( CFieldExchange::outputColumn );
RFX_Text_Bulk( pFX, _T( "[debit]" ), &m_debit, &m_credit, 30 );
}
i have a error cannot convert from CString to char
please someoane help me ?!!!!
Bravoone
|
|
|
|
|
Its a suggestion if we suppose that you have 1000 records in your database and now you want to read their you can break their to 1000/5=200 and then create 5 thread in each thread you insert a loop for read of database in last thread on the loop you use from while (!pPlan->IsEOF() ) i think its good than to use a loop for read 1000 records on runtime
|
|
|
|
|
hi i want to unregister the COM dll through code i had registered it through code and it works fine.
Tasleem Arif
|
|
|
|
|
Load your DLL that you want to unregister, and call the "DllUnregisterServer" function of that DLL. Alternatively, you should be calling "DllRegisterServer" to register your COM dlls.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
HINSTANCE hDLL = LoadLibrary("C:\\BhoNew.dll");<br />
if(hDLL == NULL)<br />
{<br />
AfxMessageBox("DLL can not be loaded..\r\nReason could ");<br />
}<br />
<br />
typedef HRESULT (CALLBACK *HCRET)(void);<br />
HCRET lpfnDllUnRegisterServer;<br />
lpfnDllUnRegisterServer = <br />
(HCRET)GetProcAddress(hDLL, "DllUnRegisterServer");<br />
if(lpfnDllUnRegisterServer == NULL)<br />
{
AfxMessageBox("DLL Entrypoint for function DLLUnRegisterServer could) ;<br />
}
but it gives the messabox above.
i had used this code to register it.
HINSTANCE hDLL = LoadLibrary("C:\\BhoNew.dll");<br />
if(hDLL == NULL)<br />
{<br />
AfxMessageBox("DLL can not be loaded..\r\nReason could ");<br />
}<br />
typedef HRESULT (CALLBACK *HCRET)(void);<br />
HCRET lpfnDllRegisterServer;<br />
lpfnDllRegisterServer = <br />
(HCRET)GetProcAddress(hDLL, "DllRegisterServer");<br />
if(lpfnDllRegisterServer == NULL)<br />
{<br />
AfxMessageBox("DLL Entrypoint for function DLLRegisterServer could not be found..");<br />
}
and it registeed that and worked but problem with unregistering,
Tasleem Arif
|
|
|
|