二. 使用windows提供的幫助宏ListView_GetHeader
這種方式實際上是通過發(fā)送消息來獲取表頭句柄, 返回值即表頭句柄
2. 替換表頭的窗口過程
使用SetWindowLong這個API 就可以替換掉一個窗口的窗口過程.(詳細(xì)步驟請參看MSDN)
3. 請參看示例代碼
4. 請參看示例代碼
具體代碼
.h文件
// ---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
// ---------------------------------------------------------------------------
#include
#include
#include
#include
#include
// ---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
TListView *ListView1;
private: // User declarations
public: // User declarations
__fastcall TForm1(TComponent* Owner);
__fastcall~TForm1();
};
相關(guān)推薦:
C實例編程:編寫高效簡潔的C語言四大絕招 計算機等級考試二級C語言高效編程的四招技巧