|
Yeah I'd recommend using the FOF_SILENT flag
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi all!
I want to develope an ActiveX TextBox control with additional features
that doesn't exist in the current textbox component.
Requirements
1) I want to use existing textbox control and enhance it to my requirements.
2) Is there any way using which we don't have to draw the control manually as it is
in the case of VisualBasic?
If anybody is having anykind of reading stuff give me the links.
Viral Joshi.
|
|
|
|
|
Why ActiveX ? Why not just derive a class from CEdit (assuming you're using MFC) and add the required features in the derived class ?
|
|
|
|
|
Thanks for your reply but let me know how is it possible in Activex.
But if i derived a class from CEdit then is it the ActiveX? And how can i
use it as a control like textbox in other applications?
Viral Joshi
|
|
|
|
|
I have this :
CString sEx;
m_ex.GetWindowText(sEx);
m_ex = CEdit ;
i whant somethig like that : 16.0697 to 16.0700 !!!!!!!!
round!
How?????
Please someoane help me !!!!
(visual c++)
Bravoone
|
|
|
|
|
Try this function:
<br />
void RoundString(CString& str)<br />
{<br />
float fVal = 0;<br />
swscanf_s(str, L"%f", &fVal);<br />
int nTemp = (int)((fVal + 0.005)*100);<br />
fVal = (float)((float)nTemp/100);<br />
str.Format(L"%.4f", fVal);<br />
}<br />
|
|
|
|
|
i dont understand , can you explain me on my example ?
thank you ! so mutch !
Bravoone
|
|
|
|
|
Bravoone_2006 wrote: can you explain me on my example ?
He gave you an example!
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
i need something more simple, its not exist something more simple then this?
thank you !
Bravoone
|
|
|
|
|
Bravoone_2006 wrote: its not exist something more simple then this?
no.
|
|
|
|
|
you idiot.
someone gives you a function you just have top copy/paste in your code and call, but always you complain.
|
|
|
|
|
The function I gave you receives a CString object by reference, puts the value into a float variable, rounds it to 2 numbers after the decimal point and converts the new (rounded) value back into the CString object.
|
|
|
|
|
i need something more simple, its not exist something more simple then this?
thank you !
Bravoone
|
|
|
|
|
Sorry, but this is as simple as it gets ...
|
|
|
|
|
More simple than a copy/paste ??
|
|
|
|
|
That's two operations, Cedric. Can't you trim it down to one? Quit making folks work so hard.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
copy/paste == 2
...processing reduction...
shoot in the ass == 1
reduction performed successfully
|
|
|
|
|
your example will compile only if UNICODE is defined...
you should use _T() , stscanf() and so on...
|
|
|
|
|
ok ! i understand you but you don t understand ME !
Le t say if someoane say : " You are not so smart if you use 6 lines of code for this ! "
All i want is to find a way to make this function more simple , because he use to mutch code for this function ! for this function !? think about it its just ROUND ! make this : 16.0697 to 16.0700 to use sutch code!? the code is fine but no one say its wrong!
i remind you i have CDialog base aplication, i have for ex:
m_edit CEdit;
m_edit2 CEdit;
i must use for ex:
OnChange m_edit;
CString sT1,sT2;
m_edit.GetWindowText(sT1);
...
...
...
m_edit2.SetWindowText(sT2);
Bravoone
|
|
|
|
|
It is almost certainly possible to write your function in one line - but the advice that you are getting from professional programmers here is not to do that. What it does will be the same, the syntax just more complex.
If this is not simple enough for you, find a better way. Before you complain about the solution someone has bothered to give you, engage brain and think of what is involved (having one solution in front of you should help). In this case the simplest way I can see to round the contents of one edit box is to get the string, convert to a floating point representation, round and convert back to a string. If you can find a better way, we have shared one solution with you, please share yours with us.
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|
You're absolutely right !!!
Thanks !!
|
|
|
|
|
Hi
I have been using vc++ 6.0.The bscmake.exe utility which is meant
to create .bsc file is not able to execute.
When I build the application I get "Error executing bscmake.exe." at the end of the debug information and hence I am not able to avail the facility of source browser.
Can you please tell me how to solve my problem?
With Regards
Neeraj Sinha
|
|
|
|
|
Can i partition Router or Switch into trusted and untrusted network.
If yes which one is more advantageous and why also how this can be implemented.
I have three users to whom i want to provide access of data onto the servers(White users) and three user to be denied the same(Black users).
So please advise whether Router or switch is feasible.
Arvind kumar sharma
software Developer
|
|
|
|
|
See here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi all,
In my application I need to read/write values to/from certain cells in an excel sheet.
I've imported the Microsoft Excel 11.0 Object Library and added all the required interfaces (I think).
My question is how do I open an existing XLS file and how do I get or set values from a certain cell?
Thanks in advance,
Guy.
|
|
|
|