|
You have subclassed the edit control, handled your message of interest, created a solid brush and painted your color there! Can you do it without subclassing an edit control? With a plain CEdit control?
PS: The requirement of the person who started this thread was to simply display colored text. I would not even think of subclassing an edit control for this purpose.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
You do not have to subclass the CEdit control, but you do have to handle its messages in order to paint the colors yourself. You can do that by handling the messages in the parent window.
The control I wrote uses its own class so that users do not have to keep writing the same handling code over and over.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
I think you can change color
|
|
|
|
|
Please see this[^]
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
I know with subclassed but you said
"you cannot change the white color of an edit control"
|
|
|
|
|
It was completely in context with the question that was asked. It is silly to subclass an edit control and handle events and paint, just to display some colored text with background. And of course you will need to subclass to do such stuff. As you subclass it, it is no more the normal edit control. In that article I could see that certain events are not handled properly. For an instance, you cannot paste in the second edit control of that dialogbox. These are all the pitfalls of subclassing, about which we need to be extra careful.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
hey everyone,
Thanks far all the reply. I've manage to do it by using the static text and from reading the articles from this website for examples.
Thanks
|
|
|
|
|
i think this site will help you alot www.flounder.com, download option will be there and click the option there win32progming will be appeared, download the al;l the code to your pc.
Chinna
|
|
|
|
|
this site will help you alot in win32 programing
http://www.flounder.com/download.htm#Complete%20Win32%20CD%20Contents
click Complete Win32 CD Contents
Chinna
|
|
|
|
|
launcher.obj : error LNK2001: unresolved external symbol "public: __thiscall tLgInteger<class std::vector<unsigned long,class std::allocator<unsigned long> >,unsigned __int64>::tLgInteger<class std::vector<unsigned long,class std::allocator<unsigned long> >,unsigned __int64>(unsigned long)" (??0?$tLgInteger@V?$vector@KV?$allocator@K@std@@@std@@_K@@QAE@K@Z)
hint_54
|
|
|
|
|
hint_54 wrote: launcher.obj : error LNK2001: unresolved external symbol "public: __thiscall tLgInteger<class std::vector<unsigned="" long,class="" std::allocator<unsigned="" long=""> >,unsigned __int64>::tLgInteger<class std::vector<unsigned="" long,class="" std::allocator<unsigned="" long=""> >,unsigned __int64>(unsigned long)" (??0?$tLgInteger@V?$vector@KV?$allocator@K@std@@@std@@_K@@QAE@K@Z)
huuuu
where is the question ?
|
|
|
|
|
No question just found that funny
hint_54
|
|
|
|
|
i may be missing something there, but, what's funny in this ?
|
|
|
|
|
This was the line that produced that error
tLgInteger<tVector, tOC>::tLgInteger( tElement nValue )
So it's just like CPallini said: "No more alcohol to the linker!"
hint_54
|
|
|
|
|
Yes, but tLgInteger is a template as is tVector . All these template parameters have to be encoded into the typename. Ignoring the long typename (it is of no consequence anyway) the error is simple: the constructor is declared but not defined.
Steve
|
|
|
|
|
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Interesting
Btw.. My 1 too.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
|
Mine?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Hi, I'm having a problem using accelerators in VC++.
My accelerators (defined in the Accelerator Table in my resource file, loaded up using LoadAccelerators and run using TranslateAccelerator)) work fine in the main application window, but I can't seem to get them to work in the child windows of my application. If the focus is on the main window the accelerators will work, but once the focus falls into a child window, accelerators no longer function. I only need the accelerators to work in a single child window (a listbox, to be exact), and I don't need them in the main application window.
Thanks!
KR
|
|
|
|
|
okey dokey.
I have 2 classes:
class imageViewer{...};
class camData{...};
imageViewer has a function called funcA();
camData has a function called funcB();
I wanted to call funcA; in funcB();
i.e.:i've tried both:
<br />
#include "imageViewer.h"<br />
void camData::funcB()<br />
{<br />
..<br />
imageViewer::funcA();<br />
}<br />
I get this error:
error C2352: 'ImageViewer::showPicture' : illegal call of non-static member function
-AND-
<br />
#include "imageViewer.h"<br />
void camData::funcB()<br />
{<br />
..<br />
funcA();<br />
}<br />
I get this error:
error C3861: 'showPicture': identifier not found
could someone please tell me my idiotic mistake.....
thanks,
Kitty
Kitty5
|
|
|
|
|
Well, in order to call a function (non-static) from a class, you first need to have an instance of your class. So, doing something like that (suppose MyClass is a class that defines funcA):
MyClass A;<br />
A.funcA();
You cannot simply do
MyClass::funcA();
|
|
|
|
|
:Cedric,
thanks very much for your advice.
I knew it was something simple that I was missing...
thanks!
Kitty
Kitty5
|
|
|
|
|
kitty5 wrote: ..
imageViewer::funcA();
To make such call possible. finA() must be static function of class imageViewer .
|
|
|
|
|
What is the maximum number of entry points a Win32 dll can export? if no limitation, would too many entry points affect performance or cause any other issues?
Thanks in advance!
Mike
|
|
|
|