Pelles C forum

C language => User contributions => Topic started by: frankie on February 02, 2015, 12:13:41 AM

Title: PellesC port of Mctrl by Martin Mitas (quick & dirty)
Post by: frankie on February 02, 2015, 12:13:41 AM
This is a quick and dirty port of controls library from Martin Mitas.
It is a nice lib, but a little bit bloated for my preferences.
I already cut away something, and when I'll have time I'll change something else...  ;)
As usual because the size is large I've loaded it in two pieces.

P.S. Use 7Zip to extract files!
Title: Re: PellesC port of Mctrl by Martin Mitas (quick & dirty)
Post by: frankie on February 02, 2015, 12:14:16 AM
Second chunk... Use 7Zip to extract!

P.S. Here you'll find also a newer version of Uxteme.h than that shipped with PellesC V8.
Title: Re: PellesC port of Mctrl by Martin Mitas (quick & dirty)
Post by: czerny on February 02, 2015, 08:39:23 AM
I can not open your zips. 7zip doesn't like them and the XP buildin unzipper is only able to extract view of them.
Title: Re: PellesC port of Mctrl by Martin Mitas (quick & dirty)
Post by: frankie on February 02, 2015, 11:05:16 AM
I used a different tool, that probably is not compatible.  >:(
Now I have reloaded files using the more standard and easily available 7Zip.
I'll modify also teh SQLite64 that maybe have the same problem even if no comments were posted. About this I would add a word about contributions: who spend time to make something available to the others get no reward, so it would be polite at least to thank for that posting a replay. Even negative comments are welcome because could help to make a better job.
The silence is discomforting...
Title: Re: PellesC port of Mctrl by Martin Mitas (quick & dirty)
Post by: czerny on February 02, 2015, 12:05:54 PM
I have made a quick test (XP SP 3):

Everything compiles ok (could not test 64-bit code).

My virus scanner says that 'ex_html' is affected by 'Suspicious.Cloud.5'.
The expand button in ex_expand is not visible.
ex_menubar looks strange.
Title: Re: PellesC port of Mctrl by Martin Mitas (quick & dirty)
Post by: frankie on February 02, 2015, 12:45:32 PM
I think this is an XP problem with themes.
Below you can see as they appears on 7.
Anyway the library is a little bit messed up, I just made it compile under PellesC :(
I'll fix it someway when I'll have time ...

P.S. My kaspersky says no viruses here...
Title: Re: PellesC port of Mctrl by Martin Mitas (quick & dirty)
Post by: czerny on February 02, 2015, 03:25:58 PM
I have usually klassic style switched on. If I switch to XP-style, the expand example is ok, I don't know if the control is designed to work in klassic style too.
The second test example is broken in XP-style too.
Title: Re: PellesC port of Mctrl by Martin Mitas (quick & dirty)
Post by: frankie on February 02, 2015, 04:12:02 PM
Try adding a manifest resource.
Title: Re: PellesC port of Mctrl by Martin Mitas (quick & dirty)
Post by: czerny on February 02, 2015, 05:45:58 PM
There are manifests already included.

I am at home now and tried to compile this with Pelles 7 RC 4 and win2k.

GdiAlphaBlend is not found!
Should be in wingdi.h but it isn't.
It is not in the Pelles C 8 header files, too!
I wonder, why the project compiled with Pelles C 8.

Another problem. I am not sure if this was ok with XP. In ex-treelist2 the background transparency with the yellow icons is not handled.
Title: Re: PellesC port of Mctrl by Martin Mitas (quick & dirty)
Post by: Bitbeisser on February 02, 2015, 07:01:42 PM
I can not open your zips. 7zip doesn't like them and the XP buildin unzipper is only able to extract view of them.
7-Zip 9.38 works just fine for me...

Windows build-in ZIP extractor doesn't work for split archive files to begin with, regardless of which Windows version you are using...

Ralf
Title: Re: PellesC port of Mctrl by Martin Mitas (quick & dirty)
Post by: czerny on February 03, 2015, 08:05:30 AM
One of the errors in MCTRL are icons with not working trancparency!
I am trying to collect informations about image trancparency in the windows environment.

There is the rule, that the color of the upper left pixel is the trancparency color.
I have also found the rule, that the magenta parts of the image are transparent.
Last but not least are there 32-bit icons/images with alpha channel.

In Pelles C's icon editor there is a special color named screen color and in 16 color mode a special pixel with a cross in it (not clear, how to set such a pixel).

Can someone bring some light on this, please? Which OS supports which methode?
Title: Re: PellesC port of Mctrl by Martin Mitas (quick & dirty)
Post by: frankie on February 03, 2015, 12:07:52 PM
There are manifests already included.

I am at home now and tried to compile this with Pelles 7 RC 4 and win2k.

GdiAlphaBlend is not found!
Should be in wingdi.h but it isn't.
It is not in the Pelles C 8 header files, too!
I wonder, why the project compiled with Pelles C 8.

Another problem. I am not sure if this was ok with XP. In ex-treelist2 the background transparency with the yellow icons is not handled.
In version 8 Pelle updated the headers, moreover some definitions depends on WINNT version.
Mctrl compiles some parts only if os version is >=600, many thing in Mctrl were not available at time of Win2k...
Title: Re: PellesC port of Mctrl by Martin Mitas (quick & dirty)
Post by: czerny on February 03, 2015, 02:29:11 PM
In version 8 Pelle updated the headers, moreover some definitions depends on WINNT version.
Mctrl compiles some parts only if os version is >=600, many thing in Mctrl were not available at time of Win2k...
'many things'? What do you mean exactly? AlphaBlend etc. is very old (win98 I think). And background transparency of icons is not a windows 8 feature!
Title: Re: PellesC port of Mctrl by Martin Mitas (quick & dirty)
Post by: frankie on February 03, 2015, 02:59:18 PM
'many things'? What do you mean exactly? AlphaBlend etc. is very old (win98 I think). And background transparency of icons is not a windows 8 feature!
Many things related to themes, that were optional in XP
Title: Re: PellesC port of Mctrl by Martin Mitas (quick & dirty)
Post by: czerny on February 03, 2015, 03:23:58 PM
Which of the problems, we have found so far, are related to themes?
Title: Re: PellesC port of Mctrl by Martin Mitas (quick & dirty)
Post by: frankie on February 03, 2015, 05:09:59 PM
Practically all.
Under Win7 everything works.
Title: Re: PellesC port of Mctrl by Martin Mitas (quick & dirty)
Post by: DMac on February 03, 2015, 06:12:58 PM
In Pelles C's icon editor there is a special color named screen color and in 16 color mode a special pixel with a cross in it (not clear, how to set such a pixel).

I figured this one out by trial and error.
Scenario 1. You want to create a 16 x 16 True color + alpha channel icon from scratch:
You now have an empty icon filled with the special pixel.

Scenario 2.  You want to add the alpha channel transparency to an existing icon:
After replacing the original background with the alpha channel special pixel you can reselect and then delete the original icon format if you wish.
Title: Re: PellesC port of Mctrl by Martin Mitas (quick & dirty)
Post by: czerny on February 03, 2015, 06:30:45 PM
Practically all.
Under Win7 everything works.
That doesn't mean that the problems are related to themes.

Btw.Here (http://mctrl.sourceforge.net/about.php (http://mctrl.sourceforge.net/about.php)) you can read: Supported systems: Windows 2000 and newer (both 32bit and 64bit).
Title: Re: PellesC port of Mctrl by Martin Mitas (quick & dirty)
Post by: rko on April 27, 2015, 03:19:18 PM
oh boy, this stuff is neat.
any chance you get the new version running (bug fixes and features)?