|
Thanks for all the replies
|
|
|
|
|
How to know whether the value is changed?
I've tried to override CMFCPropertyGridProperty::OnUpdateValue , but got a problem.
class MyProp : public CMFCPropertyGridProperty
{
...
};
BOOL CMyProp::OnUpdateValue()
{
if (!CMFCPropertyGridProperty::OnUpdateValue())
return FALSE;
if (IsValueChanged()) {
MessageBeep(MB_OK);
}
*m_pValue=GetValue().fltVal;
return TRUE;
}
|
|
|
|
|
I think even if same value is typed.It will return true.Because you tried to change the value .
Sudhir Kumar
|
|
|
|
|
i have a coding were i have to display the strings in the list box and if i select a particular string in the listbox a specific operation is done,i have put all these codings in a button click, but the listing of string in listbox takes place finally after all the operation inside the button click gets over,but i need the listing to be done first,where lies the problem???
for(j=0;j<n;j++)>
{
getlist(j,name); ->function call which fetches name
printf("\n%s\n",name);->this printing takes place
list.AddString((CString)name);
}
</n;j++)>
the below operation is done after the selection but listing doesn't happen
currentindx=list.GetCurSel();
SelectService(currentindx,&callback);
Raja
|
|
|
|
|
Sorry I didn't understand your problem. What do you want?.. as you have said you have put the code for adding string in List box on button click, than it going to happen at button click.
See programming always happen in sequence, so you have to decide sequence of your programming steps!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
Can you please make you question more understandible.
Sudhir Kumar
|
|
|
|
|
sudhir_Kumar wrote: Can you please make you question more understandible.
I am sorry , is this question for me or guy above me.. I am little confuse, what to reply ?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
Why are you populating list box in button click. Can you populate the list box in OnInitDialog?
akt
|
|
|
|
|
Mohanraj D wrote: list.AddString((CString)name);
The cast is unnecessary.
Mohanraj D wrote: the below operation is done after the selection but listing doesn't happen
currentindx=list.GetCurSel();SelectService(currentindx,&callback);
But where are you asking for the text of the selected item? You need to call list.GetText(currentindx, ...) at some point.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Can you more explain,do you need to sort items or you want to select them?
|
|
|
|
|
Hi all...
I am having a string
i.e *.doc,*.xls,*.pdf,*.mdb.
I want to seperate each other..
just like..
.doc
.xls
.pdf
i am not getting how to seperate it...plz give me some idea..
thank you in advance...
manju
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|
|
How about tokenizing the string based on ',' delimiter and then extracting the characters after the '.' to get the extensions. You can tokenize the strings using strtok. There could be better ways of tokenizing the strings using Regular Expressions.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi..
thank you..
its worked..
manju
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|
|
Hi..
I am having
_TCHAR *sFileExt;
I wnt to convert it to char[]..
i.e
_TCHAR string[] = SFileExt;
I am getting the error....
Error:cannot convert from '_TCHAR *' to '_TCHAR []
How can i..
tahnk you
mannju
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|
|
string copy needed, see _tcscpy[_s]().
BTW, what about learning C/C++.
|
|
|
|
|
Hi..
I am learning sir...u still remember me
thnak you
manju
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|
|
You can also use string streams.
#include "string"
#include "vector"
#include "sstream"
...
string sResult(_T("Hello,can,you,split,me?"));
istringstream ResultParser( sResult );
string sToken;
vector vResults;
while ( getline( ResultParser, sToken, ',' ))
{
vResults.push_back( sToken );
}
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
also you could have a look at CString::Tokenize
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
|
See here[^]
And have a look at the file cstringt.h
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Thanks Rajesh. I just searched the CString class members only.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
My fault this member function is available is VS2002 and upward, it doesn't available for people using VS6.
you have two option for same, if you still want to use said CString function, either download the WTL classes or rip apart CString code from upward version of VS and include same in your source code
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
See does this[^] thread helpful?
|
|
|
|
|
Hi all,
I am working on VC2005 in Vista. I have made a DialogBox in that i have made several Edit boxes, in one of my edit box i am specifing output directory name. My problem is if i click back on that edit box the value just disappears, directory is created at the specified path but output value is not displayed.
How can i resolve this....
Thanks in advance
|
|
|
|
|
VCProgrammer wrote: My problem is if i click back on that edit box the value just disappears,
It just can't "disappear" like that! Either somewhere UpdateData is being called wrongly or some part of your code is making it behave like that.
Nibu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|