QListCtrl.h
上传用户:cnjubao
上传日期:2007-01-02
资源大小:34k
文件大小:2k
- /************************************
- REVISION LOG ENTRY
- Revision By: Mihai Filimon
- Revised on 11/2/98 8:34:15 PM
- Comments: QListCtrl.h : main header file for QLISTCTRL.DLL
- ************************************/
- #if !defined(AFX_QLISTCTRL_H__BFCC1BCC_7257_11D2_86E6_0040055C08D9__INCLUDED_)
- #define AFX_QLISTCTRL_H__BFCC1BCC_7257_11D2_86E6_0040055C08D9__INCLUDED_
- #if _MSC_VER >= 1000
- #pragma once
- #endif // _MSC_VER >= 1000
- #if !defined( __AFXCTL_H__ )
- #error include 'afxctl.h' before including this file
- #endif
- #include "resource.h" // main symbols
- /////////////////////////////////////////////////////////////////////////////
- // CQListCtrlApp : See QListCtrl.cpp for implementation.
- class CQListCtrlApp : public COleControlModule
- {
- public:
- BOOL InitInstance();
- int ExitInstance();
- };
- extern const GUID CDECL _tlid;
- extern const WORD _wVerMajor;
- extern const WORD _wVerMinor;
- extern const TCHAR _separatorColumnHeader;
- extern const TCHAR _separatorHeader;
- #include <atlconv.h>
- #include <afxconv.h>
- LPWSTR WINAPI AtlA2WHelper(LPWSTR lpw, LPCSTR lpa, int nChars);
- template <class classType> void DDP_DEFINE( COlePropertyPage* pPage, BOOL bSave, classType* pValue, LPCTSTR lpszPropertyName, VARTYPE vType )
- {
- USES_CONVERSION;
- ULONG nObjects = NULL;
- LPDISPATCH* pDispatch = pPage->GetObjectArray(&nObjects);
- COleDispatchDriver propDispatch;
- for (int i = 0; i < (int)nObjects; i++)
- {
- LPCOLESTR lpOleStr = T2COLE(lpszPropertyName);
- DISPID dwDispID = NULL;
- if (SUCCEEDED(pDispatch[i]->GetIDsOfNames(IID_NULL, (LPOLESTR*)&lpOleStr, 1, 0, &dwDispID)))
- {
- propDispatch.AttachDispatch(pDispatch[i]);
- if (bSave)
- {
- classType nTemp = *pValue;
- propDispatch.SetProperty(dwDispID, vType, nTemp);
- }
- else
- {
- classType nTemp;
- propDispatch.GetProperty(dwDispID, vType, &nTemp);
- *pValue = nTemp;
- }
- propDispatch.DetachDispatch();
- }
- }
- };
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_QLISTCTRL_H__BFCC1BCC_7257_11D2_86E6_0040055C08D9__INCLUDED)