Archive for the ‘Windows’ Category

Fast Open… for Visual Studio 2005/2008

When there are a lot of files in a project, it is pretty hard to find where the file is. In such case, I desperately wanted to have Xcode’s Fast Open… feature for Visual Studio 2005/2008.
So, while finding some plugins for Visual Studio, I found one tip.

What you should do is to type
>of [file name]
in [...]

Continue reading »

Why MFC is bad

Well, MFC has lots of weird aspects. Basically MFC is a framework. What is a framework? Framework is a wrapper of API to make the API easier to use.
However, when MFC is compared to ToolBox which was most popular during similar period of time, MFC is not as easy to use as ToolBox. ToolBox is, [...]

Continue reading »

A Difference between Mac and Windows

I wrote about a difference between Mac and Windows at my another blog.
Sorry that it is written in Korean only.

Continue reading »

About BOOL, BOOLEAN and bool on Windows

Well, this was what I wondered when I used MFC/Win32 a lot when I was a sophormore. Why are there so many boolean type on Windows? And why did people at MS made such many boolean type? Well, actually they are not new. They are just alias of int and char, or BYTE.
In C, there [...]

Continue reading »

MFC problems

There are a few subjects I would like to write about MFC and would like to compare Cocoa and MFC. I know that it is not fair to compare Cocoa and MFC, because MFC was designed at the time of ToolBox of System x. However, Cocoa was also designed at almost similar time at NeXT.
However, [...]

Continue reading »

Visual C++ 2008 resource editing and control variable annoyance

Hmmm.. It was strange that VC++ 2008 add variables wizard didn’t let a “value” variable of a radio button. With VC++ 6, it was possible as far as I remember.
So, I searched to find out what changed since VC++ 6.
What I found are :

Visual Studio 2005의 DDX 매크로 문제
MSDN : Assign a variable to a [...]

Continue reading »

TerminateThread() and its consequence (Windows)

Usually when it is required to quit a thread from outside of its thread function, you declare a variable like shouldQuit, and it checks if the shouldQuit is set inside of the thread function. From outside of the thread function, you set the shouldQuit to tell the thread to quit.
However, if a function in a [...]

Continue reading »

Setting a name to a thread (MSDN)

It is pretty hard to identify threads when you debug codes.
So, for the Visual C++, MSDN says there is a way to set a name to a thread.
Here is the codes from MSDN.

//
// Usage: SetThreadName (-1, "MainThread");
//
#include <windows.h>
#define MS_VC_EXCEPTION 0×406D1388

#pragma pack(push,8)
typedef struct tagTHREADNAME_INFO
{
DWORD dwType; // Must be 0×1000.
LPCSTR szName; [...]

Continue reading »

Debugging a release build with the Visual C++ 2005

Sometimes debug build doesn’t crash but release build crashes. This usually happens when memory area which is not valid is accessed. Debug build usually has some fence around allocated memory area.
However, recently I suffered somewhat different case. In this case, you need to debug a release build.
Yeah.. It is quite easy. Just enable debug information [...]

Continue reading »

dwmapi.dll problem

Due to the fire in the Port Ranch area, Northridge, I have worked at home, or more accurately, in a LA Central Library.
Instead of making progressing in modifying a program’s feature, I tried hard making it compilable at least. Contrary to what said before, the main project depends on its sub-project, which is I expected. [...]

Continue reading »