Code Library

Free Source Code and Program Tips

RSS Feeds

  • Home
  • zero
  • Featured
  • Sitemap
  • About
  • 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 taken. The reason is that No WM_MEASUREITEM message is sent to the controls parent window. The...
    More
  • How do I subclass the CListCtrl part of a CListView Class?

    Read this article: How to use an derived CListCtrl in CListView
    More
  • ucoSpy,a system enhancement tool like spy++

    Introduce ucoSpy is a system enhancement application, used to view various attributes of windows or controls, and copy multiple contents that can’t be normally copied as well, such as passwords hidden as asteroids, and a TreeView. And ucoSpy can give a report the tree relationship of the windows and their child control. Main features ucoSpy is designed with the architecture of plug-in. So everyone...
    More
  • ucoFmlParser, a formular parser use LaTex-like syntax

    Formula Parser Formular Editor, a great control which can edit and display the formular in a very friendly way. For details, please visit the CodeProject website. But how to build the formula is very hard. One can input the formula by the mouse, or build the Formular Tree in program. Both are hard. So I write the ucoFmlParser for the control, which can parse the LaTex-like expression to formular. For...
    More
  • ucoGrid, a great grid control of MFC

    UcoGrid is develped from CGridCtrl, and provides more exciting features. CGridCtrl is a great ctrl developed by Chris Maunder, which can display and edit tabulated data and support custom defined cell type. The lastest version is Here. Many developers have created their new cells and developed new feathers for CGridCtrl. such as, merging and unmerging cells, printing and print preview support,...
    More

How to read sectors of a physical drive under Win32?

Jan 15th

Posted by support in Win32/MFC | 654 views

No comments

How to read the sectors of physical drive under win32? The API ReadFile is most useful function, and with it, you can read the physical sectors directly. Here is a sample function, BOOL ReadSectors(…) BOOL ReadSectors( BYTE bDrive, //drive index DWORD dwStartSector, //start sector WORD wSectors, //sectors number LPBYTE lpSectBuff) {  if (bDrive == 0)

API, How-to, sdk, win32

How to get a fixed code for serial number(2)

Jan 10th

Posted by support in Win32/MFC | 269 views

No comments

I have post an article about “How to get a fixed code for serial number” at http://www.ucosoft.com/archives/51.html. In that article, I suggest you try WMI class to retrieve  some hardware ID. But there is some limitation of this method. The WMI redist package is not always available on user’s system, for example, Windows NT4 and Windows

API, How-to, sdk, serial number, shareware

How to Draw Bitmap from a bmp File?

Jan 4th

Posted by support in Win32/MFC | 6,013 views

No comments

How to load a bitmap from bmp file and draw it in DC? There are two main steps: Load the bitmap from the file to a memory DC. Paint the content of the memory DC to the one which display the bitmap. In MFC, there is no API to load a bitmap directly from a

Bitmap, Cpp, How-to, Win32/MFC

How to Get the Primary Domain name

Jan 3rd

Posted by support in General | 150 views

No comments

In gina, the system will list the domain name of the current system. How to get the primary domain name in your program? From the released the Windows2000 and NT source code, you can get the code of gina. It locate on \win2k\private\windows\gina\winlogon\usrpro.c. Here is the code:

API, How-to, network, Tips

Install global hook without dll

Jan 3rd

Posted by support in Win32/MFC | 1,705 views

2 comments

Chinese version author: peach@newsmth.net Userally, when you install a global hook, you need a dll. But now, you can install WH_KEYBOARD_LL or WH_MOUSE_LL global hook without dll’s help. The following code was tested under win2k3. And I it will also run on 2k/xp.

dll, hook, message

How to get the local DNS server record

Jan 2nd

Posted by hamo in General | 157 views

No comments

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:

API, DNS, How-to

MessageBox support Ctrl+C to copy content

Jan 1st

Posted by hamo in General | 170 views

No comments

It’s a good trick. From windows 2000, when a MessageBox popped out, you can use Ctrl+C to copy the content of the MessageBox window to the clipboard. It is a very interesting trick, and it is very usrful to share the information easily. The condition is only that the MessageBox window was created by MessageBoxA/MessageBoxW

MessageBox, Tips

How to retrieve the authenticode information

Dec 31st

Posted by support in Win32/MFC | 1,197 views

3 comments

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

API, How-to, smth

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

Dec 28th

Posted by support in General | 3,360 views

1 comment

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

profile, Tips, Visual Studio

How to read the graphics card RAM capacity

Dec 18th

Posted by hamo in General | 1,658 views

No comments

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

API, hardware, How-to
« First...«7891011»...Last »
    • Recent comments
    • Popular posts
    • Archives
    • Tags
    • Categories
    • General (69)
    • iphone (4)
    • Java (7)
    • Project (3)
    • Script (3)
    • Win32/MFC (32)
    1st actions android API application Bitmap broadcastreceiver CListCtrl CListView Cpp CPropertyPage CTreeCtrl CTreeView CView Debug developed development dll eclipse File game heap hook How-to interaction jbpm message parser PHP Program Project Script sdk service STL study Subclass thread Tips ucosoft user Visual Studio Win32/MFC Win32/MFC WordPress
    • December 2009 (28)
    • November 2009 (9)
    • October 2009 (11)
    • February 2009 (1)
    • January 2009 (1)
    • October 2008 (1)
    • September 2008 (2)
    • June 2008 (2)
    • January 2008 (4)
    • November 2007 (1)
    • October 2007 (12)
    • June 2007 (4)
    • April 2007 (1)
    • March 2007 (3)
    • January 2007 (7)
    • December 2006 (11)
    • November 2006 (20)
    • ucoGrid, a great grid control of MFC (18)
    • Solution of fatal error RC1004: unexpected end of file found (11)
    • ucoFmlParser, a formular parser use LaTex-like syntax (5)
    • How to retrieve the authenticode information (3)
    • sscanf with CString (3)
    • Deploy JBPM 3.2.2 to Tomcat and Mysql (2)
    • Retrieving a class and WMI class (2)
    • Install global hook without dll (2)
    • How to use an derived CListCtrl in CListView (2)
    • How to send/post message to CDocument? (2)
    • Mohammad: Thanks. This saved a big project from some bad bugs.
    • Allen: Thank you very much! It is really a simple yet effective solution!
    • kumar: Im very dissapponted with ur site. It is not at all userfrendly. To understand the code we need...
    • cipcipcia: how can I add to bookrmark your blog? would you like to visit mine? regards!
    • Thomas: Thank you! This helps a lot!
    • David Weber: This did help me the error RC1004: unexpected end of file found persists.
    • Vikas: Hi, Do You try to deploy JBPM 4.0 on Tomcat ? Thanks -Vikas
    • Vikas: Hi, Do You try to deploy JBPM1.0 on Tomcat ? Thanks -Vikas
  • My latest tweets

    Loading tweets...
    Follow me on Twitter!
  • User Login






    • Lost your password?
  • Blogroll

Mystique theme by digitalnature | Powered by WordPress
RSS Feeds XHTML 1.1 Top