Archive for July, 2008

The Look of Windows API Controls

You can tell that a standard push button in Windows XP looks different than a standard push button in WIndows 2000, and such one in Windows Vista.  On top of it, since XP Windows supports visual themes.  The interesting thing is that sometimes one and the same application keeps its Windows 2000 look, but sometimes standard push buttons follow the way of XP, or the Vista, depending on where you run it. 

In this article I explain why.

(more…)

Posted by Nik on July 31st, 2008 1 Comment

A New IDE for Delphi

I just came accross Visual Studio Shell.  This is a very interesting framework for creating development IDEs.

All versions of Borland Delphi starting with 2005, a.k.a 8, feature a really bad IDE.  Really bad.  Slow and buggy.  I already ranted about the fact that Borland decided to catch up with the interface and layout of Visual Studio, than simply evolve the features of their already good IDE.  Since Delphi 7 Borland gave us all a good proof that they cannot create a decent IDE anymore.  Both Visual Studio and Eclipse surpass it by miles.

Well, here is my idea.  Embarcadero, why don’t you just build up your IDE around Visual Studio Shell?

Posted by Nik on July 29th, 2008 1 Comment

“Sad But True”

“Hey I’m your life
I’m the one who takes you there
Hey I’m your life
I’m the one who cares
They, They betray
I’m your only true friend now
They, They’ll betray
I’m forever there”

Metallica’s gig in Sofia, 25th August 2008.  Nine years later, Metallica did a great show again.  This time, the stage was a bit better, with more lights and effects.  The sound was very well done again.  These guys are getting older, but they still have it.  They played old-school stuff to the great joy of about 50,000 fans of all ages.

In constract to the concert in Plovdiv back in 1998, this time the band was well prepared.  “Its great to see you again” this time was well in place, and James Hetfield knew well that was their second visit after nine years.

The show was great. Thank you.

Posted by Nik on July 28th, 2008 No Comments

25 Reasons to Convert to Linux - Yeah, Right…

It’s time to get dirty.  This subject has been discussed over and over again, and hardly anything new can be said at all.  But I am merely human.  When I stumbled upon this rant, and simply couldn’t resist.  I think I do it because I have acquaintances who sometimes would fall into fallacy, either misguided by some ill-educated and poorly-experienced “smart” pal, or simply got their minds completely screwed up.

(more…)

Posted by Nik on July 24th, 2008 4 Comments

Reading VARIANT from Stream - NET’s way

In a recent post I described how a VARIANT variable can be serialized into a binary stream.  That really did the trick back then, and the team lived happily…  Ever after?  Well, no.  A day came when we had to provide a NET-based interface to our application server.

I will not go into details now about the actual design and implementation of the system.  I will only describe an algorithm in NET Framework, which deserializes a binary stream into an appropriate type.

(more…)

Posted by Nik on July 21st, 2008 No Comments

Enjoy the Ride

There are two kinds of music - good, and not good. Good music is created more seldom than often just to pass it by.  Here is a candidate for the best song of 2008.

Actually, Morcheeba’s latest album, Dive Deep, is worth listening to as a whole.  I am not a distinguished fan of the band, to put it mildly, but I can tell the good when I hear it.

Posted by Nik on July 21st, 2008 2 Comments

Reading VARIANT from Stream - Delphi’s Way

In this post I described an efficient way to write a VARIANT to a stream in a binary format.  Doing so will be of no use whatsoever if you cannot bring back a fully-fledged VARIANT from the stream.

Reading a VARIANT is analoguous to writing it, but there is an interesting points.  You have to know how to set properly the type of the output variant.  If the VARIANT is a single value, the right way to do it is to use VarCast function.  If the VARIANT is an array, however, you should create it by using VarArrayCreate.  Only after you set the type, you can assign the data. 

Here comes the code:

(more…)

Posted by Nik on July 10th, 2008 11 Comments

Writing a Variant to Stream

Recently I came to a case when I had to write an OLE Automation VARIANT type variable to a stream.  And, of course, read it back as a fully-fledged VARIANT.  The solution had to fully support arrays as well.  A VARIANT can be a byte, an integer, a floating point number, a date.  A VARIANT can be a string.  A VARIANT can be a safe array of VARIANTs, which can in turn be safe arrays, and so on.  Start to feel the catch?

(more…)

Posted by Nik on July 9th, 2008 No Comments