|
Read the lines in the list control, one by one.
For each line, split it into it's parts (name, city, country)
Compare the name from the list with the given name. If it matches, compare the city (from the list) with the given city. If it matches, display the country (from the list).
What's the problem?
|
|
|
|
|
you can give an example how can i do this !?
PLEASE !
Thank you !
Bravoone
|
|
|
|
|
Sorry, I don't have the time right now.
But there *is* (for sure) a lot of examples how to:
1. Find out the number of used rows in a list control.
2. Get the text from a specific line in a list control.
That's a good way to start.
When you got that logic working, continue with splitting a text line into it's components (in your case, name, city and country).
When that's done, go on with the comparison.
And you are done.
A hint: Study the methods of the CListCtrl class.
Here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfc_clistctrl.asp[^]
-- modified at 6:53 Monday 7th August, 2006
|
|
|
|
|
kakan wrote: What's the problem?
There's no nice way to say it. Maybe if we ignore him, he'll go away.
"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
|
|
|
|
|
For sure, I won't try to answer his questions again. He won't give up until someone else presents him a complete, running sample. He won't ever be a coder with that attitude.
|
|
|
|
|
And after reading all your posts I need a good strong stiff drink. Geez, have patience!
|
|
|
|
|
You've only waited 16 minutes. Why are you so impatient? Do you think asking the same question in a 4-5 hour window will actually get you any useful help? Any chance you had is surely gone by now.
"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
|
|
|
|
|
Flaviu_2006 wrote: Nothing on codeproject I NEED HELP !
Yet another useless subject line. By now I would have expected you to have read the forum rules to discover why you are not getting a response that you can use. Perhaps you should stop whining too.
|
|
|
|
|
Can't you wait any longer than 57 minutes?
"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
How to add table inside tooltip using Win32 C based application. Means when i move mouse over a button it should show tooltip containing table(say 5 x 5)with some information. (I know how to create normal tooltips).
OR
How to show/hide .bmp file instead of tooltip when a mouse moves over a button in Win32 C based application.
thanks
Manjunath S
Bangalore
|
|
|
|
|
Can this [^]help ?
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
|
Hi all,
I'm struggling with a strange problem. The thing is I wrote a application that installs / creates a DSN. I'm using a dll called Interop.ODBCTool.2.0.dll. And this dll has a function called CreateDSN() which accepts the following parameters:
- DSNname
- ODBCDriver
- Server Name
- Database Name
- Username
- Password
- Silent Option (bool)
- ODBC ATT (parameter can be NULL)
So the problem is that, I can create a DSN on a machine that has a established MySQL installation (that has other datasources, databases and so on.) But when I install a fresh copy of MySQL on a machine and nothing has been done concerning DSN, Databases and so on, the function (which is bool) returns false. It doesn't want to create a DSN. (But ... Like on my machine it works fine) . So the thing is do you have any idea that the problem could be.
(The MySQL Drivers is installed)
Thanx alot.
-- modified at 7:12 Monday 7th August, 2006
Regards
Programm3r
|
|
|
|
|
Hy all !
Again i have a serious problem with my list control !
This code works , but now i want to do something new and I don t have any ideea how to do it !
If is someoane to help me with my code !
void CMyList::OnOK()
{
UpdateData();
m_list2.RedrawItems(0,m_list2.GetItemCount());
CString sName;
sName = _T("NAME");
m_name.GetWindowText(sName);
LVFINDINFO stInfo1 = {0};
stInfo.flags = LVFI_PARTIAL;
stInfo.psz = sName;
int nItem = m_list2.FindItem( &stInfo );
if( nItem != -1 )
{
sSecondColumnText = m_list2.GetItemText( nItem, 1 );
// set the text to the second edit box
m_explicatia.SetWindowText(sSecondColumnText);
}
}
This code find me the item in the second column !
Now i have 2 edit boxes to search in the list control !
And all i want is to find them in list control but :
My list control:
------------------------------------------------
| NAME | City | Country |
________________________________________________
|George |London | England |
|George |NewYork | USA |
------------------------------------------------
I have 3 edit boxes
1) m_name
2)m_City
3)m_rezult
all 3 are CEdit;
first i want to find if in the m_name matches with "NAME" next m_name with "City" and if is find it the "name" and the "City" from both 2 edit boxes i need the country in the m_rezult !
i want to search this :
George (m_name) -> London (m_City) and if exist on the same line :
m_rezult ---> England !!!!!!!!!!!!!!!
and :
George (m_name) -> NewYork (m_City) and if exist on the same line :
i need the rezult :
m_rezult ---> USA !!!!!!!!!!!!!!!
i need some help !!!!!!
Bravoone
|
|
|
|
|
You dont need to repeate your problem,we can see your thread
|
|
|
|
|
Flaviu_2006 wrote: if is someone who can help me? PLZ!!!!!!
Another useless subject line. Please specify your problem in brief in your subject line.
And, as others have pointed out, please don't start new threads when you have a perfectly good thread going already. All you are doing is irritating people so you are much less likely to get help.
|
|
|
|
|
You asked this same question a mere 37 minutes ago.
"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 want to draw an item ( a particular one) in Mousemove of an owner drawn list box. How do i the dc and for that item ( bounds).
- thanks
Vicky
|
|
|
|
|
|
I am not using windows forms. I am using MFC thanks
Vicky
|
|
|
|
|
I have Dialog public from CColorDialog. I added three edit box to get Dec value and change to Hex value ( R - G - B ) to R-Hex, G-Hex, B-Hex.
get and convert it OK.
But i can make my edit box same edit box of CColorDialog
Help me to make my edit has style same edit box of ColorDialog
My Code to make Edit box
BOOL CHpbColorDialog::OnInitDialog()
{
CEdit _editRed;
_editRed.Create(WS_BORDER | ES_CENTER | WS_CHILD | WS_VISIBLE | WS_TABSTOP ,rectTemp , this, 1000);
_editRed.SetFont(GetFont());
_editRed.SetLimitText(2);
............
}
Thank for reading.
Huynhnb
.: Your success is also me :.
|
|
|
|
|
|
huynhnb wrote: CEdit _editRed;
This object will cease to exist once OnInitDialog() is done. Make it a member of CHpbColorDialog .
"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 had make _editRed is member of class but style is same before.
I used this code to get style but run not good.
DWORD dStyle;
//Get Red Decimal
CWnd* pRed = GetDlgItem(706); // window of RED edit on CColorDialog
//Get style of pRed
dStlyle = pRed->GetStyle();
_editRed->ModifyStyle(0, dStlyle , 0);
but _editRed style not same pRed;
You have any comment?
Huynhnb
.: Your success is also me :.
|
|
|
|
|
Some styles cannot be changed at runtime.
huynhnb wrote: _editRed->ModifyStyle(0, dStlyle , 0);
What's the return value?
"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
|
|
|
|