Posts Tagged ‘2. Windows Programming’

Serialize and deserialize BITMAP object in MFC/Win32

09/07/2009 5 comments

Download the source code for various platforms: WinCE/WinMobile, Win32 API

Update Feb 10, 2011: The source code I uploaded is for WinMobile platform. Today I have modified and upload the Win32 version. All the source code inside this post is also changed to Win32 version.

Lately, in one of my project, I have to save an BITMAP object into an XML document. The problem is I can only save an CString into the XML document. So I have to find a way to convert BITMAP data (in a HBITMAP) into CString.

It’s pretty easy if I serialize the BITMAP to an byte[] array, and then convert the result byte[] array into CString format. So I will consequently discuss on these 2 problems.

Read more…

Here’s Why It’s Windows 7

Đọc cái này nghe nhảm ko chịu dc :))

The mystery of Microsoft’s Windows version count has been solved. A day after announcing (in the Windows Vista blog) that the next release of Windows will be called Windows 7, Mike Nash (Microsoft Corporate VP, Windows Product Management) added a post laying out Microsoft’s Windows version numbers since Windows 3.x.

Basically, they go like this:

Version 4: Windows 95

Version 4 point releases: Windows 98, 98SE, and ME (4.0.1998, 4.10.2222 and 4.90.3000, respectively).

Version 5: Windows 2000

Version 5 point releases: Windows XP (5.1)

Version 6: Windows Vista

I was surprised to realize that Windows XP (in which Microsoft unified the code bases for Windows 9x and NT/2000) was only a point release. But at least we now know how they got to Windows 7.