|
thanks for your chariness
|
|
|
|
|
youbo wrote: chariness
I don't even want to know what that could mean.
|
|
|
|
|
It's the opposite of "angry gas"
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
I think 'Chairness' would be the measurement unit used to find out your ability to sit in a chair.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
hi all,
now i'm having a msflexgrid vth mi dialog.i could scroll inside mi dialog.but mi probs is that i couldn't scroll inside mi flexgrid using the mouse(scroller).can any one plz help mi in this regard.
very thanks in advance.
Saravana...
|
|
|
|
|
can you put your question a bit clearly?
|
|
|
|
|
here is my clear question chandu..
i'm having a msflexgrid in my dialog.i want to scroll the flexgrid to and fro to view all the data using the mouse scroller(roller of the mouse).now my mouse scroller is not working inside the flexgrid.(they are now working only by cliking the buttons)
thanks ....
saravana.
|
|
|
|
|
now i got it.
even i wanted to know how to do it.
i can do it in some round about way using pretranslatemessage and sendmessage.
but some r and D is required.
lets see if any master gives a simple solution.
otherwise, tomorrow i shall work it out and guide you.
|
|
|
|
|
Thats fine chandu....let us wait for a simple solution.
Regards.
Saravana..
|
|
|
|
|
are you aware of pretranslatemessage?
|
|
|
|
|
Ever heard the old saying.."you can't get there from here"?
Well, it applies here if you are using CMSFlexGrid class as it does not support mouse scolling.
This can be seen easily by looking in this class header msflexgrid.h.
Why did you choose flex grid?
There are other grid controls that support this , you may have to switch to those if you want this.
|
|
|
|
|
hai,
i worked on your problem and arrived to this solution.
here is the 5 lined logic to scroll the flex grid using the mouse wheel.
1.add the PreTranslateMessage event to your dialog.
2.in the pretranslate message, add the following code.
<br />
if(pMsg->hwnd==m_g.m_hwnd)
{<br />
if(pMsg->message==WM_MOUSEWHEEL && pMsg->wParam==4287102976)<br />
m_g.SetTopRow(m_g.GetTopRow()+1);<br />
else if(pMsg->message==WM_MOUSEWHEEL && pMsg->wParam==7864320 && m_g.GetTopRow()>1)<br />
m_g.SetTopRow(m_g.GetTopRow()-1);<br />
}
3.in the above logic, the values indicated in bold depends on the size of your grid on your dialog.
4.so, you have to find them out in debug mode. if you donot know how to find them out, then i can help you.
5.any more doubts also then you are welcome.
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
Can anybody tell me how to clear the combo box in the OnEditChange Function.
what i want is : i am searching and loading the ComboBox with values from the database based on the string i give in the ComboBox. So as the string changes i need new values to be loaded in the ComboBox. What is happening now is if i change the string,the ComboBox is loaded with values of the new string and the old string.I dont need the previous values.i tried RESETCONTENT function within the OnEditChange Function.But it didnt work.
thanks in advance
|
|
|
|
|
philiptabraham wrote: Can anybody tell me how to clear the combo box in the OnEditChange Function.
See here.
philiptabraham wrote: i tried RESETCONTENT function within the OnEditChange Function.But it didnt work.
Why not? What happened? Be specific.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
when i give the function it is always getting reseted.
ex:i need to retrieve all the values from the database starting with 'p'.So ill give 'p' in the comboBox and the Corresponding values loaded into the combobox.But latter if i want retrieve all the values from the database starting with 'po', then it is listing all the datas starting with 'p' and 'po'.
What i have done is in the EditChangeFunction i am fetching the user entered value from the combobox say 'p' create the query and call the database function.The Result from the database are stord in an array and this array is loaded into the ComboBox Using AddString.
|
|
|
|
|
philiptabraham wrote: when i give the function it is always getting reseted.
Last time I checked, that is exactly what the CB_RESETCONTENT message is supposed to do.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
this is a sample code that i have done
OnEditChange()
{
m_aa.AddString("xxx");//m_aa is the variable of my combobox of Type CComboBox
m_aa.AddString("YYY");
m_aa.RESETCONTENT();//will not allow me to edit the comboBox ,it will get reset
}
whati nedd is ,whenever i make a change in the combobox only xxx and yyy should be displayed in the combobox list.
what is happening now is whenever i make or edit the combobox the number of time the data displaying is doubled
|
|
|
|
|
here, you are adding the string and then resetting the content.
got it?
|
|
|
|
|
I'd hazard a guess and say that you that you might need to remove old items from the combobox before adding new ones?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
i tried that also but its not getting it removed completely.
what i tried is: On the second time before adding new string ill get the count and within the loop i tried to delete the string.But every thing is not getting deleted
|
|
|
|
|
philiptabraham wrote: On the second time before adding new string ill get the count and within the loop i tried to delete the string.But every thing is not getting deleted
Probably because you are removing from the top-down rather than from the bottom-up. Why are you not removing them all at once rather than one at a time?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
have you used
combovariable.ResetContent();
before calling your query?
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
what is happening is if i give restContent it will reset it after each character i enter in the combobox. For example if i type p the value is reseted where as i want to search a string for 'po'.
|
|
|
|
|
i need to retrieve all the values from the database starting with 'p'.So ill give 'p' in the comboBox and the Corresponding values loaded into the combobox.But latter if i want retrieve all the values from the database starting with 'po', then it is listing all the datas starting with 'p' and 'po'.
if i give RESTCONTENT after writing p, it will get reseted. I wont be able to search for strings with 2 or 3 letters
|
|
|
|