Blog Navigator Professional posts again

Security versus compatibility and functionality. Is removing features a new course for Microsoft?

Originally posted on JoeUser.com

Last week it has been brought to my attention that our Blog Navigator can no longer post web articles. Alas, this was only a symptom of a much worse disease, but first things first…

This month in a noble effort of making the Windows platform more secure for us and our (perhaps future) kids ;) Microsoft rolled out a new set of updates, among which is this one innocently called MS05-013 and located in Microsoft Knowledge Base under a mysterious KB891781.

You will find more about the update and the horror it caused among the programmers using the control affected by the update on usenet, posts as this and this are only small sample of the damage. It seems that MS broke quite a few programs while making us more safe.

The effect, saying it bluntly is: IDHTMLEdit has been made useless and Blog Navigator fallen prey to that change.

Since IDHTMLEdit is simply a wrapper around MSHTML editor, I’ve examined quite a few approaches and some existing libraries, to fix the issue as fast and with as little modifications to the existing code as possible. After a day of hunting around and testing the existing approaches I’ve decided that if I want to retain the control over my code and keep it at a reasonable size, I need to do it myself.

Below is my simplistic (and working) approach to migrating from DHTML Editing Component to MSHTML editor (for Delphi programmers).

  1. I use a TEmbeddedWB as the web browser control wrapper as it offers quite a bit additional functionality. I’m assuming you use that instead of the TWebbrowser as well. If you’re not, it’a not a big problem to extract the functionalty you will need here.
  2. In the DhtmlEdit you operate on the DOM structure and that’s the interface the control does not allow you to access any loger and the change thaat makes it useless. The TWebBrowser offers a Document IDispatch which you can cast on IHTMLDocument2. This is exactly the structure you were working on before.
  3. Now the browser control itself does not offer the ExecCommand(…) functionality. but not all is lost. when you get to the IHTMLDocument2 interface as described before, you can pretty much do anythng you were doing before by calling its execCommand.
  4. You can also pull ann the formatting data from it by querrying it with its: queryCommandEnabled, execCommand, queryCommandIndeterm, queryCommandState, queryCommandSupported, queryCommandText and queryCommandValue methods.
  5. Now the problem is that IDHTMLEdit used numeric values while the Document requires you to use strings. The simplest method is to use a translating table which is what I did:
type
  TMSHtmlCommandTranslation = array [DECMD_BOLD .. DECMD_PROPERTIES] of WideString;
const
  MSHtmlCommandTranslation : TMSHtmlCommandTranslation = (
  'Bold',               //DECMD_BOLD = $00001388;
  '',                   //
  'Copy',               //DECMD_COPY = $0000138A;
  'Cut',                //DECMD_CUT = $0000138B;
  'Delete',             //DDECMD_DELETE = $0000138C;
  '',                   //DDECMD_DELETECELLS = $0000138D;
  '',                   //DDECMD_DELETECOLS = $0000138E;
  '',                   //DDECMD_DELETEROWS = $0000138F;
  'Find',               //DDECMD_FINDTEXT = $00001390;
  'FontName',           //DDECMD_FONT = $00001391;
  '',                   //DDECMD_GETBACKCOLOR = $00001392;
  '',                   //DDECMD_GETBLOCKFMT = $00001393;
  '',                   //DDECMD_GETBLOCKFMTNAMES = $00001394;
  '',                   //DDECMD_GETFONTNAME = $00001395;
  'FontSize',           //DDECMD_GETFONTSIZE = $00001396;
  '',                   //DDECMD_GETFORECOLOR = $00001397;
  'CreateLink',         //DDECMD_HYPERLINK = $00001398;
  'InsertImage',        //DDECMD_IMAGE = $00001399;
  'Indent',             //DDECMD_INDENT = $0000139A;
  '',                   //DDECMD_INSERTCELL = $0000139B;
  '',                   //DDECMD_INSERTCOL = $0000139C;
  '',                   //DDECMD_INSERTROW = $0000139D;
  '',                   //DDECMD_INSERTTABLE = $0000139E;
  'Italic',             //DDECMD_ITALIC = $0000139F;
  'JustifyCenter',      //DDECMD_JUSTIFYCENTER = $000013A0;
  'JustifyLeft',        //DDECMD_JUSTIFYLEFT = $000013A1;
  'JustifyRight',       //DDECMD_JUSTIFYRIGHT = $000013A2;
  '',                   //DDECMD_LOCK_ELEMENT = $000013A3;
  '',                   //DDECMD_MAKE_ABSOLUTE = $000013A4;
  '',                   //DDECMD_MERGECELLS = $000013A5;
  'InsertOrderedList', //DDECMD_ORDERLIST = $000013A6;
  'Outdent',            //DDECMD_OUTDENT = $000013A7;
  'Paste',              //DDECMD_PASTE = $000013A8;
  'Redo',               //DDECMD_REDO = $000013A9;
  '',                   //DDECMD_REMOVEFORMAT = $000013AA;
  'SelectAll',          //DDECMD_SELECTALL = $000013AB;
  '',                   //DDECMD_SEND_BACKWARD = $000013AC;
  '',                   //DDECMD_BRING_FORWARD = $000013AD;
  '',                   //DDECMD_SEND_BELOW_TEXT = $000013AE;
  '',                   //DDECMD_BRING_ABOVE_TEXT = $000013AF;
  '',                   //DDECMD_SEND_TO_BACK = $000013B0;
  '',                   //DDECMD_BRING_TO_FRONT = $000013B1;
  '',                   //DDECMD_SETBACKCOLOR = $000013B2;
  '',                   //DDECMD_SETBLOCKFMT = $000013B3;
  'FontName',           //DDECMD_SETFONTNAME = $000013B4;
  'FontSize',           //DDECMD_SETFONTSIZE = $000013B5;
  'ForeColor',          //DDECMD_SETFORECOLOR = $000013B6;
  '',                   //DDECMD_SPLITCELL = $000013B7;
  'Underline',          //DDECMD_UNDERLINE = $000013B8;
  'Undo',               //DDECMD_UNDO = $000013B9;
  'Unlink',             //DDECMD_UNLINK = $000013BA;
  'InsertUnorderedList',//DDECMD_UNORDERLIST = $000013BB;
  '');                  //DECMD_PROPERTIES = $000013BC;

I store the command values as the controls Tags so now instead of calling:

DHTMLEdit.ExecCommand(TControl(Sender).Tag,OLECMDEXECOPT_DODEFAULT);

I simply call:

FDocument.execCommand(MSHtmlCommandTranslation[TControl(Sender).Tag],True,variant)

where the FDocument is the IHTMLDocument2 DOM document I extracted from the TWebBrowser for the sake of not having to cast it each time I use it. and instead of:

DHTMLEdit.QueryStatus(TControl(Sender).Tag);

I can now use:

 FDocument.queryCommandValue(MSHtmlCommandTranslation[TControl(Sender).Tag]);
 FDocument.queryCommandEnabled(MSHtmlCommandTranslation[TControl(Sender).Tag]);

this allowed me to migrate away from DHTML Editing Component within one day after shunning all other options).

One thing that was pretty indispensible for DHTML Editing Component was that it called me back evary time a blok formatting was changed, it had this useful OnDisplayChanged event which was summoned every time the UI needed updating. That’s where TEmbeddedWB comes handy it implements a

function UpdateUI: HRESULT; stdcall;

which than triggers the OnUpdateUI event, which for our needs does exactly the save what the OnDisplayChanged event did. so you can simply call your previous OnDisplayChanged event with the numerical querries remapped to strings and… with minimal effort you have your control fully migrated to the MSHTML editor.

So… this post is the first post made with the updated Blog Navigator with its poat editong brought back to normal functionality.

Posted in Blog Navigator, Delphi, Software Development, Web applications
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...
| 9 Comments »

How big is that thing anyway?

Making sure everything in place, just where it should be.

Originally posted on Wincustomize.com

Implementing FireFox support in SkinStudio and having to calculate everyting carefully in the process I got pretty tired of being unable to tell how wide something is or having to run a separate app for it. Is there one actually? I guess there is… perhaps even skinnable. But being where I am – I wanted it integrated and easy to use for myself and for every skiner. available instantaneously. Seamlessly integrated into Skinstudio. (This will be available in the next SkinStudio release),

So here’s my attempt at counting pixels.

You probably already used Skinstudio zooming tool, and you’ve noticed that apart from magnifying the screen it also tells you the color of a pixel under the cursor.

now if you press the Ctrl key it will start to measure whatever you have highlighted

As you can see – additionally to the RGB values, now you also have the “Width” and “Height” values. Now, while still having the Ctrl key pressed, let me move the cursor down and right a bit…

as you can see, the Width and Height values show the difference between what was the mouse position when you pressed the “Ctrl” key and what it is now. The size is measured as long as you hol the “Ctrl:” button pressed.

Posted in IconDeveloper, SkinStudio
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...
| Leave a Comment »

New WindowBlinds window frame possiblities

How WindowBlinds 4.5 made the window frames even more frolicsome.

Originally posted on Wincustomize.com

WindowBlinds 4.5 introduced two new cool tricks for window frames –

  • IE/Explorer special shell frames, and
  • random frames.

The two features are mutually exclusive, meaning that if you use random frames you cannot specify the special frames for the shell windows.
First of all – both features are only available in the UIS2 skins (Advanced WindowBlinds skinning format).

Now let me explain how you can use/access the features in SkinStudio and what exactly do they do:

1) Shell windows

Those are the system windows that you browse/explore your computer and the Internet with. SkinStudio added a special section for referencing them placed in the tree in this node: “Window Borders”->”Frames for Shell Windows”. The section defines two attributes:

  • “Explorer Active Windows”
  • “Explorer Inactive Windows”

The names are pretty self explanatory. The attributes define the indexes of the states used for the active and inactive shell windows. But what you may find confusing is that the index is zero based – meaning that the first state in your frame set has an index of 0. If you define the attributes WindowBlinds will choose those states for shell windows instead of it’s regular choice being – the first state for active and the last one for inactive windows.

What you need to do is simply make your window frame images contain two more states for the shell windows so instead of 2 or 3 (if you define the disabled state) images you would include normally – you put 4 or 5 states in there. Of course the states layout setup cannot violate the 3 canonic WindowBlinds rules which are:

  • first state is for the regular active window.
  • last state is for the inactive window (or the second from the end if disabled state is used).
  • and if you have the “Disabled frame state” enabled in the skin, that is you have this attribute:
    Section: “Window Borders”-> Attribute: “Miscellaneous options”->”Image State – Disabled Frame”
    set to “Enabled”, then the “disabled state” must be added as the last state in the strip. By the way – if you never realized this before – disabled frames are used when a window is showing a modal dialog that makes this window inaccessible for the user. You can find when a window is disabled if Windows will *ding* at you when you try to click such disabled window.

So this forces us to use a following states layout:

  1. Active window
  2. Active shell window (this is the state that you need to point at in the “Explorer Active Windows” attribute – in this case you would need to set it to “1” since the index is zero based).
  3. Inactive shell window (this is the state that you need to point at in the “Explorer Inactive Windows” attribute – in this case you would need to set it to “1” since the index is zero based).
  4. Inactive window state
  5. Disabled window state (if the disabled state visualization is enabled).

That’s all that it is to it. Of course you need to equip all the window edge images with the equally same states number as that’s a fundamental WindowBlinds requirement.

2) Random frames

Random frames is a feature which I personally find much cooler than the shell windows skinning. This feature actually changes the windows states layout established so long ago. You enable the feature by flipping the:

Section: “Window Borders”-> Attribute: “Miscellaneous options”->”Random frame selection”

from “Disable random borders” to “Enable random borders”.

By doing so you allow WindowBlinds to randomize the available frames looks for newly created windows. If this option is enabled, the skin must provide more than one pair of active/inactive states for windows borders. The borders must be organized in sets of pairs of active and inactive states following each other like that:

  1. active state 1
  2. inactive state 1
  3. active state 2
  4. inactive state 2
  5. active state X
  6. inactive state X

Also like previously – exactly the same number of states needs to be supplied for all edges of the window frames. Also there is another limitation here – all states must be of the same shape, which means that if you put any pink area on the frame in the active1 state – it needs to be in the exact same shape in all the active states as well and unless you enabled Dynamic frames (Section: “Window Borders”-> Attribute: “Miscellaneous options”->”Dynamic Frame Image Shape”) – it needs to be in all of the disabled states too.

WindowBlinds will choose among the pairs on a random basis during creation of each window/app.

Now if you define say… 20 framesets – the user will have a few hours of fun and surprises with the skin. I can see how this is a big job to define that number of frames, but isn’t a skin an enormous effort already? Now if you add just a little bit to it making it exceptional – don’t we all agree that it’s what lies in the heart of customization? I can see how this could be a true favorite feature (on top of the translucent start menus) in the coming months

Posted in SkinStudio, WindowBlinds
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...
| 9 Comments »

60th anniversary of the liberation of Auschwitz

Originally posted on JoeUser.com

preserving the past to protect the future

Today is the 60th anniversary of liberation of the Auschwitz concentation camp. Probably the last round anniversary with so many witnesses still alive. Auschwitz was a German Nazzis’ camp of mass murder which took the death toll of about 1.5 million people. Most of them were Jews from Poland and surrounding countries, Poles, Gypsies and homosexuals and Soviet POWs. The leaders of 30 countries gather in Krakow, POLAND (near Oswiecim – polish name for German Auschwitz) today to honor the death of the innocent victims of the sick ideology that some humans are somehow inherently better than others.

Resources:

Bow your head and say a prayer for over six million Jews and Poles (I consider those living in Poland being Poles no matter what religion do they believe) killed in the German Nazi concentration camps.

Posted in History, Politics
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...
| 3 Comments »

If you’re an msstyles author you may want to read it.

Originally posted on Wincustomize.com

Very important: Recoloring/converting or altering icons or skins does not change the original author’s copyright, nor does it make such skin yours! If you recolor/convert or alter a skin or icon that has not been made by yourself you may not upload or share the modified skin or icon without the original author’s permission.

Working on enhancing the porting filter in the most recent months I’ve been working with various msstyles authors (and a lot of them either ported or allowed to port their msstyles). And almost always the first question that arises is – “What’s the point? I can use Windows XP built in theming after all. What does it give me to release my style as a WindowBlinds skin?”

  1. WindowBlinds skins non-theme aware programs so all of Windows would have the style, not just theme aware ones.
  2. Users can mix and match toolbar and progress animations with it (yes there are other ways to do this but nothing as easy as WindowBlinds).
  3. You can change its color easily on the fly.
  4. For most people, it’ll run significantly (i.e. noticeably) faster. Hardware acceleration!
  5. You can assign other mouse button operations to the title bar.
  6. You can easily add buttons that enhance the theme’s functionality.
  7. You can apply advanced recoloring to it with SkinStudio.
  8. With minimum effort you can enable dropdown menus skinning after conversion.
  9. Setting SkinStudio use “maximum quality” option during conversion will make your menu bar skinned as it was a toolbar.
  10. Ability to integrate the skin with the font (the font is installed automatically as the skin is used). It comes with the skin in one WBA (WindowBlinds zipped skin) so there is no risk the theme will look weird if user forgets to install the font or just skip reading the readme where you advise him/her to.
  11. Ability to associate the skin with the toolbar icons so that they are automatically applied once you start using the skin. Same with Animations if the msstyles contains them as well. No need for them to use Additional programs as Y’Z toolbar or replace system files.
  12. User can set the Visual Style to be used for a single app while having another one fot the whole system.
  13. Users do not have to hack the dlls vital to their system systems functioning. This may not be important for you, but believe me it has raised concern more than once among our customers. That was why actually we decided to make the MSStyles converter. Our customers liked some of the msstyles but didn’t want to hack their system files.
  14. On my ssytem (though you may have either confirm or an feel differently) WindowBlinds is more stable than Msstyles. Actually changing msstyles (And I’m changing both of them a lot) kills an application running on my system at least once a 4 changes of a theme. Will it be Firefox(a lot), my Bluetooth stack (more seldom) or my programing IDE(really, really popular at dying). It practically does not happen to WindowBlinds any longer. And being an msstyles author you most probably know very well what I’m talking about.
  15. There is no way you could make an Msstyle that a company like Nintendo, nVidia (or here), Marvel, ATI or Microsoft (or here) would pay you for. Those are just the few themes off a top of my head, but WindowBlinds skinners are making paid themes on a daily basis. The reason why you cannot sell your MSstyle to them is that there is no way for the user to apply the theme in a legitimate way. No – a hack is not legitimate even if some companies sell them). I’m sure you’re in it for fun and not for money. That’s cool, but making a few bucks now and then doing what you love is really nice, isn’t it?

That’s just 15 reasons that I think of first when someone asks me “Why WindowBlinds“. If you’re still undecided just download SkinStudio and you should be able to just double click on your .msstyles file (make sure you unzip it to a directory first) and have it imported in. SkinStudio is a free download that will not expire on you and will allow you to convert msstyles to WindowBlinds and edit your themes indefinitely!

Be aware that even though it’s still not perfect (especially the Free version is rather old) there will be a new SkinStudio release right after the New Year (Jan 2005) that will significantly improve upon what it does now. Object Desktop subscribers may already enjoy some of the improvements. More to come!

I used elements of Brad’s post from Neowin in my article – thanks for the inspiration Brad.

Posted in SkinStudio, WindowBlinds
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...
| 48 Comments »

Blah this color!

How to successfully recolor skins with SkinStudio.

Originally posted on Wincustomize.com

I am aware that this article is partially redundant. I’ve written similar article in about a year ago but it was concerning icons. IconDeveloper is fairly similar in this term to SkinStudio since they share a great deal of their code base. However there I suppose there may be a significant number of people not realizing that – hence the article.

So we have christmas again. I tell you – I love Mormegil‘s great ChristmasTime skin pack. Though Christmas do not necessarily come in blues for me. It comes in reds, it comes in greens and in golds. Now let’s take a look at the skin:

Yup. definitely too much blues. But hey! I’ve got SkinStudio! Read the rest of this article »

Posted in SkinStudio, WindowBlinds
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...
| 288 Comments »

How to create a WindowBlinds shell animation file

It’s not as hard as David Copperfield would like you to think it is.

Originally posted on JoeUser.com

How exactly do you create those criters? At first it may seem a tedious job but once you have all the frames, you’re pretty much set.

First thing I did in my research was asking the experts. I’ve asked some of the skin authors and most of them uses a kind of workaround to this. The most detailed explanation I’ve received from one of the greatest WindowBlinds skinners – Mike Bryant:

Read the rest of this article »

Posted in Desktop Customization, Skinning, SkinStudio, WindowBlinds
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...
| 42 Comments »

How to make a compact start menus in a substyle

and why doesn’t it happen automatically

Originally posted on Wincustomize.com

There was a concern by some users why SkinStudio shares a start menu with the original substyle when you create another substy;le based on it..

Basically the answer is – It’s not a bug – It’s a feature. It’s like that by design. If you select a prefix on save then you will get another start menu as well, otherwise skinstudio will use the same stuff for 2 reasons.

  1. it does not know how to name the new “xpstuff.xp”.
  2. it does not know whether you really want to break the connection. You may as well want to just make a variation of your skin with slightly different titlebar buttons.

But imagine it did that so 2 things happen – you didn’t specify the prefix to create new images so once you change the images in one substyle you change them in the other too since you didn’t tell it to make copies of them. Now imagine how outrageous it would be. “But it uses another xpstuff.xp” you would say. “Why one substyle breaks the other substyle images” you would say. And you would be right. if everything’s duplicated then everything is duplicated, if nothing then nothing.

Now let me show you the solution to the problem. I usedto direct people to the “Code” tab forgettig that the combo for “non image” file references is actually editable. But today I’ve read an easier sollution, by Tiggz:

When you want the substyle to have a different start menu, after you create the new substyle you need to click “taskbar” in the navigation tree in the left hand side of the window, then over on the right click on the word file, and then below, in the “value” text entry field you can change the name from the default (XPStuff.xp).

Keep your great skins coming!

Posted in SkinStudio, WindowBlinds
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...
| 3 Comments »

Skinning Icons!?!

Are there no limits to customization?

Originally posted on Wincustomize.com

Very important: Recoloring or skinning icons does not change the original author’s copyright, nor does it make such icons yours. If you recolor or skin an icon that has not been made by yourself you may not upload or share a recolored icon without the original author’s permission.

In the next few days Stardock is publishing the next component of it’s extremely successful ObjectDesktop. The new component is called IconDeveloper – the tool’s , I’m the developer of, main purpose is to make it easy for casual users to create icons and make it faster and more efficient for professional icon artists to do their work. Celebrating the event I decided to write a short article about going really crazy with icons and how to do it with IconDeveloper. What skinning means (but is not limited to) is changing the look of certain part of applications. The article will describe how you can change the appearance of an IconPackager theme or an Icl file (Icon library).

So you recolored your icons already? (If not checkout the article about mix matching your themes with your skins – the functionality described there is now a part of IconDeveloper). But it still isn’t enough? Why stop on recoloring? Why not make your icons exactly how you want them to be? Why not SKIN THE ICONS?

I have recolored according to my taste (or lack of it) the great Bant’s “Ciela” Visual Style (Please do not ask for the recolored skin. Curtesy of Bant, it’s available here for free and you can easilly recolor it with SkinStudio). It has a kind of toxic look now, which if you have seen the screenshots in some of my previous articles, you have probably noticed I’ve developed a taste for.

Since i can never get enough of the marvelous PixOs icons by Paul Boyer I have decided to recolor them to match the skin.

But since I’ve done the recoloring already, should I stop there? Let’s open the modded “PixOs Toxic”…

Select a new name for skinned theme and specify that I want to actually “skin” it…

Now what can we do here… I know! Let’s set it on fire!

Or make it suffer in a really polluted environment… sorry Paul

and actually make it ultimately match my skin of choice… and a bit smoked (Why? Why not?!). To do this I’ve had to edit an image from the Visual Style to create a bevel I can now use as a background (made for sake of this artticle only). You can actually use any image for either a background or overlay – just press the “Browse” button and select the image you want to use.

The possibilities are countless. IconDeveloper comes with a number of backgrounds and overlies for you to toy with, but the real potential is in your creativity. Make your own icon’s skins. The sky is the limit!

Posted in IconDeveloper, Skinning
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...
| 12 Comments »

Could we have some decency here?

Originally posted on Wincustomize.com

There’s a lot of noise in the news sites (Slashdot.org, News.com and Neowin.net) about the Monday release of Konfabulator for Windows. But to be honest they just make me think that journalists today no longer care to be through and accurate and will chew in everything  that a PR department will send them. I do not personally rant about those kind of things, but this one got me going. Especially one thing Mr Alro said which is cited in about all of the sources:

‘When you have a great idea, you want more than 2 percent of the global market to have access to it.’

That’s just utter gibberish!

Unless you lived in a glass castle for the last 6 years or never been a part of the desktop customization community you know that there already is a pretty stiff competition in that area on Windows. He sounds as if some Macintosh saviours bring the desktop customization into the abandoned wasteland of Windows.

Hellooo! I have a news for you! DesktopX is at least a few years older than Konfabulator and it has always been a Windows application. And it just began from that. There are multiple desktop customizing apps epart from that, Kapsule and AveDesk to mention just a few of them.

Unfortunately this is not news for Mr Arlo Rose he is pretty aware of it as I’ve been reading his rhetoric after Apple anounced Dashboard in Tiger and that just makes me all much more astonished about this statement.

Posted in Desktop Customization, Rants, Software
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...
| 18 Comments »