|
I have dialog base MFC application
Dialog box contains only one control(radio button)
to change the text color of radio button i use oncltcolor(WM_CTLCOLOR)
BUT it's now working
i am using xp theme
is there any solution
|
|
|
|
|
MKC002 wrote: BUT it's now working
I assume that should read not working, in which case you need to give more detail, including a snippet of your code showing where it is going wrong.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I have dialog base application, dialog box contains one radio button. to set the text color of radio button
HBRUSH CtestDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
......
// TODO: Change any attributes of the DC here
if (pWnd->GetDlgCtrlID() == IDC_RADIO1)
{
pDC->SetTextColor (RGB(128,0,0)); // blue
}
.....
}
This code works fine and radio button color gets changed
but if i use xp theme in this project then text color of radio button does not set.
To set xp theme, i add one custom resource which contains
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly
xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity
processorArchitecture="x86"
version="5.1.0.0"
type="win32"
name="testdlg.exe"/>
<description>testdlg</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
publicKeyToken="6595b64144ccf1df"
language="*"
processorArchitecture="x86"/>
</dependentAssembly>
</dependency>
</assembly>
|
|
|
|
|
I think you may need some extra code in your override, as described here[^].
BTW please use <pre> tags round your code snippets to make them more readable.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I tried to use given example but the text color for radio button does not set. The background color of radio button is set.
I noticed if i create a dialog box application in visual studio 2008,add one radio button and set its text color in OnCtlColor then the text color does not set.
modified 3-Feb-12 1:38am.
|
|
|
|
|
Unfortunately I do not have an MFC capable version of VS so I cannot test it myself.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Use a sentence, positive and negative output,
For example :
1 -1 2 -2 3 -3 4 -4 5 -5 ...... 1000 -1000
Can use a formal parameters, Can't use loop
Example, pictures address: http://www.hotimg.com/direct/qECUqQ9.jpg
modified 1-Feb-12 11:01am.
|
|
|
|
|
Try rephrasing this... don't understand what you're trying to do. Also, is this your homework? Sounds like it...
|
|
|
|
|
What?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Cary Hill wrote: Use a sentence,...
1. Review the notes from the last three classroom lectures.
2. Read the last chapter of the class text book.
3. Use the method from both of those to solve the problem.
|
|
|
|
|
Bingo!
Sound Advice,
And Recyclable.
You could Add-
corrolary:
if still in the dark, do same for the previous chapters covered in the Class Text Book, An All Course Notes.
If after that you Still do not know how to ask a question, give up coding. You'll Never get there.
Cheers, Some people seem to think that all of us studied under the same curriculum, where given the same projects, so that we recognise their problem in a glance (we all solved the same question 20 years ago fterall), and that we are just petulent, by one of us not just posting our results to them.
I think it very doubtfull, that people who cannot formulate a problem at hand in a meaningful way, will ever become successful in software development.
Regards
Bram van Kampen
|
|
|
|
|
nice advice!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Once I have a long file with ascii text- long row of numbers. I used StrToD() to convert text to array of floating point numbers. I couldn't undrestand, why it works so slowly? Running it under debbugger, I realized what was the problem. This stupid function scanned the whole file, looking for null terminator! I think, there is no reason to scan long text string after set of chars, belonging to the first number has been obtained. Finally I had to write my own realisation of this function.
|
|
|
|
|
strtod (that is the 'standard' C++ strtod , I never heard about StrToD ) is not 'strange': it is a function satisfying its own requirements that are clearly explained, for instance here[^]. If it doesn't fit your needs, then, well, the right way is to write your own one (as you did).
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
You are right about lowercase: strtod(const char *nptr, char **endptr) returns floating point value and a pointer to the first char, that stops scanning. It means, that if I have for example such string "12.3 0.07" and give pointer to this string to strtod for eating, it will return me 12.3 and pointer to the next char after '3'. Thats all right, no objections. But name me one reason to scan THE WHOLE string??? Why do not stop scanning after four first chars? It is my non-humble opinion: it typical left-hand approach.
|
|
|
|
|
strtod uses strlen, internally - at least in VS2008.
but VS2010 fixes this, reportedly.
|
|
|
|
|
I use VS2005. I like it and this example of strange behavior is the only one what I actually met. No matter, build-in assembler lets me write compact and efficient procedures, when and if I have need in extra performance.
|
|
|
|
|
Looks like you found a bug.
|
|
|
|
|
I wouldn't say so: procedure works correctly. It is only inefficient realization, no more. I met a real bug in VS 6.0, but now it is of no use to speak about such ancient soft. Sometimes VS2005 asks me for confirmation, when I try to close prog, currently running under debugger, but it happens probably due to old age of my particulat exemplar.
|
|
|
|
|
Hi,
Can we write a C program to get a particular column values from an EXCEL file and use them as input for another file.
Eg: I want to retrieve all the values of the 3rd column of an excel file and then use that value for searching in another text file and finally replacing it with "xyz".
Thanks,
Faez
|
|
|
|
|
Yes, we can.
You may have a look at one of the many articles about Excel automation[^] here at CodeProject .
They are mainly focused on C++ language however.
In fact the bad news of your task are that you have to call COM from C (feasible but bit involuted).
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I read the article regarding Excel automation and COM but could not find anything about extraction of values from a particular column of an Excel file.
I am using Eclipse IDE and gotta write a C code to open an Excel file and extract its fourth and fifth column values.
Any kinda help would be appreciated.
Thanks,
Faez
|
|
|
|
|
|
The below link helped me..
http://www.libxl.com
But now am facing other different problem
http://www.codeproject.com/Messages/4144507/Re-Undefined-reference-error-while-using-libxl-lib.aspx
Thanks for help
|
|
|
|
|
Need help to understand this line of code
step = (struct MyStep*)BigStep
given,
typedef struct MyStep {...structure definition...};
const struct MyStep BigStep[]{...an array of MyStep...};
Thank you
|
|
|
|