Welcome to Hardcode Sign in | Join | Help

January 2006 - Posts

I'm still in progress setting www.hardcode.ro to this page - the domain registration process here in Romania is completely crap. So, soon, noone will ever have to remember the loooong URL above ( kro ... it was something with "blogs" wasn't it ? :) ). The DNS server is really needed, unlikely what thought in the first place. Thanks to Dragos Novac for getting this done.
Discarding the presentation cache for ole client items is pretty simple using IOleCache::EnumCache and IOleCache::Uncache, however when re-opening the file the object will be empty. There's a catch here: you still need to cache at least one item (even empty like FORMATETC aFormat = { 0, 0, DVASPECT_CONTENT, -1, TYMED_MFPICT }) otherwise the object won't refresh and instead throw a OLE_E_BLANK.
The interesting stuff to do here though is not discard the cache but rather compress it (to PNG or something lossless like that) - I'm still researching on that.
In pixels - and please without recursive routines that process the top and left CSS styles. Well first I've tried using IDisplayServices::TransformPoint but it appears there's a much more friendly routine (that really works!) - IHTMLTextRangeMetrics2::getBoundingClientRect (be sure to set a IHTMLTxtRange to the element you need).
What a silent move by ATI ... no counter or indication on their web page at all. Tomorrow we'll all see X1900 launched and available from day one - something new in the ATI camp.
After few days of living with it (needed it back for SQL Server 2005) I've noticed some warnings when building an InstallShield Express setup:
ISEXP : warning -4354: The build was unable to extract COM information from the file [1]. Please ensure that the file is self-registering and verify that the self-registration process does not fail.
Indeed - it was caused by 2003 Server SP1 so I've ended up uninstalling it again. And, guess what - SQL Server 2005 (including management studio) runs exceptionally fine without it.
Together with Pisi I am involved in a startup site that wishes to index restaurants in Bucharest - it will be a winner. Of course, it's not only this that is doing - you will see at launch.
I've just registered to the contest along with Alin Lazar (3rd place last year there with his team) and Mihai Ciureanu - our team is named Release Candidates :D.
In case you didn't know, the contest is open to students from technical universities and involves creating a solution (based on Microsoft embedded technologies, of course) to help "preserving, protecting and enhancing" the environment.
Kudos to this guy that developed SMSExtender and TripleXtender - unique solutions for spoofing the caller ID of mobile phone calls and SMSs. Apparently he's the one behind Simeda Gmbh (very innovative company, has developed apps like the SoundCover and ActiveViewer).
If you have a picture control in Visual C++ resources and set a simple border (yes - the thin black one) it gets modified at run-time (even when Ctrl-T) to WS_EX_CLIENTEDGE (a big ugly sunken border). Is this a feature for the old programs (Win3.1) to look better? Anyway - you can set the styles correctly afterwards at run-time:

    pStatic->ModifyStyleEx( WS_EX_CLIENTEDGE, 0);
    pStatic->ModifyStyle( 0, WS_BORDER);

IDisplayServices::GetComputedStyle is the key function - it helps you retrieving an element's style as it is displayed on screen. You can get the markup pointer with IMarkupServices::CreateMarkupPointer and then MoveAdjacentToElement.
Oh, and another point, IHTMLDocument4::createDocumentFromUrl fails on a newly-created document (so right after CreateInstance) - you'll have to call InitNew on its IPersistStreamInit (I specified this here but only for ActiveX controls so the resolution is strange as the HTMLDocument is not an activex object class).
In my last post there is "VS2005 runs perfectly fine" ... this was not absolutely true. So, if you encounter some of these errors:
Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor named 'your pc name'.  The binding handle is invalid.

Unable to start debugging on the web server. You do not have privileges to debug the server process.
or
Unable to start debugging on the web server. The binding handle is invalid.
(or even better, all of them) there's a big chance to find now the cause: the Terminal Services service is disabled. Put it on Manual, reboot and there you go!

Unfortunately Windows 2003 SP1 was needed for VS2005 so I ended up installing it first. While afterwards it kept on crashing on half an hour basis, I managed in the end to install the Visual Studio 2005 successfully. Now, as life with the SP1 was inconceivable I uninstalled it and - surprise! - VS 2005 runs perfectly fine without the SP1.

Here's a macro that I have built for Microsoft Word to keep a table from splitting on two pages - now it will move to fit on only one (if it's now bigger than one, of course). This function was number 1 on my wishlist for MS Word so I'm glad to have it. To apply it select the whole table (by clicking the top-left cross) and apply the macro.
Sub SetTableNoWrap()
    Selection.Rows.AllowBreakAcrossPages = False
    With Selection.ParagraphFormat
        .SpaceBeforeAuto = False
        .SpaceAfterAuto = False
        .KeepWithNext = True
    End With
End Sub
I am thinking seriously about hacking my Nokia 7610 to output mp3s in stereo by multiplexing both channels on the only one wire. While I'm not pretty sure how to split the signal afterwards with a circuit (depending on what multiplexing method I choose - a time-slicing should be fine considering the second channel has an offset value added so it's easy to split), the processor power may be an impediment - it's a 123Mhz ARM-based proc. Anyway - a software problem is definitely far easier to solve and I may end up resorting to lower bitrates and such.
Here are some pictures from me and Pisi 's New Year’s Eve holiday at the seaside (!), at Vama Veche - actually it was more like a spring journey not a winter one: no snow at all.