|
EM_LIMITTEXT
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
See SetLimitText and LimitText
whitesky
|
|
|
|
|
i set this with
int length=2;
if(m_sh.GetLimitText()>length)
{
m_sh.SetLimitText(length);
}
but it doenot limit the text
thanks
Ashish Dogra
MCA
Noida
|
|
|
|
|
Under which function u wrote this code?
try to write this code in the second line of OnInitDialog() function.
Hope it will help.
Regards,
Ram
|
|
|
|
|
sir thanks for reply
but it will not work in oninitdialog() function
Ashish Dogra
MCA
Noida
|
|
|
|
|
CEdit* ed = (CEdit*)GetDlgItem(IDC_EDIT1);
//replace the IDC_EDIT1 with the properties ID of the edit box
ed->LimitText(5);
Try this!!!!!!!!!!!
Regards,
Ram
|
|
|
|
|
Test this codem_Edit.LimitText(3); or
<br />
m_Edit.SetLimitText(3); and answer me it work or not,please
whitesky
|
|
|
|
|
i try this code in oninitdialog function but not work
Ashish Dogra
MCA
Noida
|
|
|
|
|
But i tested this code and it work how you to use
whitesky
|
|
|
|
|
i want to tell you on thing that i enter values in edit control from buttons which are on the dialog box
i have ten buttins and when i press buttons values appear on edit control.
Ashish Dogra
MCA
Noida
|
|
|
|
|
well,when you want to insert your values to editbox you can check length values before insert
whitesky
|
|
|
|
|
Test this code,its working
CEdit m_Edit;
m_Edit.Create(WS_CHILD|WS_VISIBLE,CRect(0,0,100,23),this,1);
<pre>
<code>
m_Edit.LimitText(3);
</code>
or
<code>
::SendMessage(m_Edit.m_hWnd, EM_LIMITTEXT ,3,0);
</code>
<font size="2" color="#99ff66"><hr></font><div style="padding: 2px; text-align: left; color: rgba(255, 255, 255, 1); width: 80px"><font size="2" color="#99ff66">whitesky
</font></div><hr>
|
|
|
|
|
Right click on the edit control and where you add a variable set the maximum and minimum values for the edit control. the variable associated with the edit control is of integer type
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I'm in trying to run a application(vc++)....the exe generated is absolutely running fine in DEBUG version...but when ever i try to rrun in Release version, it's not working properly...this is really a strange problem....
Cud anybody tell me the remedy of this problem?
kamalesh
|
|
|
|
|
kamalesh82 wrote: I'm in trying to run a application(vc++)....the exe generated is absolutely running fine in DEBUG version...but when ever i try to rrun in Release version, it's not working properly...this is really a strange problem....
Cud anybody tell me the remedy of this problem?
Reading this[^] article by Joseph should help.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Generally, You have some trouble with optimizations. You have to switch on the release version, and then to REBUILD ALL the code. During the compilation and/or linking process, You have to watch carefully at the bottom of the dev. studio, where the warnings/error messages will be shown. Try to make changes the compiler suggests. If the code doesn't work again, try to switch off as many optimizations as You can. After that, rebuild the code again. You can hope that the code will work OK without any optimization. If the problem disappears, You can try to switch on the optimizations one-by-one, and then rebuild the project any time, searching the bug this way. Anytime, watch on the warnings carefully. By the way, as I know, the stack under debug version has some predefined limit. Try to find the stack settings under the release version, and adjust the value - for example, 1MB or more.
D. Senic, Belgrade
|
|
|
|
|
Are you using MFC and custom message handling (ON_MESSAGE, ON_REGISTERED_MESSAGE) at all?
If so, check that your handler functions for those messages are declared
afx_msg LRESULT funcname(WPARAM,LPARAM)
and not anything else. This is a common cause of "works in debug, crashes in release".
Alternatively, modify your link properties to generate debugging information, and run the release version under the debugger. You can do this without turning off optimisations. This might help you find the area that's at fault.
Steve S
Developer for hire
|
|
|
|
|
Hi, I've to write a code to solve this problem:
"The packets form A has been received by B but the packets need to be assemble at B. Write a programming in C/C++ to reassemble the packets at B."
Can somebody help me...
Hi, I'm new in programming. Can somebody help me . . .
|
|
|
|
|
Hello,every body,
please help to tell me how to save XML as string, (I use VC++ to develop)Pug XML Parser.thanks!!!
regards
angus
angus
|
|
|
|
|
You mean Pug located here at Code Project? Did you try reading the documentation?
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
thank for your help!I use pug XML parser to set something into XML content,now I want to save the XML content as string or Blob,than I can save it in database.
i have try to use method:outer_xml(),but may be some steps wrong,please tell me the right method,thanks!
angus
|
|
|
|
|
|
In My dll, I use SetWindowHand(HWND hWnd) to get the exe program window's HANDLE, but in SDI program, when dll sendmessage to view window of exe program, the view can't recieve the message. in Dialog program, it runs well, but in SDI, it has that question, why??????
~~~
|
|
|
|
|
R u setting the windows handle from the view class? Some times the Frame wnd in the SDI app might have got the message. did u trried catching the message there?
nave
|
|
|
|
|
i try to catch the message in both view and Frame, but nothing was caught,
what's the matter???
~~~
|
|
|
|