|
Thanks David.
Will try and get back to you whatever the result is.
Regards
Mady
|
|
|
|
|
Mady1380 - You have to intercept the method called when the color of the controls is determined - OnCtlColor().
OnCtlColor is called each time a control is being painted/repainted. Examine nCtlColor to see what type of control is being painted.
The following code makes the background of an edit control either yellow when it has the focus, or normal white when it does not have the focus. It also forces the text color to black. Add this method to your dialog class.
<br />
BEGIN_MESSAGE_MAP(CMyDlg, CDialog)<br />
ON_WM_CTLCOLOR()<br />
END_MESSAGE_MAP()<br />
<br />
...<br />
<br />
<br />
HBRUSH CMyDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) <br />
{<br />
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);<br />
<br />
if (CTLCOLOR_EDIT == nCtlColor)<br />
{<br />
if (GetFocus() == pWnd)<br />
{<br />
pDC->SetTextColor(RGB(0, 0, 0));<br />
pDC->SetBkColor(RGB(255, 255, 0)); <br />
pDC->SetBkMode(OPAQUE);<br />
return CreateSolidBrush(RGB(255,255,0));
}<br />
else<br />
{<br />
pDC->SetTextColor(RGB(0, 0, 0));<br />
pDC->SetBkColor(RGB(255, 255, 255)); <br />
pDC->SetBkMode(OPAQUE);<br />
return CreateSolidBrush(RGB(255, 255, 255));
}<br />
}<br />
return hbr;<br />
}<br />
<br />
Experiment to get a better feeling by changing background colors, text colors, types of controls (EDIT, STATIC, etc.).
Hope this helps.
Gary
|
|
|
|
|
In my program of creating an editor i need to display calltips that is while debugging if keep the cursor over the variable it should show u the vale of the variable...
but i don't know how to create a calltip itself in scintilla..
even then i used SCI_CATTTIPSHOW,SCI_CALLTIPACTIVE AND I'M not getting any calltip displayed...
can anyone suggest me the basic procedures of how to get a calltip in scintilla based editor...
|
|
|
|
|
You only need to ask your question once. Asking the same thing again because you are not patient enough will get you ignored.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
leckey wrote: You only need to ask your question once. Asking the same thing again because you are not patient enough will get you ignored.
Everytime I see someone doing that, doing a "PLZ HELP URGENT," Cross-Posting, or requesting "codes" I check the profile. And they all have one thing in common:
Location India
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
Justin Perez wrote: And they all have one thing in common:
Location India
I concur. I realize there are exceptions to the rule, but for the most part, ...
"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
|
|
|
|
|
Happy Birthday, leckey!
|
|
|
|
|
Can any1 tell me how do i detect start and close of FireFox browser?
Does it send any message or generate any event at time of start up and closing?
Please tell me kinda solution which I can implement in MFC.
Thanks.
|
|
|
|
|
::WaitForSingleObject() is of any help ?
|
|
|
|
|
s_v_patel wrote: Does it send any message...at time of start up and closing?
WM_CREATE comes to mind. What exactly are you trying to accomplish?
"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 want to retrieve the selected text from RichEditView Window and if image or any other thing is selected it should return empty string.
How to do the same. Any help will be appreciated.
Thanks.
|
|
|
|
|
See CRichEditCtrl::GetSelText and CRichEditCtrl::GetSelectionType .
Prasad
MS MVP - VC++
|
|
|
|
|
What kind of error is "Event index out of range"?
picm
|
|
|
|
|
when does it occur ?
and how does it show off ?
|
|
|
|
|
only in Release configuration end randomly.
In a message box.
picm
|
|
|
|
|
you don't provide much info, so it's quite hard to help.
btw, you seem to have a problem with your release compilation.
you should consider read this article[^]...
|
|
|
|
|
It isn't simple to provide more information. The message is showed randomly during the program execution . What kind of bug can generate the error?
thank you
picm
|
|
|
|
|
Can you pause the execution of the program when the message is displayed and then look at the call stack to understand where in your code happens the crash, and why?
Russell
|
|
|
|
|
The kind you get when your code does something wrong.
"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,
i will make my question more clear, i want to read a line of characters from a text file. The problem is i don want to read the ""(double quotes ) which is in the line.
line is like this
"string","12","23","32"...
how to access this values without " and comma...
thanks in advance
||SnAkeBed||
|
|
|
|
|
is philiptabraham another account you're behind ?
|
|
|
|
|
Can you not be bothered to look at the question IMMEDIATELY BEFORE YOURS?
Not to mention the answer was posted before your question also...
I'd understand if it was paaaages back, but one line?
It wouldn't be a class assignment you both had.....?
Your's crankily,
Iain
ps. Youth of today... sheesh... I remember when all this was vt100s...
|
|
|
|
|
swaroopkb wrote: , i want to read a line of characters from a text file. The problem is i don want to read the ""(double quotes ) which is in the line.
CString::Replace! and CString::Tokenize
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief
|
|
|
|
|
WOW! From India, interested in neural networks and you can't parse a simple line of text?
Try this:
1) Take programming course, or
2) Read a programming book, then
2) have an AHA! moment.
Good luck.
fscanf, sscanf, while 0 != x.read(), .....
|
|
|
|
|
can you tell me how to read and seperate the data from a .csv file.
The Content in my csv file is something like:
"Amount","29900.09","233399",""
can anybody tell me how to get the seperated data into an array
|
|
|
|