Tag: Delphi

Notes (week 48)

December 1st, 2007

I’ve been working this week with the new version of SpTBX library. It’s a set of controls that I use in CE (menu,toolbars,buttons etc.). Thanks to Robert Lee’s great work, the new version now supports skinning. I had to do quite a lot modifications to CE to make the new version work correctly but it’s mostly up and running now.

There’s few cool new themes available but some old themes are missing, like Aluminum.
ce_leopard_themece_office2007_silverce_office2007_black

I wrote a simple skin editor that makes it easier to create your own skins.
SpSkin Editor

SpSkin Editor, source + exe (852KB)
http://cubicreality.pp.fi/files/misc/SpSkinEditor.zip

I’m still not sure when the next release date is. I’ve done some work on the options dialog and have pretty good idea on how it will look and feel.

Using version control system

July 13th, 2007

I finally took version control system in use for CubicExplorer. I chose SVN. Currently I’m using local repository but will move it to a server once I have the time and energy to build a new case for the hardware. I’ve been using this thing for a week now and it’s really nice. Currently CE has over 100 files in it’s source so it started to be a bit hard to handle. The biggest thing I like it is the log. Now I can write note on every bug fix or other change, which means there will be change logs for releases :D

I used to use a simple folder tree to handle different versions. Every once in a while I took copy of CE’s source folder and started to work in that new folder. I also had all the files in one folder so it was quite a mess. I decided to change the folder structure a bit so that source files and .dcu files are in their own sub-folders. It’s much cleaner now.

I’m using TortoiseSVN to do everything. It supports local repositories so there’s no need to use svnserve or Apache. Also I’m using a simple add-in for Delphi that adds menu with common TortoiseSVN commands.

TortoiseSVN
http://tortoisesvn.tigris.org/

Delphi add-in for TortoiseSVN
http://delphiaddinfortortoisesvn.tigris.org/

Hand Point (link) cursor in Delphi

June 21st, 2007

So I’m writing some code and need to use the hand point (link) cursor. However I noticed that Delphi is using different looking cursor than Windows. After I looked around in the Forms unit to see how TScreen handles cursors I wrote this fix which seems to work fine.

procedure TForm1.FormCreate(Sender: TObject);
begin
Screen.Cursors[crHandPoint]:= LoadCursor(0, IDC_HAND);
end;

Delphi app preventing Windows to shutdown?

March 15th, 2007

Whew! After about 6 hours of constant debugging and testing in VMWare I finally managed to find the cause for a problem that prevented Windows from shutting down if my Application was running. The solution is very simple, in my case at least. Basically I had one component that used AllocateHWND to create a handle. In my WindowProc I didn’t have a call to the DefWindowProc, so the WM_QUERYENDSESSION didn’t get handled properly.

Continue reading »