Code Library

Free Source Code and Program Tips

RSS Feeds

  • Home
  • zero
  • Featured
  • Sitemap
  • About
  • How do I subclass the CListCtrl part of a CListView Class?

    Read this article: How to use an derived CListCtrl in CListView
    More
  • 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
  • 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 hilight an item in CTreeCtrl/CTreeView

Oct 25th

Posted by support in Win32/MFC | 2,912 views

No comments

How to hilight or bold an item in CTreeCtrl/CTreeView? There is no real difference between CTreeCtrl and CTreeView. You need to use an owner draw tree control. Takeover the NM_CUSTOMDRAW message, and it will allow you to change the font, brush, etc. of each individual item. You don’t need to do any owner draw if

CTreeCtrl, CTreeView

How to subclass CTreeCtrl in CTreeView?

Oct 25th

Posted by support in Win32/MFC | 2,633 views

No comments

Another title: How to use a derived CTreeCtrl in a CTreeView? It is similar with this article: “How to use an derived CListCtrl in CListView” or “How do I subclass the CListCtrl part of a CListView Class?“. Just like CListView, there is no CTreeCtrl to subclass in CTreeView. The CTreeView is the subclass of the

CTreeCtrl, CTreeView, CView, How-to, Subclass

How to send/post message to CDocument?

Oct 24th

Posted by support in General | 1,172 views

2 comments

Sometime you need to send/post message to CDoumnet, but CDocument is not a window, and it can’t receive message. How do that? There are 3 solutions: Solution 1: Send the message to the main window. Send/Post the message to the main frame or the view, and then call some functions of the document. But if

Document, How-to, message, PostMessage, SendMessage, Window

How do I subclass the CListCtrl part of a CListView Class?

Oct 22nd

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

No comments

Read this article: How to use an derived CListCtrl in CListView

CListCtrl, CListView, Howto, Subclass

How to sort items of CListCtrl or CListView?

Oct 22nd

Posted by support in Win32/MFC | 3,288 views

No comments

How to sort the items of a CListCtrl or CListView(CReportView)? First, when you add items, you need to call SetItemData to attach an data structure(an integer or a pointer) to the item. Then, define a callback sort function. int CALLBACK SortFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort); And here, the prarameters lParam1 and lParam2 are the

CallBack, CListCtrl, CListView, How-to, SetItemData

How to use an derived CListCtrl in CListView

Oct 22nd

Posted by support in General | 2,515 views

2 comments

Sometime you use CListView and need to extend the functionality of the CListCtrl of the view. For example, you want to overwrite the handler function of the NM_CUSTOMDRAW or WM_SIZE message. So the problem is: How to tell CListView to use your own CListCtrl? OK, you are on the wrong way now. The CListView does

CListCtrl, CListView, CView, Win32/MFC

Link error when mix MBCS and Unicode in ONE project

Oct 18th

Posted by support in Win32/MFC | 238 views

No comments

A Solution which contents 3 projects and below are the names & their character set encoding type 1. Utility – > MBCS 2. Calculations -> MBCS 3. User Interface -> Unicode  ( Earlier It used to be MBCS) WhenChanged the  Character set encoding for User Interface and compiled the code, you will get hte Errors

Link error, MBCS, UNICODE

Set the head backgroud color of CPropertyPage

Oct 18th

Posted by support in General | 219 views

No comments

How to set the head backgroud color of CPropertyPage? In the DrawItem function the TextOut position is pretty half-hearted, and looks a bit better (to my eyes) if you do it something like this instead. void CMyTabCtrl::DrawItem(LPDRAWITEMSTRUCT lpDIS) { CDC* pDC = CDC::FromHandle(lpDIS->hDC); CRect rc(lpDIS->rcItem); TCHAR szTabText[255]; TC_ITEM tci; tci.cchTextMax = sizeof(szTabText)-1; tci.pszText = szTabText;

CPropertyPage, How-to

How to set the backgroud color of CPropertyPage

Oct 18th

Posted by support in General | 796 views

No comments

How to set the backgroud color of CPropertyPage? If you override OnCtlColor in your property page, then you can return a different background color and that seems to work with CStatic and other items. But what if you want is a background that’s not just a simple color? You’d like to be able to draw

Color, CPropertyPage, Win32/MFC

How to select the item of ListView(CListCtrl)

Oct 18th

Posted by support in General | 3,231 views

No comments

Use CListCtrl::SetItemState with LVIS_SELECTED

CListCtrl, Win32/MFC
« First...«56789»10...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


    followers
    • /about 0 seconds ago
    • Nabout 0 seconds ago
    Follow me on Twitter!
  • User Login






    • Lost your password?
  • Blogroll

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