General: July 2006 Archives

My Xbox 360 has a blog too!

| | Comments (0)
Ok, everyone is blogging these days right? Now my Xbox 360 has started a blog too. It will keep you posted about my 360 usage 24-7 so stay tuned!

How fast do you type?

| | Comments (0)
Ok, so I'm a coder. Does that mean I type fast? I dunno, you decide. I found this site that test your typing speed and here's my result: Is this fast?

Zen of Networked Physics

| | Comments (0)
Found Glend Fiedlers excellent articles on physics and networked physics. Don't forget to read them.

The important Post-Build Event

| | Comments (0)
I've started playing with "Unit Testing". I use UnitTest++ as my unit testing framework after reading the excellent Unit Testing framework evaluation by Noel Llopis, I figured he must know what features you need, and I'm very happy with the framework so far. Anyway, when I'm setting up a project for unit testing I've found I'm most comfortable with the following setup: Project for unit testing In the MyApplication project I put everything related to the actual application this could be a GUI application like an MFC app, then there's alot of code that's not the actual logic. In this project I link to my Libraries implementing the logic. In this case MyLibrary1. Then I have MyTestApplication that is the standalone application that is actually doing the unit testing. This application links with the UnitTest++ library and also the libraries implementing the logic, again, in this example, it's MyLibrary1.lib. Now, the purpose of this post was to point out one of the more important details here. In MyTestApplication I have configured it to run the application itself as a Post-Build Event, like this: Run self as post build event This runs the application after a successful build and outputs any failed tests as clickable errors. This is the ultimate cool, never forget this! It will produce output similar to this: Post-Build Event Output

How to get Windows XP look in MFC application

| | Comments (1)
Sometimes I don't understand what they do over there in Redmond. No, I'm not one of those that hate microsoft, quite the opposite. But still, they continue to do surprise me from time to time. Consider this sample MFC application: Standard MFC application This is what I get from the MFC app wizard in Visual Studio .Net 2005. I have created a Doc/View app and selected CFormView as my initial view and I've added a few sample controls to the view. Is this what you expect from your $10.000+ IDE in 2006? I guess not, read on. Let's see what we need to do to our MFC application in order to spice it up. The problem here is that in order to get that nice XP look you'll have to use the common controls dll version 6. If you look in your stdafx.h file you should have the following lines when using .Net 2005: [cpp] // Allow use of features specific to IE 6.0 or later. // Change this to the appropriate value to target other versions of IE. #ifndef _WIN32_IE #define _WIN32_IE 0x0600 #endif [/cpp] This might fool you to think it allows you to use features specific to IE 6.0 or later. But the seasoned programmer that Microsoft targets knows this isn't enough. In Windows XP or later you need a manifest to tell what version of common controls dll to use. This is a simple 3-step process for an MFC application. 1. First we add this line to resource.h [cpp] #define IDR_MANIFEST 1 [/cpp] 2. Then add the following to your .rc2 file (MyApp.rc2) [cpp] IDR_MANIFEST RT_MANIFEST MOVEABLE PURE "res\\MyApp.manifest" [/cpp] 3. The last step is to add the actual manifest file. Create a new textfile in your favorite text editor paste the following. Don't forget to change MyApp to your applications name. Then save it as "MyApp.manifest" in your projects "res" folder. [xml] MyApp [/xml] Rebuild your application and find your MFC application has suddenly changed skin: Modern MFC application This wasn't very hard, right? Why didn't Microsoft add this to appwiz generated applications? Maybe they would argue that they don't know what version of common controls dll you are targeting, but a simple check that _WIN32_IE is 0x600 would solve that. I really don't know what they are doing over there in Redmond, but I'd expect they atleast document this functionality. Sigh.

Easy screenshots

| | Comments (0)
I've started using IrfanView for creating screenshots. I was already using IrfanView for displaying images in Windows but I was looking for a tool to easily create screendumps without starting Photoshop that is a bit too heavy for this purpose. I read somewhere that you could paste and crop in some Microsoft Photo editor and immediately thought that it must be possible to do similar in IrfanView and Presto! It was. The only annoying detail is that it's a bit hard to crop, but I usually do alt-print-scrn anyway so it's not to much of a problem. I just do "Create New (empty) image..." and then paste my image into that. It adjusts to fit automagically. Nice! Create empty image

Vista GUI Development links

| | Comments (0)
Found some good reads on GUI development in Vista: Windows Vista User Experience Guidelines What's new in Vista Top 10 Ways to Light Up Your Windows Vista Apps Forums: Software Development for Windows Vista The million dollar question is how you use all this fancy stuff from C++. I guess you can't?

I know you’ve got soul!

| | Comments (0)
I'm moving all my arcade related material over to www.arcadesoul.com.

Let there be code

| | Comments (0)
Finally! As you can hopefully see below I'm now able to post proper code snippets as I've installed the great iG: Syntax Hiliter Plugin for my wordpress blog. I find it very frustrating that it's hard to post proper code in a modern publishing system. But I don't have that problem any more! Yay! I think you should be able to post good looking code in the comments too! Unfortunately I can't show exactly how to insert code tags because then the example would be code. But you do [cpp] for c++ and then you must close the code section with the same tag but with a slash that you do with normal html.

Both Bowser and Baby Bowser Pwned!

| | Comments (0)
Yay! Today I finally beat New Super Mario Bros! Gaming doesn't get much better than this. The new DS Lite must be the best console I've ever had period. And the games on the DS platform is more fun than any other games on any format. Ok.. Haven't had time to try Loco Roco yet, but I don't think it'll beat Mario Bros. I'm having a bit of a difficulty deciding if this was better than Partners in Time though. Bowser and Baby Bowser Pwned!

About this Archive

This page is a archive of entries in the General category from July 2006.

General: April 2006 is the previous archive.

General: August 2006 is the next archive.

Find recent content on the main index or look in the archives to find all content.