I spent most of today afternoon/evening writing my first C++/CLI article for CodeProject. You can read it here – A first look at C++/CLI. The article covers the problems with the old syntax, how the new syntax solves these problems, how handles differ from pointers, declaring and using CLR types with the new syntax and [...]
Entries from April 2004
My first C++/CLI article for CodeProject
April 28th, 2004 · 9 Comments
Blog updated with some fancy stuff
April 28th, 2004 · 15 Comments
The code snippets are now colorized – as you must surely have observed by now. Jambo Johnson took the WordPress colorizer and made the required changes for it to work with C++/CLI, and though we had a little problem with its unexpected indentation effects, a lucky guess helped solve that problem too. I’ve also broken [...]
Tags: General
Using GetFullPathName to compare relative file paths
April 26th, 2004 · 3 Comments
Sometimes you encounter a situation where you might have a relative file-path and you need to ensure that it’s not the same as another path you have (possibly another relative path). For example, “c:\text files\abc.txt” might be the same physical file as “..\..\abc.txt”. Luckily you don’t have to roll out your own custom function to [...]
Tags: Win32/MFC
Press any key to continue…
April 24th, 2004 · 3 Comments
Sometimes I do remember nostalgically, how in my early high-school days, I was quite thrilled on discovering the INKEY$ function in GWBASIC, which allowed me to implement a “Press any key to continue…” feature for my program. It somehow made my little GWBASIC programs seem more professional and cool. 10 PRINT “hello” 20 WHILE INKEY$=”" [...]
Tags: CLR/.NET BCL
To C++ or not to C++, that is the question!
April 23rd, 2004 · 11 Comments
C++ programmers who want to write code targeting the CLR are now facing a rather complicated situation – the problem being that there is currently no C++ option that they can safely choose to write .NET code. Of course, there might be a few who would argue that we could use VC++.NET 2003 and use [...]
Tags: C++/CLI
IJW still works!
April 21st, 2004 · 12 Comments
It would have been highly unlikely and extremely dumb if IJW did not work in C++/CLI, considering that the single most momentous feature in the Managed C++ language extensions was IJW. But I still wanted to try it out and did the usual <windows.h> inclusion and a call to the MessageBoxW API. using namespace System; [...]
Tags: C++/CLI
Declaring classes in C++/CLI
April 20th, 2004 · 8 Comments
Declaring classes in C++/CLI follows a much more coherent syntax than we had in Managed C++. On a side-note, the old syntax is nowadays referred to as Managed C++ and the new syntax is referred to as C++/CLI; some people do say old-managed syntax and new-managed syntax, but I think that’s just darn confusing, and [...]
Tags: C++/CLI
New UI theme for blog
April 20th, 2004 · 14 Comments
I’d like to profusely thank Paul Watson and Jambo Johnson for their incredibly awesome tips and suggestions while I was setting up the new UI-design for the blog. I’ve got to say this of those two guys; Paul Watson is a CSS genius par compare and Jambo is – well smart at everything he does. [...]
Tags: General
Microsoft Visual C++ Toolkit 2003
April 19th, 2004 · 2 Comments
The Microsoft Visual C++ Toolkit 2003 is now available as a free download – which means, all those of you out there who have not been able to upgrade to the latest version of VS.NET or VC++.NET due to monetary reasons, can still get to play with the latest C++ compiler/linker from Microsoft (including support [...]
Tags: General
Checking for internet connectivity
April 19th, 2004 · 6 Comments
This is a technique I’ve used in the past to check for internet connectivity and it has never really failed to work for me. But I won’t say it’s a 100% safe method and you’ll have to verify that this works for your target environment before putting it into use. BOOL CheckInternetConnection(LPCTSTR szURL) { DWORD [...]
Tags: Win32/MFC
About C++/CLI
April 17th, 2004 · 3 Comments
Problems with the old Managed C++ syntax The main complaint everyone had about the Managed Extensions to C++ was that the syntax was too ugly and twisted with all those double underscores thrown about. People also felt that compared to C#, MC++ was a second class .NET language and didn’t directly support the CLI, but [...]
Tags: C++/CLI
Getting a CDialog into the taskbar
April 16th, 2004 · 4 Comments
I’ve seen this question asked in forums quite often where someone complains that his (or her) dialogs do not show up in the taskbar when visible. While I wouldn’t recommend that you do this (because child dialogs really shouldn’t be showing up in the taskbar), essentially all you need to do is to add WS_EX_APPWINDOW [...]
Tags: Win32/MFC
This is fun :-)
April 14th, 2004 · 14 Comments
Okay So I’ve finally got my blog up and running. I wouldn’t have done so if not for Mister .NET (Jambo Johnson) who guided me through the process expertly as only he can. Thanks Jambo It’s the Festival of Vishu in Kerala (my state in India), so maybe it’s a nice day to start off [...]
Tags: General