|
|
Comments and Discussions
|
|
 |
|

|
can not input Chinese characters in this Edit control
|
|
|
|

|
I have created a grid and in my Mainfrm.cpp im trying to call dat grid using DoModal function,my code is running without errors, but im unable to call my grid control. I will be thankful, if u help me..
|
|
|
|

|
Hello.
I'm a beginner in visual c++.
I'm using an editor named "Colorizing edit control" in my project, but Idon´t know what is missing in my code, because when i click on the left mouse button and try to select my text until the end, the vertical bar doesn't move, and can´t select the text until the end.
sorry for my Inglish!
Thanks for the help.
|
|
|
|

|
Hi, I try to write a string in color edit by doubleclick on one item in a treeview; my project contain a CMDIChildWnd window with two element, one is a treeview and other is a color editor.
On doubleclick on tree, i send a message to editor with the string to write, I do this:
LONG ColorEditWnd::OnAutoCompleteText(WPARAM wparam, LPARAM lparam)
{
SetFocus();
TStr* text = (TStr*)wparam;
if(m_AutoCompleteText.ICompare(text->SubStr(0,m_AutoCompleteText.Length())) == 0){
int length = m_AutoCompleteText.Length();
for(int i=0;iStrStr("(",1);
InsertString(text2);
_SetCursorPosX(start + nextcurstep +1);
return 0;
}
I clear the initial part of the word if already present on editor, so insert a word and than move the cursor because all my word are function and I would the cursor here 'func(|)' not here 'func()|'.
This is my problem, i can't show the prompt! Cursor is on correct position, but I can't see him, like the editor don't have the focus.
Amyone can help me please?
Thanks.
|
|
|
|

|
There was the same error on VC8.0 (like on VC7.0)
So... I did like that below... ^^
// DECLARE_CONTROL(ColorEditWnd, CWnd);
// IMPLEMENT_CONTROL(ColorEditWnd, CWnd);
Error was removed... but Warning is remain...
Thanx for your great app.
I am a programmer
|
|
|
|

|
We had to do the same issue in VC8.0. For VC7.1, we only had to comment out DECLARE_CONTROL(). VC7.1 thinks that IMPLEMENT_CONTROL(); is a forward declared function, however VC8.0 requires forward declared functions to have a return type defined, and then fails to compile in this case.
I believe these two macros are from Stingray's library. And both should be eliminated from the source(unless you have Stingray's library).
|
|
|
|

|
Hi, I have find a strange operation in function LoadText(const char *buffer); if you try to load a text of 2 line where in the first line there is only "\n" char, function don't load the second string.
For load correctly this text i have modify the code in this way, but I'm not sure that this is the best way!
before....
if (!bFoundNewLine)
{
InsertTextLine(accum, CursorPosY(), false);
}
after...
// if (!bFoundNewLine)
//{
InsertTextLine(accum, CursorPosY(), false);
//}
Bye.
|
|
|
|

|
Hi, I know this isn't a word processor, but i think that upgrade this class with function like "Find" and "Replace" or handle bookmark can improvement the usability of class.
This is a beautiful control and with this function, in my opinion, will be complete!
Have you any idea how I can add "Find" function?
Thanks a lot!
|
|
|
|

|
Find should be as simple as:
bool ColorEditWnd::FindAndSelectFirst(CString searchString)
{
for (int i =0; i < m_text._GetSize(); i++)
{
int pos = m_text._GetLine(i).Find(searchString, 0);
if (pos != -1)
{
ScrollToLine(i);
SetSelection(pos, i, pos + searchString.GetLength(), i);
return true;
}
}
return false;
}
you should be able to work out "Replace" from that.
|
|
|
|

|
Hi, first of all.. thank for this nice control!
I have a problem: when I run in 'Debug' and try to write char like "ò" or "è", the code goes in assert in file "isctype.c" at this line "_ASSERTE((unsigned)(c + 1) <= 256);"
Why?
In 'Release' all run correctly; I can't understand this behavior.
Thanks for help!
|
|
|
|

|
this control doesn't support Unicode.
the function with the _ASSERTE is complaining that the character is received is out of the range it was expecting...
|
|
|
|

|
Just a note, I've only downloaded the test program and run it very quickly. I noticed a problem with one extra CR/LF pair appended to the end of the file on each successive load/save operation.
Gazza
|
|
|
|

|
The following change in the conditional in UnloadTxt() fixes the problem...
void ColorEditWnd::UnloadText(CString &pText) const
{
int index;
pText.Empty();
int iLines = GetTextSize();
for(index = 0; index < iLines; index++)
{
pText = pText + GetTextLine(index);
if (index < iLines - 1)
{
pText = pText + '\n';
}
}
}
Gazza
|
|
|
|

|
Hello,
First of all, this job is really nice and esasy to be integrated, I dont need word wrapping and this seems what I need.
Unfortunately, I observed that it goes really slow when opening and loading long text files. I also observed a memory leak!
Is there any limit in text size used !!
Thanks in advance and once again gr8 Job.
|
|
|
|

|
Flower303 wrote:
I also observed a memory leak!
where ?
Flower303 wrote:
Is there any limit in text size used
no.
Software | Cleek
|
|
|
|

|
Hi, sorry for disturbing,
It seems to be a memory leak ...
Here what I done
I copy paste a text the text from the ColorEditWnd.cpp up to more than 23000 lines
(what is equivalent to a file of 580 KO,
And the editor has really a difficulty (time needed) to manage the operations.
The memory consumed by the application is increased than if erase all the edited by a backspace or delete, the memory do not back to its initial value (or around it).
But really, this is not what disturbed me, what disturbed me is that I I continue the same operation (copy paste) with the 23000 lines, the application get into a not responding state.
If I try to do that with Notepad I success.
May be it is due to the buffer that guarantee the undo operation.
Sorry Chris, If I allowed my self to do some remarks, it is only because your code interested me and
- is very rich in methods,
- is very flexible and extensible
- easy to be implemented,
I only find it today and did not tested it for days.
I am using XP / SP2,
Thanks a lot
|
|
|
|

|
Yep, I saw it too....
It worked perfectly well on small files and small texts, but then I tried loading in a text-file of about 200 K and it took ages to load.
Also saw a memory huge leak, didn't track it though...
Another strange behaviour is that pasting text in performs way faster than using the LoadText function.
Shame about the performance, because this stopped me from using it in my app (which is going to have to deal with long file). If you happen to fix it in the future, I'd love to have the fix, because besides the performance it functions really well
|
|
|
|

|
Can I set the style of the "m_pColorWnd" object to be multiline without inserting a new line character "\n" in a long sentence.
(sure, the long of sentence is greater than the width of the frameRect
Bonne chance!!!!
|
|
|
|
|

|
can not support chinese char!!
-----------------------------
Mr.Whelk
-----------------------------
Zhuhai City ,Guangdong ,China
|
|
|
|
|

|
what will i do in your source code? can you tell me,thanks a!
-----------------------------
Mr.Whelk
-----------------------------
Zhuhai City ,Guangdong ,China
|
|
|
|
|

|
:-DI have modified some of the codes to support Chinese . Your classes is very helpfull! How great!
thank all for helping me
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
|
A colorizing text edit control, with full undo/redo, clipboard support, etc.
| Type | Article |
| Licence | |
| First Posted | 30 Sep 2001 |
| Views | 263,042 |
| Downloads | 6,314 |
| Bookmarked | 76 times |
|
|