Hi All,
I found some references on the MS Win32api pages but they seemed to be oriented to the MFC and I was not able to figure how to untangle them to use in Pelles C - which I have found to be wonderfully CLEAN.
Any help is much appreciated. :)
Thanks,
rp108
NOTE: I am developing a Dialog-based app. What I mean by "Text Box" is using the drag and drop Pelles feature for text display, just as a label, and "edit Box" I mean where the user enters text.
Have a look at ctlcolor.zip in the Windows Samples/Windows Programming section of the Pelle's C Samples page at
http://www.smorgasbordet.com/pellesc/sourcecode.htm
Look here (http://msdn.microsoft.com/en-us/library/windows/desktop/bb761691(v=vs.85).aspx)
Thanks Gentlemen,
In the label-button project, there is a type conditional statement that I don't understand. It appears to be a compile time conditional but I do not understand WHAT is being tested.
#if 0
blah blah blah
#endif
I don't understand WHAT is being tested for: 0
Other than that, I will pare-down the example to only what I need (set color of text and background in a text or edit box), and see if I can get it running.
Can you tell me about the #if above, please?
Thanks,
rp108
#if 0
..... //Test code that will never be compiled
#endif
It's a common practice to insert test code (or other optional code) that can be compiled only by manually enabling it changing the test condition to #if 1
#if 1
..... //Test code that will be compiled
#endif
It is more convenient that using // or /* ... */ (that can create problems with other comment, line extensions using backslash, etc).
PellesC IDE provides in context menu->surround by the option to surround selected lines with an #if0 ... #endif construct (context menu in source editor is triggered by right clicking).
Thanks Frankie.