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).
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).
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).
How to show/hide .bmp file instead of tooltip when a mouse moves over a button in Win32 C based application.
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:
- Server Name
- Database Name
- 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.
if( nItem != -1 )
sSecondColumnText = m_list2.GetItemText( nItem, 1 );
// set the text to the second edit box
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
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 !!!!!!!!!!!!!!!
George (m_name) -> NewYork (m_City) and if exist on the same line :
i need the rezult :
m_rezult ---> USA !!!!!!!!!!!!!!!
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
_editRed.Create(WS_BORDER | ES_CENTER | WS_CHILD | WS_VISIBLE | WS_TABSTOP ,rectTemp , this, 1000);
i had make _editRed is member of class but style is same before.
I used this code to get style but run not good.
//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?