I’ve updated my web site with all the articles I’ve written/updated in the gap since my last site-update and also added a Free Tools section. The Articles page is now pretty big – so maybe I should break it down into separate sections – oh well, next update I guess Anyway, when you are free, [...]
Entries from June 2005
Web site and Blog updated
June 28th, 2005 · 8 Comments
Tags: General
Casting to a specific function overload
June 21st, 2005 · 9 Comments
See these two overloads of a function F :- void F() { cout << “F()” << endl; } void F(int i = 10) { cout << “F(int) ” << i << endl; } Now if you attempt to call the function as F() you’ll get a compiler error. /* F(); <- C2668: ‘F’ : ambiguous [...]
Tags: C++
0x27F3 days!
June 20th, 2005 · 4 Comments
It’s now 0x27F3 days since I entered this world – wow, that sounds like such a long time into the past, though my grandma says she remembers it as if it was just yesterday. Grandmas always do that, they say that they remember things very clearly when they know you weren’t born then or were [...]
Tags: General
GetProcessImageFileName/QueryDosDevice trivia
June 20th, 2005 · 10 Comments
If you’ve ever used GetProcessImageFileName, you’d have been a little stunned to see filenames like \Device\HarddiskVolume1\Program Files\Abc.exe – though when you think of it, it’s not all that surprising, because these are the real paths as far as the OS is concerned, all that kiddy-type C-drive, D-drive usage is mere eye-candy for us non-kernel-programmer types. [...]
Tags: Win32/MFC
GetProcAddress in Unicode builds
June 14th, 2005 · 6 Comments
If you have code like this :- GetProcAddress(hModComCtl,_T(“DllGetVersion”)); It won’t compile when UNICODE is defined. This is so because there are no separate GetProcAddressW/GetProcAddressA functions. The second argument to GetProcAddress is an LPCSTR (const char*), because exported names in Win32 modules are stored as ANSI strings. The right way to write the above line would [...]
Tags: Win32/MFC
IsAppThemed and IsThemeActive just don’t work
June 2nd, 2005 · 3 Comments
I was most annoyed when I found that IsAppThemed and IsThemeActive do not work as expected. Instead of returning the themed status of the running application, both functions return the themed status of the system (pretty much useless for my specific requirement). After some googling, I found a posting from a fellow-MVP, Jeff Partch, who [...]
Tags: Win32/MFC
The guy who never combed his hair
June 1st, 2005 · 10 Comments
I remember how, back during my college days, a lady-classmate referred to me as a guy who never combs his hair, never wears a watch and whose idea of formal wear is a wrinkled t-shirt and worn-out jeans. This might possibly be alarming to some of you, but she was dead accurate. It’s now close [...]
Tags: General