Code Library

Free Source Code and Program Tips

How to retrieve the authenticode information

Chinese verion author: Quaful@newsmth.net. When an ActiveX will be installed in IE, the authenticode information will be showed out. And how to get the information by programming? In microsoft KB323809: HOWTO: Get Information from Authenticode Signed Executables, there is a full example code. But it’s not very easy to use in your program directly. So [...]

How to enable “profile” in Visual C++ 6.0

From MSDN: The profiler is an analysis tool that you can use to examine the run-time behavior of your programs. By using profiler information, you can determine which sections of your code are working efficiently. The profiler can produce information showing areas of code that are not being executed or that are taking a long [...]

How to read the graphics card RAM capacity

When you want to get the RAM capacity of the graphics card installed on the computer, It’s more simple to use WMI class. You can give a look at the AdapterRAM attribute of Win32_VideoController. The Win32_VideoController WMI class represents the capabilities and management capacity of the video controller. AdapterRAM is one of its attibute: AdapterRAM [...]

Retrieving a class and WMI class

Note: This a part from MSDN, just for self refference. The copyright is handled by Microsoft. The first type of object you can retrieve is a WMI class. When retrieving a WMI class, you actually retrieve a class definition: that is, a listing of the properties, qualifiers, and methods that fully describe the class. However, [...]

We often need to create an Enhanced Meta File(EMF) or Bitmap(bmp) from an existed DC draw code. It’s not very difficult but it’s boring to code again and again. The following is a simple solution, what you need to do is only to implement an IPicDrawer and call DrawEnhMeta or DrawBitmap function.

Setup SCIM in Ubuntu 6.10

After install the ubuntu 6.10 from the live-cd, you may find that the SCIM does not work. All the related package has been installed, but after press Ctrl+Space, the SCIM input has not enabled. The main reason is that the scim daemo is not running.  Following is the solution: create 75scim file under /etc/X11/Xsession.d/ with [...]

The work plan in the next days

Document the ucoFml Parser and release the source. Release an old project, simpMath parser, which can parse math expressions and support + – * / and many math functions, such as sin,cos,tan,cot, etc.  

Code Completion is a very useful feature of programiing, but it often  strikes in VC++ 6.0. If you meet such matter, try the following step: 1. delete *.ncb, *.opt, *.plg and *.clw files from your project directory 2. rebuild your project. And you often need CTRL+W to generate the class wizard infmation again. But the above works [...]

How to change the row height of CListCtrl

When you want to change the height of CListCtrl, you need to use an owner-draw version of CListCtrl and change the font of the control. But when you change the font of the CListCtrl, the control or its parent window does not get a chance to respecify the height of the rows and the effect will not be [...]

Moving selection of CListCtrl

tag: CListCtrl, SetItemState, SetSelectionMark When you try to move the item selection of a CListCtrl object, you should remember to call SetSelectionMark. If not, the program will not work as you think. It will only work once and won’t work any longer. The reason is that even you have called SetItemState and the selection was [...]