Free Source Code and Program Tips
hamo
This user hasn't shared any biographical information
Homepage: http://www.ucosoft.com
Posts by hamo
How to get the local DNS server record
Jan 2nd
If you don’t have Iphlpapi.lib installed, you can retrieve the local DNS server in the following way. The main step is load “Iphlpapi.dll” with ::LoadLibary method and call ::GetProcAddress to get the “GetNetworkParams”. Here is the full source:
How to read the graphics card RAM capacity
Dec 18th
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
Dec 17th
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,
Simple code to create an EMF or Bitmap file from existed draw code
Dec 16th
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
Dec 11th
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
Dec 10th
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.
Make the Code Completion working again in VC++ 6.0
Dec 6th
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
Dec 5th
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
Dec 3rd
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