I had never been able to duplicate the problem in the past but with a new installation of XP on my XP dev box, the app would not start. Problem was simple, on some versions of Windows, if you have a manifest file, you must also include the common control library. Added the line of code and BINGO, it seems to be working fine.
Excelent little app steve !
No src ?
Guga,
I will get around to posting it, its very simple API code but tolerate me at the moment, I am up to my eyeballs in work cleaning up an ancient mess my young brother left behind 25 years ago.
Steve,
Quote from: hutch-- on August 16, 2014, 01:35:06 PM
I will get around to posting it, its very simple API code but tolerate me at the moment, I am up to my eyeballs in work cleaning up an ancient mess my young brother left behind 25 years ago.
Good luck. Nice application. :t
Gunther
Voila, the SAUCE. :P
Well done. :t
Gunther
Many thanks steve :t
May i use it in RosAsm ? I plan to modify a bit to allow showing the colors on a RGB macro form. Simple tools like this are excellent for usage on a Assembly Platform. No only in RosAsm, but in Radasm too will be usefull, i think.
Hi Guga,
Its simple API code so you are more than welcome to write your own version of it in RosAsm. When you get it done, post it so we can see what you have done with it.
Hi Gustavo,
nice idea. Go forward, I'm curious.
Gunther
Tks guys. I´m quite finishing it.
I need some examples of RGB macro for PowerBasic, for Masm, and for C.(I presume when you meant "Basic", you were referring to PB, right, Steve ? )
I found some for C and Masm, but i´m not sure about the syntax. Regarding to PowerBasic, i didnt found a valid RGB macro, only RGBGet Values (Retrieving red, green or blue from a RGB)
Here goes the tests i make.
There are a couple of issues i coulnd´t fix. Example i wanted to change the font and color of the controls like buttons and the static controls to make them look the same as i did for the RTF. But so far, i idn´suceed to make the font works equal.
Also, i´ll probably add an icon of a target at the lower left corner, and try to make the window vanishes when the brush is hovering near by it.
On the zip file i uploaded the exe (with the source code embeded) and also the source code separately for those who don´t have RosAsm installed.
If the font be reduced satisfatorily i´ll try to add a colorwheel on it too and perhaps at the bottom i´ll ad the corresponant gray value/color related o the picked color.
Btw. I couldn´t find the definition of the macro RGB for PowerBasic. Steve, how is the syntax for PB ? I mean, how the macro RGB is written ?
(http://i57.tinypic.com/eziofc.jpg)
Hi Guga,
Compliments, it works fine. Just a suggestion, you have created the app using CreateWindowEx() instead of a resource dialog so you need to set the font for all of the controls so that they display correctly, on my Win7 64 the fonts in the controls are too large and look a but clumsy, if you use,
SendMessage hCtrl,WM_SETFONT etc ....
You can set either a system defined font or with a bit more work a true type font to get the correct appearance.
Thanks Hutch for share yor code :t
Hi Gustavo,
works fine here. Thank you.
Gunther
Hi hutch and guga,
They both work fine here ( win 8.1 64bit )
Hi Steve, Thanks...i`ll give a try on the fonts.
One question, it is better setting them with CreateFontIndirect ?
I tried before with CreateFont, but it seems to not work :(
Ok, i found out why it didn´t worked before with CreateFont
I did the same thing as in RTF font structure. The probelm is that when seting fonts to a RTF control, i can delete the font object on the same routne, i mean, i don´t need to deletet it after WM_CLOSe is clicked.
But, for other controls, i can´t use deleteobject on the same routine. The fonts for the controls must be deleted when the user closes the App.
I´ll try to make a routine for common controls that can set the color, font, and background of the controls on the sam way s i did for the RTF, with the difference that the user must delete the object once his app is closed.
Ill give a try.
And probably my function SetRTFFont works for both EditControls and RTF controls as well.I´ll test SetRTFFont on a regular editcontrol to see if it works the same way as in RTF
i sometimes use GetObject or SystemParametersInfo(NONCLIENTMETRICS) to fill a LOGFONT structure
then modify the structure, as desired, and call CreateFont :P
Hi Marinus,
Quote from: Siekmanski on September 08, 2014, 06:37:21 AM
Hi hutch and guga,
They both work fine here ( win 8.1 64bit )
Are you happy with Windows 8.1? Is it worth to upgrading?
Gunther