|
if its previous question you get two answers do you check those answers if yes whats happen if no whats question
|
|
|
|
|
yes both questions !!!!!!!!!!!!!!!!!!!!!!!i need answers !!!!!
plese help me with this !!!
Bravoone
|
|
|
|
|
i remember you have a loop but you can use from a thread in your code and you can read your databse in the thread
|
|
|
|
|
no is not work he jump forward to next edit and nothing is hapening !
you no how ?
this is the code :
BOOL CMyList::PreTranslateMessage(MSG* pMsg)
{
if( WM_KEYDOWN == pMsg->message )
{
if( VK_RETURN == pMsg->wParam )
{
pMsg->wParam = VK_TAB;
}
}
else if( WM_SETFOCUS == pMsg->message )
{
HWND hWindowHandle = (HWND)pMsg->wParam;
if( hWindowHandle == m_city.m_hWnd )
{
UpdateData();
CWaitCursor wait; // Display a wait cursor
//---------------------------------HEADER------------------------------------------//
int x = m_list2.GetItemCount();
for (int j = 0; j < x; j++) // For each item in the list
{
CString strWord;
strWord = m_list2.GetItemText(j, 0); // Get the word
strWord.TrimLeft(); // Remove leading spaces
strWord.TrimRight(); // Remove trailing spaces
// Overwrite the old word with the new trimmed word
m_list2.SetItemText(j, 0, strWord);
}
//----------------------------------------------------------------------------------//
CString sName, sCity, sCountry;
m_name.GetWindowText(sName);
m_city.GetWindowText(sCity);
sCountry.Empty();
for(int nItem = 0; nItem < m_list2.GetItemCount(); ++nItem)
{
CString const sFirstColumnText = m_list2.GetItemText( nItem, 0 );
CString const sSecondColumnText = m_list2.GetItemText( nItem, 1 );
if( sName == sFirstColumnText & sCity == sSecondColumnText)
{
sCountry = m_list2.GetItemText( nItem, 2 );
m_rezult.SetWindowText(sCountry);
}
}
}
}
return CDialog::PreTranslateMessage(pMsg);
}
he jump to m_rezult and ...nothig !
Bravoone
|
|
|
|
|
your problem is editbox or read databse?
|
|
|
|
|
i have 2 problems editbox and read database fast (load more fast in my CListCtrl )
Please help !!!!
Bravoone
|
|
|
|
|
remain one problem : (because i get the answer from somewere alse)anyway ... thanks but this is a serious question : how can i load data from my database more fast ? ( i need all the data to be loaded in my CListCtrl at one time...not 10 or 50 data at time when i scroll the list -- >> ALL DATA !!! )
PLEASE HELP ME !!!!!!!!!
Bravoone
|
|
|
|
|
if you want to read all records instead 10 to 10 or 10 to n see WM_TIMER that is a low priority message,see i say again thread AfxBeginThread or CWinThread::CreateThread
|
|
|
|
|
i don t understand please whitesky help me with my code !
give me an example please!!! (my code -> loop)
Bravoone
|
|
|
|
|
There is nobody how can help me PLEASE !!!!!!!!!!!!!!!!????????
Bravoone
|
|
|
|
|
Its not hard you can see an example WM_TIMER or a thread in codeproject after if you have error if i can i answer to you
|
|
|
|
|
Flaviu_2006 wrote: if( sName == sFirstColumnText & sCity == sSecondColumnText)
This is incorrect.
"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
|
|
|
|
|
Your while loop should be:
int x = 0;
while (! pDataBase22->IsEOF())
{
int nItem = m_list.InsertItem(x, pDataBase22->m_name);
m_list.SetItemText(nItem, 1, pDataBase22->m_city);
pDataBase22->MoveNext();
x++;
}
"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
|
|
|
|
|
this is not speed ! is the same thing is slow and take 5 - 10 min. to load my data !
You have any ideea on how can i done this ?????????
Please someone help me !!!!!!!!!!!!!!!!
Bravoone
|
|
|
|
|
Flaviu_2006 wrote: this is not speed ! is the same thing is slow and take 5 - 10 min. to load my data !
Speed issues aside, your code was plainly wrong. That's what I was correcting. You can surely handle the speed issues.
"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
|
|
|
|
|
Hi All,
I have implemented an 'auto version' into my resource file, the only problem is the .rc files needs to be recompiled for each build. As it is, VC6 has a "minimal rebuild" (/Gm and /GX flags) which will build partial and build clean, but a build clean takes too much time. Is there any way to force VC6 to compile and build a single file without building all of them?
|
|
|
|
|
right click on the file in the file view and select compile
nave
|
|
|
|
|
Thanks,
but I already know that. I am asking if there is a way of automating this since it is a little cumbersome having to click it and compile it before I build. I noticed there is a "Custom Build" feature in the options, though I'm not sure how to use it.
|
|
|
|
|
if what u only need to compile the rc file, in the custom build tab put the following commands
rc.exe /l 0x409 /d "NDEBUG" /d "_AFXDLL" Sample.rc
and in the outputs column put
$(IntDir)\Sample.res
n.b the "Sample.rc" should be replaced with the ur applications rc name.
One question..?
How did u implemented auto version?can u plz tell me?
nave
|
|
|
|
|
Thanks for the advice but it didn't work. I tried various combinations and settings but none of them produced the results I wanted.
I ended up creating a macro. A little crude, but the macro adds a forward-slash to the .rc file thus forcing VS to rebuild it.
I implemented the versioning using a VS add-in from here[^]. It works (increases the build for each full/partial build) but to view the final results a full rebuiled is required.
|
|
|
|
|
Visual C++ builds only those files that have changed since the final file was last built - to do this, it uses the modification timestamps of the files and any dependencies of the files. It should automatically pick up any files #include d in the .rc file as dependencies.
I would implement 'auto version' by generating a header file with just the version numbers in, and #including that in the .rc file.
|
|
|
|
|
Hi all,
How do i merge all the cells in a column to make a single cell in MSFlexgrid control?
Can anyone plz help in this regards?
Thanks in advance.
Regards,
Ram
|
|
|
|
|
I have some C++ source code for which I need to create a DLL in VS2005. It builds OK but in the Debug folder, there is no DLL created, just some OBJ files and Manifest files. What am I doing wrong?
Regards
alias47
|
|
|
|
|
Do you get error? and see here[^] maybe it is some helpful to you
|
|
|
|
|
The code compiled ok. I found the DLL. The output directory was not obvious.
|
|
|
|