|
I'm adding exception handling to a C++ application and I get this error when I link.
What do I need to link with to resolve this external?
- BC
|
|
|
|
|
bruccutler wrote: What do I need to link with to resolve this external?
I don't know, but if I was in your situation the first thing I would do is read the documentation for CInvalidArgException
|
|
|
|
|
Is it an MFC application?
|
|
|
|
|
Yes, it is a C++/MFC application. There used to be an option to turn on Exception handling in the project file, but I can't find it.
|
|
|
|
|
last time,one administrator of this forum tell me study C++ need to work by myself.i know.....and i can taste your angry gas.but some problem need to be solved,although it is a little problem.also i can't find a answer in the MSDN.
if you don't have time,please don't be care at me.if someone have love and time,please help me.the question is :
((WORD)(((BYTE)(a)) | ((WORD)((BYTE)(b))) << 8)) how do i understand it?
|
|
|
|
|
putting the byte b in msb and a in lsb of a word.
is not it?
|
|
|
|
|
The best way to understand code is usually to break it into smaller parts until they're simple enough to understand.
Let's see
<br />
( (WORD) ( <br />
( (BYTE)(a) ) | ( (WORD) ( (BYTE)(b) ) ) << 8 <br />
) ) <br />
which is like ((WORD)( x )) meaning cast x to a WORD (usually 2 byte integer type, check with sizeof(WORD); )
where x is
y | z << 8
where y is (a) cast to a BYTE (usually 8 bit unsigned) and z is b cast to a BYTE and then cast to a WORD.
Basically pair up the brakets and break down the expression into its parts, good luck
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
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
|
|
|
|