| | |
| | | <PrecompiledHeader>NotUsing</PrecompiledHeader> |
| | | <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> |
| | | <AdditionalIncludeDirectories>..\xframe;..\xframe\system;..\project</AdditionalIncludeDirectories> |
| | | <InlineFunctionExpansion>Disabled</InlineFunctionExpansion> |
| | | </ClCompile> |
| | | <Link> |
| | | <SubSystem>Windows</SubSystem> |
| | |
| | | <FunctionLevelLinking>true</FunctionLevelLinking> |
| | | <IntrinsicFunctions>true</IntrinsicFunctions> |
| | | <SDLCheck>true</SDLCheck> |
| | | <PreprocessorDefinitions>NDEBUG;EXTJRJ_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| | | <PreprocessorDefinitions>NDEBUG;EXTJRJ_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;_XWIN;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| | | <ConformanceMode>true</ConformanceMode> |
| | | <PrecompiledHeader>NotUsing</PrecompiledHeader> |
| | | <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> |
| | |
| | | <ClInclude Include="..\xframe\xcontrol\xflowchart.hpp" /> |
| | | <ClInclude Include="..\xframe\xcontrol\xhtml.hpp" /> |
| | | <ClInclude Include="..\xframe\xcontrol\xlayersheet.hpp" /> |
| | | <ClInclude Include="..\xframe\xcontrol\xlistbox.hpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> |
| | | </ClInclude> |
| | | <ClInclude Include="..\xframe\xcontrol\xlistview.hpp" /> |
| | | <ClInclude Include="..\xframe\xcontrol\xreport.hpp" /> |
| | | <ClInclude Include="..\xframe\xcontrol\xshtml.hpp" /> |
| | | <ClInclude Include="..\xframe\xcontrol\xtreeview.hpp" /> |
| | |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\business\GDN\GDNSourcePaperCard.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\business\GDN\GDNSourcePriceMaint.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\business\GDN\select.item.po.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\business\GDN\SelectItem.New.GDN.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\business\HR\AdministrativeDepartment.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\business\HR\AdministrativeDepartmentFolder.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\business\HR\BlankExcelTemplate.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> |
| | |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\business\HR\ManpowerFileWindow.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\business\PO\business4.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\business\PO\Maint.PaperCard.PO.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\business\PO\Maint.PurcherItem.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> |
| | |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\business\Public\message.business.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\business\Public\message.supplier.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\business\quote.enquiry.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> |
| | |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\business\SO\Product.FetchNo.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\business\SO\Product.Select.SO.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> |
| | |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\business\Supplier\asklist.Owner.Supplier.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\business\Supplier\Inspection.Supplie.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\business\Supplier\list.Owner.Supplier.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\business\Supplier\maint.Document.Supplier.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\business\Supplier\maint.Document.SupplierEx.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\business\Supplier\maint.Document.SupplierSD.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\business\Supplier\maint.Owner.Supplier.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\business\Supplier\maintex.Owner.Supplier.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\business\Supplier\paymen.Supplie.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\business\Supplier\SupplierSource.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> |
| | | </ClCompile> |
| | | <ClCompile Include="..\project\printview\Maint.Template.PrintEx.cpp"> |
| | | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> |
| | |
| | | dw_list.SetItemString(row, L"ApplyStatus", arg.GetArgString(L"state")); |
| | | if (arg.GetArgString(L"billstatus") != L"") |
| | | { |
| | | string billstatus = arg.GetArgString(L"billstatus"); |
| | | string statusName = GetBillStatusName(billstatus); |
| | | xstring billstatus = arg.GetArgString(L"billstatus"); |
| | | xstring statusName = GetBillStatusName(billstatus); |
| | | dw_list.SetItemString(row, L"ApprovalStatus", billstatus); |
| | | dw_list.SetItemDisplayString(row, L"ApprovalStatus", statusName); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | #pragma once |
| | | |
| | | #include "wobject/xcontrol.hpp" |
| | | #include "win32/win.hpp" |
| | | |
| | | class xlistbox : public xcontrol |
| | | { |
| | | static int GetCount(HWND hWnd)//è¿åå表项æ»é¡¹æ° |
| | | { |
| | | int LB_GETCOUNT = 0x018B; |
| | | return SendMessage(hWnd, LB_GETCOUNT, 0, 0); |
| | | } |
| | | |
| | | static int AddItem(HWND hWnd, string str)//追å ä¸ä¸ªå表项ï¼å¦ææå®äºLBS_SORT飿 ¼ï¼å°éæåºï¼å¦å追å å°æå |
| | | { |
| | | int LB_ADDSTRING = 0x0180; |
| | | return SendMessage(hWnd, LB_ADDSTRING, 0, (LPARAM)str); |
| | | } |
| | | |
| | | static int AddItem(HWND hWnd, string str, int p)//追å ä¸ä¸ªå表项ï¼å¦ææå®äºLBS_SORT飿 ¼ï¼å°éæåºï¼å¦å追å å°æå |
| | | { |
| | | int LB_ADDSTRING = 0x0180; |
| | | int nIndex = SendMessage(hWnd, LB_ADDSTRING, 0, (LPARAM)str); |
| | | int LB_SETITEMDATA = 0x019A; |
| | | SendMessage(hWnd, LB_SETITEMDATA, nIndex, p); |
| | | return nIndex; |
| | | } |
| | | static int InsertItem(HWND hWnd, int nIndex, string str)//æå®ä½ç½®æå
¥ï¼wParam=-1æ·»å å°æ«å°¾ã妿æå®äºLBS_SORT飿 ¼ï¼åä¸ä¼éæåºï¼æä»¥LBS_SORT飿 ¼ä¸ä¸ç¨ã |
| | | { |
| | | int LB_INSERTSTRING = 0x0181; |
| | | return SendMessage(hWnd, LB_INSERTSTRING, nIndex, (LPARAM)str); |
| | | } |
| | | |
| | | static int DeleteItem(HWND hWnd, int nIndex) //å 餿å®çå表项ï¼lParam is not used |
| | | { |
| | | int LB_DELETESTRING = 0x0182; |
| | | return SendMessage(hWnd, LB_DELETESTRING, nIndex, 0); |
| | | } |
| | | |
| | | static int FindString(HWND hWnd, int nIndex, string str)//仿å®å¼å§è¡¨é¡¹åºå·å¼å§æ¥æ¾æå®é¡¹ï¼å¿½ç¥å¤§å°åï¼wParam=-1ä»ç¬¬ä¸é¡¹æ¾ |
| | | { |
| | | int LB_ERR = -1; |
| | | int LB_FINDSTRING = 0x018F; |
| | | int lResult = SendMessage(hWnd, LB_FINDSTRING, nIndex, (LPARAM)str); |
| | | return lResult; |
| | | } |
| | | |
| | | static int FindStringExact(HWND hWnd, int nIndex, string str)//æ´ä¸ªå符串å¹é
|
| | | { |
| | | int LB_ERR = -1; |
| | | int LB_FINDSTRINGEXACT = 0x01A2; |
| | | int lResult = SendMessage(hWnd, LB_FINDSTRINGEXACT, nIndex, (LPARAM)str); |
| | | return lResult; |
| | | } |
| | | |
| | | static int GetAnchorIndex(HWND hWnd)//è¿åé¼ æ æåéä¸ç项çç´¢å¼ |
| | | { |
| | | int LB_GETANCHORINDEX = 0x019D; |
| | | return SendMessage(hWnd, LB_GETANCHORINDEX, 0, 0); |
| | | } |
| | | |
| | | static int GetCaretIndex(HWND hWnd)//è¿åå
·æç©å½¢ç¦ç¹ç项çç´¢å¼ |
| | | { |
| | | int LB_GETCARETINDEX = 0x019F; |
| | | return SendMessage(hWnd, LB_GETCARETINDEX, 0, 0); |
| | | } |
| | | |
| | | static int GetCurSel(HWND hWnd)//åéï¼è¿åå½å被éä¸é¡¹ç´¢å¼ |
| | | { |
| | | int LB_GETCURSEL = 0x0188; |
| | | return SendMessage(hWnd, LB_GETCURSEL, 0, 0); |
| | | } |
| | | |
| | | static int GetHorizon(HWND hWnd)//è¿åå表æ¡å¯æ»å¨ç宽度ï¼åç´ ï¼ |
| | | { |
| | | int LB_GETHORIZONTALEXTENT = 0x0193; |
| | | return SendMessage(hWnd, LB_GETHORIZONTALEXTENT, 0, 0); |
| | | } |
| | | |
| | | static int GetItemData(HWND hWnd, int nIndex)//è¿åæå®å表项çéå æ°æ®ï¼ä¸æ¯LBS_HASSTRINGS飿 ¼çï¼å
容æ¥èªäºLB_ADDSTRINGæLB_INSERTSTRINGæ¶æ¯çlParamåæ°ï¼å¦åå
容æ¥èªäºLB_SETITEMDATAæ¶æ¯çlParam |
| | | { |
| | | int LB_GETITEMDATA = 0x0199; |
| | | return SendMessage(hWnd, LB_GETITEMDATA, nIndex, 0); |
| | | } |
| | | static int SetItemData(HWND hWnd, int nIndex, string str)//è¿åæå®å表项çéå æ°æ®ï¼ä¸æ¯LBS_HASSTRINGS飿 ¼çï¼å
容æ¥èªäºLB_ADDSTRINGæLB_INSERTSTRINGæ¶æ¯çlParamåæ°ï¼å¦åå
容æ¥èªäºLB_SETITEMDATAæ¶æ¯çlParam |
| | | { |
| | | int LB_SETITEMDATA = 0x019A; |
| | | return SendMessage(hWnd, LB_SETITEMDATA, nIndex, (LPARAM)str); |
| | | } |
| | | |
| | | static int GetItemHeight(HWND hWnd, int nIndex)//è¿ååè¡¨é¡¹ä¸æä¸é¡¹çé«åº¦ï¼åç´ ï¼ï¼ç¨äºLBS_OWNERDRAWVARIABLE飿 ¼çï¼wParamæå®çåæ° |
| | | { |
| | | int LB_GETITEMHEIGHT = 0x01A1; |
| | | return SendMessage(hWnd, LB_GETITEMHEIGHT, nIndex, 0); |
| | | } |
| | | /*static Rect GetItemRect(HWND hWnd,int nIndex)//è·å¾å表项ç客æ·åºRECT |
| | | { |
| | | int LB_GETITEMRECT = 0x0198; |
| | | xrect rect; |
| | | return SendMessage(hWnd,LB_GETITEMRECT,nIndex,rect); |
| | | }*/ |
| | | static int GetSel(HWND hWnd, int nIndex)//è¿åæå®å表项çç¶æï¼å¦ææ¥è¯¢çåè¡¨é¡¹è¢«éæ©äºè¿åä¸ä¸ªæ£å¼ï¼å¦åè¿å0 |
| | | { |
| | | int LB_GETSEL = 0x0187; |
| | | return SendMessage(hWnd, LB_GETSEL, nIndex, 0); |
| | | } |
| | | static int GetSelCount(HWND hWnd)//è¿åéæ©é¡¹çæ°ç®ï¼ä»
ç¨äºå¤ééæ©åè¡¨æ¡ |
| | | { |
| | | int LB_GETSELCOUNT = 0x0190; |
| | | return SendMessage(hWnd, LB_GETSELCOUNT, 0, 0); |
| | | } |
| | | static int GetSelItems(HWND hWnd)//è·åéä¸é¡¹çæ°ç®åä½ç½®ï¼ä»
ç¨äºå¤ééæ©å表æ¡ãwParamè¯´ææ°ç»ç¼å²åºç大å°,lParamæåä¸ä¸ªæ´åæ°ç»ç¼å²åº |
| | | { |
| | | int LB_GETSELITEMS = 0x0191; |
| | | int nMax = GetSelCount(hWnd); |
| | | int nItems; |
| | | return SendMessage(hWnd, LB_GETSELITEMS, nMax, nItems); |
| | | } |
| | | |
| | | static string GetText(HWND hWnd, int nIndex) //è¿åææ¬ |
| | | { |
| | | int LB_GETTEXT = 0x0189; |
| | | int LB_GETTEXTLEN = 0x018A; |
| | | int nLen = SendMessage(hWnd, LB_GETTEXTLEN, nIndex, 0); |
| | | string str = new wchar_t[nLen + 1]; |
| | | SendMessage(hWnd, LB_GETTEXT, nIndex, (LPARAM)str); |
| | | return str; |
| | | } |
| | | static int GetTextLen(HWND hWnd, int nIndex) //è¿åå½åéä¸é¡¹ææ¬é¿åº¦ |
| | | { |
| | | int LB_GETTEXTLEN = 0x018A; |
| | | return SendMessage(hWnd, LB_GETTEXTLEN, nIndex, 0); |
| | | } |
| | | static int GetTopIndex(HWND hWnd) //第ä¸ä¸ªå¯è§é¡¹çç´¢å¼ |
| | | { |
| | | int LB_GETTOPINDEX = 0x018E; |
| | | return SendMessage(hWnd, LB_GETTOPINDEX, 0, 0); |
| | | } |
| | | static int ResetCount(HWND hWnd)//æ¸
餿以å表项 |
| | | { |
| | | int LB_RESETCONTENT = 0x0184; |
| | | return SendMessage(hWnd, LB_RESETCONTENT, 0, 0); |
| | | } |
| | | static int SelectString(HWND hWnd, int nIndex, string str) //éä¸ä»nIndexå¼å§ç¬¬ä¸ä¸ªstrï¼è¿åéä¸çIndexï¼åªç¨å¨åéå表æ¡ä¸ |
| | | { |
| | | int LB_SELECTSTRING = 0x018C; |
| | | return SendMessage(hWnd, LB_SELECTSTRING, nIndex, (LPARAM)str); |
| | | } |
| | | |
| | | static int SelItemRangeEx(HWND hWnd, int sIndex, int eIndex)//ä»
ç¨äºå¤ééæ©ï¼ä»èµ·ç¹-ç»ç¹ |
| | | { |
| | | int LB_SELITEMRANGEEX = 0x0183; |
| | | return SendMessage(hWnd, LB_SELITEMRANGEEX, sIndex, eIndex); |
| | | } |
| | | static int SetAnchorIndex(HWND hWnd, int nIndex)//è®¾ç½®é¼ æ æåéä¸ç表项ææå®è¡¨é¡¹ |
| | | { |
| | | int LB_SETANCHORINDEX = 0x019C; |
| | | return SendMessage(hWnd, LB_SETANCHORINDEX, nIndex, 0); |
| | | } |
| | | /*static int SetCarerIndex(HWND hWnd,int nIndex,bool lParam)//设置é®çè¾å
¥ç¦ç¹å°æå®è¡¨é¡¹ |
| | | { |
| | | int LB_SETCARETINDEX = 0x019E; |
| | | return SendMessage(hWnd,LB_SETCARETINDEX,nIndex,lParam); |
| | | }*/ |
| | | static int SetColumnWidth(HWND hWnd, int nWidth)//设置å¤åå表æ¡å®½åº¦ï¼style为å¤ååè¡¨æ¡æ¶ææ |
| | | { |
| | | int LB_SETCOLUMNWIDTH = 0x0195; |
| | | SendMessage(hWnd, LB_SETCOLUMNWIDTH, nWidth, 0); |
| | | return 1; |
| | | } |
| | | static int SetCount(HWND hWnd, int nCnt)//设置表项æ°ç® |
| | | { |
| | | int LB_SETCOUNT = 0x01A7; |
| | | SendMessage(hWnd, LB_SETCOUNT, nCnt, 0); |
| | | return 1; |
| | | } |
| | | static int SetCurSel(HWND hWnd, int nIndex)//设置æå®å表项为å½å鿩项 |
| | | { |
| | | int LB_SETCURSEL = 0x0186; |
| | | return SendMessage(hWnd, LB_SETCURSEL, nIndex, 0);//åªç¨å¨åéå表æ¡ä¸ãnIndex = -1为å
¨ä¸é |
| | | } |
| | | /*static int SetSel(HWND hWnd, bool lbSel,int nIndex)//使æå®çå表项é䏿ä¸éï¼ç¨äºå¤éä¸ |
| | | { |
| | | int LB_SETSEL = 0x0185; |
| | | return SendMessage(hWnd,LB_SETSEL,lbSel,nIndex);//ç¨å¨å¤éä¸ï¼wParm表示æ¯å¦éï¼lParam为-1ï¼éæ©ææ |
| | | } |
| | | |
| | | static bool SetTopIndex(HWND hWnd,int nIndex)//å°æå®çå表项设置为第ä¸ä¸ªå¯è§é¡¹ |
| | | { |
| | | int LB_SETTOPINDEX = 0x0197; |
| | | return SendMessage(hWnd,LB_SETTOPINDEX,nIndex,0); |
| | | }*/ |
| | | |
| | | int GetCount()//è¿åå表项æ»é¡¹æ° |
| | | { |
| | | return GetCount(GetHWND()); |
| | | } |
| | | |
| | | int AddItem(string str)//追å ä¸ä¸ªå表项ï¼å¦ææå®äºLBS_SORT飿 ¼ï¼å°éæåºï¼å¦å追å å°æå |
| | | { |
| | | return AddItem(GetHWND(), str); |
| | | } |
| | | |
| | | int AddItem(string str, int p)//追å ä¸ä¸ªå表项ï¼å¦ææå®äºLBS_SORT飿 ¼ï¼å°éæåºï¼å¦å追å å°æå |
| | | { |
| | | return AddItem(GetHWND(), str, p); |
| | | } |
| | | |
| | | int InsertItem(int nIndex, string str)//æå®ä½ç½®æå
¥ï¼wParam=-1æ·»å å°æ«å°¾ã妿æå®äºLBS_SORT飿 ¼ï¼åä¸ä¼éæåºï¼æä»¥LBS_SORT飿 ¼ä¸ä¸ç¨ã |
| | | { |
| | | return InsertItem(GetHWND(), nIndex, str); |
| | | } |
| | | |
| | | int DeleteItem(int nIndex) //å 餿å®çå表项ï¼lParam is not used |
| | | { |
| | | return DeleteItem(GetHWND(), nIndex); |
| | | } |
| | | |
| | | int FindString(int nIndex, string str)//仿å®å¼å§è¡¨é¡¹åºå·å¼å§æ¥æ¾æå®é¡¹ï¼å¿½ç¥å¤§å°åï¼wParam=-1ä»ç¬¬ä¸é¡¹æ¾ |
| | | { |
| | | return FindString(GetHWND(), nIndex, str); |
| | | } |
| | | |
| | | int FindStringExact(int nIndex, string str)//æ´ä¸ªå符串å¹é
|
| | | { |
| | | return FindStringExact(GetHWND(), nIndex, str); |
| | | } |
| | | |
| | | int GetAnchorIndex()//è¿åé¼ æ æåéä¸ç项çç´¢å¼ |
| | | { |
| | | return GetAnchorIndex(GetHWND()); |
| | | } |
| | | |
| | | int GetCaretIndex()//è¿åå
·æç©å½¢ç¦ç¹ç项çç´¢å¼ |
| | | { |
| | | return GetCaretIndex(GetHWND()); |
| | | } |
| | | |
| | | int GetCurSel()//åéï¼è¿åå½å被éä¸é¡¹ç´¢å¼ |
| | | { |
| | | return GetCurSel(GetHWND()); |
| | | } |
| | | |
| | | int GetHorizon()//è¿åå表æ¡å¯æ»å¨ç宽度ï¼åç´ ï¼ |
| | | { |
| | | return GetHorizon(GetHWND()); |
| | | } |
| | | |
| | | int GetItemData(int nIndex)//è¿åæå®å表项çéå æ°æ®ï¼ä¸æ¯LBS_HASSTRINGS飿 ¼çï¼å
容æ¥èªäºLB_ADDSTRINGæLB_INSERTSTRINGæ¶æ¯çlParamåæ°ï¼å¦åå
容æ¥èªäºLB_SETITEMDATAæ¶æ¯çlParam |
| | | { |
| | | return GetItemData(GetHWND(),nIndex); |
| | | } |
| | | |
| | | int SetItemData(int nIndex, int str)//è¿åæå®å表项çéå æ°æ®ï¼ä¸æ¯LBS_HASSTRINGS飿 ¼çï¼å
容æ¥èªäºLB_ADDSTRINGæLB_INSERTSTRINGæ¶æ¯çlParamåæ°ï¼å¦åå
容æ¥èªäºLB_SETITEMDATAæ¶æ¯çlParam |
| | | { |
| | | return SetItemData(GetHWND(), nIndex, str); |
| | | } |
| | | |
| | | int GetItemHeight(int nIndex)//è¿ååè¡¨é¡¹ä¸æä¸é¡¹çé«åº¦ï¼åç´ ï¼ï¼ç¨äºLBS_OWNERDRAWVARIABLE飿 ¼çï¼wParamæå®çåæ° |
| | | { |
| | | return GetItemHeight(GetHWND(), nIndex); |
| | | } |
| | | |
| | | /*Rect GetItemRect(int nIndex)//è·å¾å表项ç客æ·åºRECT |
| | | { |
| | | GetItemRect(GetID(),nIndex); |
| | | }*/ |
| | | |
| | | int GetSel(int nIndex)//è¿åæå®å表项çç¶æï¼å¦ææ¥è¯¢çåè¡¨é¡¹è¢«éæ©äºè¿åä¸ä¸ªæ£å¼ï¼å¦åè¿å0 |
| | | { |
| | | return GetSel(GetHWND(), nIndex); |
| | | } |
| | | |
| | | int GetSelCount()//è¿åéæ©é¡¹çæ°ç®ï¼ä»
ç¨äºå¤ééæ©åè¡¨æ¡ |
| | | { |
| | | return GetSelCount(GetHWND()); |
| | | } |
| | | |
| | | int GetSelItems()//è·åéä¸é¡¹çæ°ç®åä½ç½®ï¼ä»
ç¨äºå¤ééæ©å表æ¡ãwParamè¯´ææ°ç»ç¼å²åºç大å°,lParamæåä¸ä¸ªæ´åæ°ç»ç¼å²åº |
| | | { |
| | | return GetSelItems(GetHWND()); |
| | | } |
| | | |
| | | string GetText(int nIndex) //è¿åææ¬ |
| | | { |
| | | return GetText(GetHWND(), nIndex); |
| | | } |
| | | |
| | | int GetTextLen(int nIndex) //è¿åå½åéä¸é¡¹ææ¬é¿åº¦ |
| | | { |
| | | GetTextLen(GetHWND(), nIndex); |
| | | } |
| | | int GetTopIndex() //第ä¸ä¸ªå¯è§é¡¹çç´¢å¼ |
| | | { |
| | | return GetTopIndex(GetHWND()); |
| | | } |
| | | int ResetCount()//æ¸
餿以å表项 |
| | | { |
| | | return ResetCount(GetHWND()); |
| | | } |
| | | int SelectString(int nIndex, string str) //éä¸ä»nIndexå¼å§ç¬¬ä¸ä¸ªstrï¼è¿åéä¸çIndexï¼åªç¨å¨åéå表æ¡ä¸ |
| | | { |
| | | return SelectString(GetHWND(), nIndex, str); |
| | | } |
| | | |
| | | int SelItemRangeEx(int sIndex, int eIndex)//ä»
ç¨äºå¤ééæ©ï¼ä»èµ·ç¹-ç»ç¹ |
| | | { |
| | | return SelItemRangeEx(GetHWND(), sIndex, eIndex); |
| | | } |
| | | int SetAnchorIndex(int nIndex)//è®¾ç½®é¼ æ æåéä¸ç表项ææå®è¡¨é¡¹ |
| | | { |
| | | return SetAnchorIndex(GetHWND(), nIndex); |
| | | } |
| | | /*int SetCarerIndex(int nIndex,bool lParam)//设置é®çè¾å
¥ç¦ç¹å°æå®è¡¨é¡¹ |
| | | { |
| | | return SetCarerIndex(GetHWND(),nIndex,lParam); |
| | | }*/ |
| | | int SetColumnWidth(int nWidth)//设置å¤åå表æ¡å®½åº¦ï¼style为å¤ååè¡¨æ¡æ¶ææ |
| | | { |
| | | return SetColumnWidth(GetHWND(), nWidth); |
| | | } |
| | | int SetCount(int nCnt)//设置表项æ°ç® |
| | | { |
| | | return SetCount(GetHWND(), nCnt); |
| | | } |
| | | int SetCurSel(int nIndex)//设置æå®å表项为å½å鿩项 |
| | | { |
| | | return SetCurSel(GetHWND(), nIndex); |
| | | } |
| | | /*int SetSel( bool lbSel,int nIndex)//使æå®çå表项é䏿ä¸éï¼ç¨äºå¤éä¸ |
| | | { |
| | | return SetSel(lbSel, nIndex); |
| | | } |
| | | |
| | | static bool SetTopIndex(int nIndex)//å°æå®çå表项设置为第ä¸ä¸ªå¯è§é¡¹ |
| | | { |
| | | return SetTopIndex(nIndex); |
| | | }*/ |
| | | |
| | | static int GetCount(HWND hWnd)//è¿åå表项æ»é¡¹æ° |
| | | { |
| | | int LB_GETCOUNT = 0x018B; |
| | | return SendMessage(hWnd, LB_GETCOUNT, 0, 0); |
| | | } |
| | | |
| | | static int AddItem(HWND hWnd, string str)//追å ä¸ä¸ªå表项ï¼å¦ææå®äºLBS_SORT飿 ¼ï¼å°éæåºï¼å¦å追å å°æå |
| | | { |
| | | int LB_ADDSTRING = 0x0180; |
| | | return SendMessage(hWnd, LB_ADDSTRING, 0, (LPARAM)str); |
| | | } |
| | | |
| | | static int AddItem(HWND hWnd, string str, int p)//追å ä¸ä¸ªå表项ï¼å¦ææå®äºLBS_SORT飿 ¼ï¼å°éæåºï¼å¦å追å å°æå |
| | | { |
| | | int LB_ADDSTRING = 0x0180; |
| | | int nIndex = SendMessage(hWnd, LB_ADDSTRING, 0, (LPARAM)str); |
| | | int LB_SETITEMDATA = 0x019A; |
| | | SendMessage(hWnd, LB_SETITEMDATA, nIndex, p); |
| | | return nIndex; |
| | | } |
| | | static int InsertItem(HWND hWnd, int nIndex, string str)//æå®ä½ç½®æå
¥ï¼wParam=-1æ·»å å°æ«å°¾ã妿æå®äºLBS_SORT飿 ¼ï¼åä¸ä¼éæåºï¼æä»¥LBS_SORT飿 ¼ä¸ä¸ç¨ã |
| | | { |
| | | int LB_INSERTSTRING = 0x0181; |
| | | return SendMessage(hWnd, LB_INSERTSTRING, nIndex, (LPARAM)str); |
| | | } |
| | | |
| | | static int DeleteItem(HWND hWnd, int nIndex) //å 餿å®çå表项ï¼lParam is not used |
| | | { |
| | | int LB_DELETESTRING = 0x0182; |
| | | return SendMessage(hWnd, LB_DELETESTRING, nIndex, 0); |
| | | } |
| | | |
| | | static int FindString(HWND hWnd, int nIndex, string str)//仿å®å¼å§è¡¨é¡¹åºå·å¼å§æ¥æ¾æå®é¡¹ï¼å¿½ç¥å¤§å°åï¼wParam=-1ä»ç¬¬ä¸é¡¹æ¾ |
| | | { |
| | | int LB_ERR = -1; |
| | | int LB_FINDSTRING = 0x018F; |
| | | int lResult = SendMessage(hWnd, LB_FINDSTRING, nIndex, (LPARAM)str); |
| | | return lResult; |
| | | } |
| | | |
| | | static int FindStringExact(HWND hWnd, int nIndex, string str)//æ´ä¸ªå符串å¹é
|
| | | { |
| | | int LB_ERR = -1; |
| | | int LB_FINDSTRINGEXACT = 0x01A2; |
| | | int lResult = SendMessage(hWnd, LB_FINDSTRINGEXACT, nIndex, (LPARAM)str); |
| | | return lResult; |
| | | } |
| | | |
| | | static int GetAnchorIndex(HWND hWnd)//è¿åé¼ æ æåéä¸ç项çç´¢å¼ |
| | | { |
| | | int LB_GETANCHORINDEX = 0x019D; |
| | | return SendMessage(hWnd, LB_GETANCHORINDEX, 0, 0); |
| | | } |
| | | |
| | | static int GetCaretIndex(HWND hWnd)//è¿åå
·æç©å½¢ç¦ç¹ç项çç´¢å¼ |
| | | { |
| | | int LB_GETCARETINDEX = 0x019F; |
| | | return SendMessage(hWnd, LB_GETCARETINDEX, 0, 0); |
| | | } |
| | | |
| | | static int GetCurSel(HWND hWnd)//åéï¼è¿åå½å被éä¸é¡¹ç´¢å¼ |
| | | { |
| | | int LB_GETCURSEL = 0x0188; |
| | | return SendMessage(hWnd, LB_GETCURSEL, 0, 0); |
| | | } |
| | | |
| | | static int GetHorizon(HWND hWnd)//è¿åå表æ¡å¯æ»å¨ç宽度ï¼åç´ ï¼ |
| | | { |
| | | int LB_GETHORIZONTALEXTENT = 0x0193; |
| | | return SendMessage(hWnd, LB_GETHORIZONTALEXTENT, 0, 0); |
| | | } |
| | | |
| | | static int GetItemData(HWND hWnd, int nIndex)//è¿åæå®å表项çéå æ°æ®ï¼ä¸æ¯LBS_HASSTRINGS飿 ¼çï¼å
容æ¥èªäºLB_ADDSTRINGæLB_INSERTSTRINGæ¶æ¯çlParamåæ°ï¼å¦åå
容æ¥èªäºLB_SETITEMDATAæ¶æ¯çlParam |
| | | { |
| | | int LB_GETITEMDATA = 0x0199; |
| | | return SendMessage(hWnd, LB_GETITEMDATA, nIndex, 0); |
| | | } |
| | | static int SetItemData(HWND hWnd, int nIndex, int str)//è¿åæå®å表项çéå æ°æ®ï¼ä¸æ¯LBS_HASSTRINGS飿 ¼çï¼å
容æ¥èªäºLB_ADDSTRINGæLB_INSERTSTRINGæ¶æ¯çlParamåæ°ï¼å¦åå
容æ¥èªäºLB_SETITEMDATAæ¶æ¯çlParam |
| | | { |
| | | int LB_SETITEMDATA = 0x019A; |
| | | return SendMessage(hWnd, LB_SETITEMDATA, nIndex, str); |
| | | } |
| | | |
| | | static int GetItemHeight(HWND hWnd, int nIndex)//è¿ååè¡¨é¡¹ä¸æä¸é¡¹çé«åº¦ï¼åç´ ï¼ï¼ç¨äºLBS_OWNERDRAWVARIABLE飿 ¼çï¼wParamæå®çåæ° |
| | | { |
| | | int LB_GETITEMHEIGHT = 0x01A1; |
| | | return SendMessage(hWnd, LB_GETITEMHEIGHT, nIndex, 0); |
| | | } |
| | | /*static Rect GetItemRect(HWND hWnd,int nIndex)//è·å¾å表项ç客æ·åºRECT |
| | | { |
| | | int LB_GETITEMRECT = 0x0198; |
| | | xrect rect; |
| | | return SendMessage(hWnd,LB_GETITEMRECT,nIndex,rect); |
| | | }*/ |
| | | static int GetSel(HWND hWnd, int nIndex)//è¿åæå®å表项çç¶æï¼å¦ææ¥è¯¢çåè¡¨é¡¹è¢«éæ©äºè¿åä¸ä¸ªæ£å¼ï¼å¦åè¿å0 |
| | | { |
| | | int LB_GETSEL = 0x0187; |
| | | return SendMessage(hWnd, LB_GETSEL, nIndex, 0); |
| | | } |
| | | static int GetSelCount(HWND hWnd)//è¿åéæ©é¡¹çæ°ç®ï¼ä»
ç¨äºå¤ééæ©åè¡¨æ¡ |
| | | { |
| | | int LB_GETSELCOUNT = 0x0190; |
| | | return SendMessage(hWnd, LB_GETSELCOUNT, 0, 0); |
| | | } |
| | | static int GetSelItems(HWND hWnd)//è·åéä¸é¡¹çæ°ç®åä½ç½®ï¼ä»
ç¨äºå¤ééæ©å表æ¡ãwParamè¯´ææ°ç»ç¼å²åºç大å°,lParamæåä¸ä¸ªæ´åæ°ç»ç¼å²åº |
| | | { |
| | | int LB_GETSELITEMS = 0x0191; |
| | | int nMax = GetSelCount(hWnd); |
| | | int nItems; |
| | | return SendMessage(hWnd, LB_GETSELITEMS, nMax, nItems); |
| | | } |
| | | |
| | | static string GetText(HWND hWnd, int nIndex) //è¿åææ¬ |
| | | { |
| | | int LB_GETTEXT = 0x0189; |
| | | int LB_GETTEXTLEN = 0x018A; |
| | | int nLen = SendMessage(hWnd, LB_GETTEXTLEN, nIndex, 0); |
| | | string str = new wchar_t[nLen + 1]; |
| | | SendMessage(hWnd, LB_GETTEXT, nIndex, (LPARAM)str); |
| | | return str; |
| | | } |
| | | static int GetTextLen(HWND hWnd, int nIndex) //è¿åå½åéä¸é¡¹ææ¬é¿åº¦ |
| | | { |
| | | int LB_GETTEXTLEN = 0x018A; |
| | | return SendMessage(hWnd, LB_GETTEXTLEN, nIndex, 0); |
| | | } |
| | | static int GetTopIndex(HWND hWnd) //第ä¸ä¸ªå¯è§é¡¹çç´¢å¼ |
| | | { |
| | | int LB_GETTOPINDEX = 0x018E; |
| | | return SendMessage(hWnd, LB_GETTOPINDEX, 0, 0); |
| | | } |
| | | static int ResetCount(HWND hWnd)//æ¸
餿以å表项 |
| | | { |
| | | int LB_RESETCONTENT = 0x0184; |
| | | return SendMessage(hWnd, LB_RESETCONTENT, 0, 0); |
| | | } |
| | | static int SelectString(HWND hWnd, int nIndex, string str) //éä¸ä»nIndexå¼å§ç¬¬ä¸ä¸ªstrï¼è¿åéä¸çIndexï¼åªç¨å¨åéå表æ¡ä¸ |
| | | { |
| | | int LB_SELECTSTRING = 0x018C; |
| | | return SendMessage(hWnd, LB_SELECTSTRING, nIndex, (LPARAM)str); |
| | | } |
| | | |
| | | static int SelItemRangeEx(HWND hWnd, int sIndex, int eIndex)//ä»
ç¨äºå¤ééæ©ï¼ä»èµ·ç¹-ç»ç¹ |
| | | { |
| | | int LB_SELITEMRANGEEX = 0x0183; |
| | | return SendMessage(hWnd, LB_SELITEMRANGEEX, sIndex, eIndex); |
| | | } |
| | | static int SetAnchorIndex(HWND hWnd, int nIndex)//è®¾ç½®é¼ æ æåéä¸ç表项ææå®è¡¨é¡¹ |
| | | { |
| | | int LB_SETANCHORINDEX = 0x019C; |
| | | return SendMessage(hWnd, LB_SETANCHORINDEX, nIndex, 0); |
| | | } |
| | | /*static int SetCarerIndex(HWND hWnd,int nIndex,bool lParam)//设置é®çè¾å
¥ç¦ç¹å°æå®è¡¨é¡¹ |
| | | { |
| | | int LB_SETCARETINDEX = 0x019E; |
| | | return SendMessage(hWnd,LB_SETCARETINDEX,nIndex,lParam); |
| | | }*/ |
| | | static int SetColumnWidth(HWND hWnd, int nWidth)//设置å¤åå表æ¡å®½åº¦ï¼style为å¤ååè¡¨æ¡æ¶ææ |
| | | { |
| | | int LB_SETCOLUMNWIDTH = 0x0195; |
| | | SendMessage(hWnd, LB_SETCOLUMNWIDTH, nWidth, 0); |
| | | return 1; |
| | | } |
| | | static int SetCount(HWND hWnd, int nCnt)//设置表项æ°ç® |
| | | { |
| | | int LB_SETCOUNT = 0x01A7; |
| | | SendMessage(hWnd, LB_SETCOUNT, nCnt, 0); |
| | | return 1; |
| | | } |
| | | static int SetCurSel(HWND hWnd, int nIndex)//设置æå®å表项为å½å鿩项 |
| | | { |
| | | int LB_SETCURSEL = 0x0186; |
| | | return SendMessage(hWnd, LB_SETCURSEL, nIndex, 0);//åªç¨å¨åéå表æ¡ä¸ãnIndex = -1为å
¨ä¸é |
| | | } |
| | | /*static int SetSel(HWND hWnd, bool lbSel,int nIndex)//使æå®çå表项é䏿ä¸éï¼ç¨äºå¤éä¸ |
| | | { |
| | | int LB_SETSEL = 0x0185; |
| | | return SendMessage(hWnd,LB_SETSEL,lbSel,nIndex);//ç¨å¨å¤éä¸ï¼wParm表示æ¯å¦éï¼lParam为-1ï¼éæ©ææ |
| | | } |
| | | |
| | | static bool SetTopIndex(HWND hWnd,int nIndex)//å°æå®çå表项设置为第ä¸ä¸ªå¯è§é¡¹ |
| | | { |
| | | int LB_SETTOPINDEX = 0x0197; |
| | | return SendMessage(hWnd,LB_SETTOPINDEX,nIndex,0); |
| | | }*/ |
| | | }; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | #pragma once |
| | | |
| | | #include "wobject/xcontrol.hpp" |
| | | #include "win32/win.hpp" |
| | | |
| | | |
| | | typedef struct tagLVITEMW |
| | | { |
| | | UINT mask; |
| | | int iItem; |
| | | int iSubItem; |
| | | UINT state; |
| | | UINT stateMask; |
| | | LPWSTR pszText; |
| | | int cchTextMax; |
| | | int iImage; |
| | | LPARAM lParam; |
| | | int iIndent; |
| | | int iGroupId; |
| | | UINT cColumns; // tile view columns |
| | | UINT* puColumns; |
| | | int* piColFmt; |
| | | int iGroup; // readonly. only valid for owner data. |
| | | } LVITEMW, * LPLVITEMW; |
| | | |
| | | typedef struct tagLVCOLUMNW |
| | | { |
| | | UINT mask; |
| | | int fmt; |
| | | int cx; |
| | | LPWSTR pszText; |
| | | int cchTextMax; |
| | | int iSubItem; |
| | | int iImage; |
| | | int iOrder; |
| | | int cxMin; // min snap point |
| | | int cxDefault; // default snap point |
| | | int cxIdeal; // read only. ideal may not eqaul current width if auto sized (LVS_EX_AUTOSIZECOLUMNS_) to a lesser width. |
| | | } LVCOLUMNW, * LPLVCOLUMNW; |
| | | |
| | | typedef struct tagLVFINDINFOW |
| | | { |
| | | UINT flags; |
| | | LPCWSTR psz; |
| | | LPARAM lParam; |
| | | POINT pt; |
| | | UINT vkDirection; |
| | | } LVFINDINFOW, * LPFINDINFOW; |
| | | |
| | | typedef LVITEMW lvitem; |
| | | typedef LVCOLUMNW lvcolumn; |
| | | typedef LVFINDINFOW lvfindinfo; |
| | | |
| | | struct himagelist |
| | | { |
| | | }; |
| | | |
| | | struct imagelist |
| | | { |
| | | himagelist hlist; |
| | | }; |
| | | |
| | | struct NMLISTVIEW : public NMHDR |
| | | { |
| | | NMHDR hdr; |
| | | int iItem; |
| | | int iSubItem; |
| | | UINT uNewState; |
| | | UINT uOldState; |
| | | UINT uChanged; |
| | | POINT ptAction; |
| | | LPARAM lParam; |
| | | }; |
| | | |
| | | class xlistview : public xcontrol |
| | | { |
| | | static int SetdwStyle(HWND hWnd, int dwStyle)//è®¾ç½®é£æ ¼ |
| | | { |
| | | int GWL_STYLE_ = -16; |
| | | int LVS_ICON_ = 0x0000;//大徿 |
| | | int LVS_REPORT_ = 0x0001; |
| | | int LVS_SMALLICON_ = 0x0002; |
| | | int LVS_LIST_ = 0x0003;//å表 |
| | | |
| | | int IStyle =GetWindowLong(hWnd, GWL_STYLE_); |
| | | int LVS_TYPEMASK_ = 0x0003; |
| | | int LVS_EDITLABELS_ = 0x0200; |
| | | IStyle &= ~LVS_TYPEMASK_;//æ¸
餿¾ç¤ºæ¹å¼ä½ |
| | | return SetWindowLong(hWnd, GWL_STYLE_, IStyle | dwStyle); |
| | | } |
| | | static int SetReportStyle(HWND hWnd)//设置Report飿 ¼ |
| | | { |
| | | //è·å¾åæé£æ ¼ |
| | | int GWL_STYLE_ = -16; |
| | | int IStyle = GetWindowLong(hWnd, GWL_STYLE_); |
| | | int LVS_TYPEMASK_ = 0x0003; |
| | | int LVS_EDITLABELS_ = 0x0200; |
| | | IStyle &= ~LVS_TYPEMASK_;//æ¸
餿¾ç¤ºæ¹å¼ä½ |
| | | |
| | | //设å®ä¸ä¸ªæ°ççªå£é£æ ¼ |
| | | int LVS_REPORT_ = 0x0001; |
| | | int LVS_NOLABELWRAP_ = 0x0080; |
| | | int LVS_SHOWSELALWAYS_ = 0x0008; |
| | | IStyle |= LVS_REPORT_;//设置style为report |
| | | SetWindowLong(hWnd, GWL_STYLE_, IStyle | LVS_NOLABELWRAP_ | LVS_SHOWSELALWAYS_ | LVS_EDITLABELS_); |
| | | //设置æ©å±é£æ ¼ |
| | | int dwStyle; |
| | | int LVM_FIRST_ = 0x1000; |
| | | int LVM_GETEXTENDEDLISTVIEWSTYLE_ = LVM_FIRST_ + 55; |
| | | dwStyle = SendMessage(hWnd, LVM_GETEXTENDEDLISTVIEWSTYLE_, 0, 0);//è·åæ©å±é£æ ¼ |
| | | int LVS_EX_FULLROWSELECT_ = 0x00000020;//æ´è¡éä¸,ãapplies to report mode only |
| | | int LVS_EX_GRIDLINES_ = 0x00000001; //ç½æ ¼çº¿ |
| | | int LVS_EX_SUBITEMIMAGES_ = 0x00000002;//å¯ä»¥å¨å表ä¸å ICON |
| | | int LVS_EX_CHECKBOXES_ = 0x00000004;//åé¢å 个checkbox |
| | | dwStyle |= LVS_EX_FULLROWSELECT_ | LVS_EX_GRIDLINES_ | LVS_EX_CHECKBOXES_ | LVS_EX_SUBITEMIMAGES_; |
| | | |
| | | int LVM_SETEXTENDEDLISTVIEWSTYLE_ = LVM_FIRST_ + 54; |
| | | return SendMessage(hWnd, LVM_SETEXTENDEDLISTVIEWSTYLE_, dwStyle, dwStyle); |
| | | } |
| | | |
| | | static int GetImageList(HWND hWnd, int iImageList)//ImageList |
| | | { |
| | | int LVM_FIRST_ = 0x1000; |
| | | int LVM_GETIMAGELIST_ = LVM_FIRST_ + 2; |
| | | return SendMessage(hWnd, LVM_GETIMAGELIST_, iImageList, 0); |
| | | } |
| | | static int SetImageList(HWND hWnd, int iImageList, int himl)//设置ImageList |
| | | { |
| | | /*int LVSIL_NORMAL_ = 0; |
| | | int LVSIL_SMALL_ = 1; |
| | | int LVSIL_STATE_ = 2;*/ |
| | | int LVM_FIRST_ = 0x1000; |
| | | int LVM_SETIMAGELIST_ = LVM_FIRST_ + 3; |
| | | return SendMessage(hWnd, LVM_SETIMAGELIST_, iImageList, himl); |
| | | } |
| | | |
| | | static int InsertColumn(HWND hWnd, int nCol, string label, int nFormat, int nWidth, int nSubItem)//å¢å åï¼å å
¥å头 |
| | | { |
| | | int LVM_FIRST_ = 0x1000; |
| | | int LVM_INSERTCOLUMN_ = LVM_FIRST_ + 97; |
| | | |
| | | int LVCF_FMT_ = 0x0001;//坹齿¹å¼ï¼left,right |
| | | int LVCF_WIDTH_ = 0x0002;//å宽度 |
| | | int LVCF_TEXT_ = 0x0004;//ææ¬ |
| | | int LVCF_SUBITEM_ = 0x0008;//为åé
ç»è¯¥åçåç´¢å¼ |
| | | int LVCF_ORDER_ = 0x0020;//åå移顺åºä»å·¦å°å³ |
| | | int LVCFMT_LEFT_ = 0x0000; |
| | | int LVCFMT_RIGHT_ = 0x0001; |
| | | int LVCFMT_CENTER_ = 0x0002; |
| | | |
| | | lvcolumn lvc; |
| | | lvc.mask = LVCF_FMT_ | LVCF_WIDTH_ | LVCF_TEXT_ | LVCF_SUBITEM_;//飿 ¼ |
| | | lvc.fmt = nFormat; |
| | | |
| | | xrect rect; |
| | | //GetWindowRect(hWnd,rect);//åå¾çªå£å¨å±å¹åæ ç³»ä¸çRECTåæ ï¼å
æ¬å®¢æ·åºåé客æ·åºï¼ï¼è¿æ ·å¯ä»¥å¾å°çªå£ç大å°åç¸å¯¹å±å¹å·¦ä¸è§(0,0)çä½ç½®ã |
| | | //GetClientRect; |
| | | lvc.cx = nWidth;//(rect.right - rect.left ) * 3/5; //LVCF_WIDTH ï¼Width of the column, in pixels. |
| | | lvc.pszText = (LPWSTR)label;//æå |
| | | lvc.cchTextMax = 255; |
| | | lvc.iSubItem = nSubItem; |
| | | lvc.iImage = 0; |
| | | lvc.iOrder = 0; |
| | | return SendMessage(hWnd, LVM_INSERTCOLUMN_, nCol, (LPARAM) & lvc); |
| | | } |
| | | |
| | | static int InsertItem(HWND hWnd, int xIndex, string label, int pictureindex = 0)//only the label and picture index need to be specified |
| | | { |
| | | int LVM_FIRST_ = 0x1000;// ListView messages |
| | | int LVM_INSERTITEM_ = LVM_FIRST_ + 77; |
| | | |
| | | //LVITEM_mask |
| | | //int LVIF_COLFMT |
| | | //int LVIF_COLUMNS_ = 0x0200; |
| | | int LVIF_DI_SETITEM_ = 0x1000; |
| | | //int LVIF_GROUPID_ = 0x0100; |
| | | int LVIF_IMAGE_ = 0x0002; |
| | | //int LVIF_INDENT_ = 0x0010; |
| | | //int LVIF_NORECOMPUTE_ = 0x0800; |
| | | int LVIF_PARAM_ = 0x0004; |
| | | int LVIF_STATE_ = 0x0008; |
| | | int LVIF_TEXT_ = 0x0001; |
| | | //LVITEM_state |
| | | int LVIS_FOCUSED_ = 0x0001; |
| | | int LVIS_SELECTED_ = 0x0002; |
| | | int LVIS_OVERLAYMASK_ = 0x0F00; |
| | | |
| | | lvitem lvi; |
| | | lvi.mask = LVIF_TEXT_ | LVIF_IMAGE_; |
| | | lvi.iItem = xIndex; //æå®æå
¥é¡¹ç®çè¡å· |
| | | lvi.iSubItem = 0; //åå· |
| | | //lvi.state = LVIS_FOCUSED_ | LVIS_SELECTED_ | LVIS_OVERLAYMASK_; |
| | | //lvi.stateMask = ; |
| | | lvi.pszText = (LPWSTR)label; |
| | | lvi.cchTextMax = 255; |
| | | lvi.iImage = pictureindex; |
| | | //lvi.lParam = data; |
| | | //lvi.iIndent |
| | | |
| | | //int LVIF_GROUPID_ = 0x0100; |
| | | //int I_GROUPIDCALLBACK_ = -1; |
| | | //int I_GROUPIDNONE_ = -2; |
| | | //int iGroupId = 1; |
| | | //lvi.iGroupId = iGroupId; |
| | | return SendMessage(hWnd, LVM_INSERTITEM_, 0, (LPARAM) & lvi); |
| | | } |
| | | |
| | | static int InsertItemEx(HWND hWnd, int xIndex, string label, int pictureindex = 0, int data = 0)//only the label and picture index need to be specified |
| | | { |
| | | int LVM_FIRST_ = 0x1000;// ListView messages |
| | | int LVM_INSERTITEM_ = LVM_FIRST_ + 77; |
| | | |
| | | //LVITEM_mask |
| | | //int LVIF_COLFMT |
| | | //int LVIF_COLUMNS_ = 0x0200; |
| | | int LVIF_DI_SETITEM_ = 0x1000; |
| | | //int LVIF_GROUPID_ = 0x0100; |
| | | int LVIF_IMAGE_ = 0x0002; |
| | | //int LVIF_INDENT_ = 0x0010; |
| | | //int LVIF_NORECOMPUTE_ = 0x0800; |
| | | int LVIF_PARAM_ = 0x0004; |
| | | int LVIF_STATE_ = 0x0008; |
| | | int LVIF_TEXT_ = 0x0001; |
| | | //LVITEM_state |
| | | int LVIS_FOCUSED_ = 0x0001; |
| | | int LVIS_SELECTED_ = 0x0002; |
| | | int LVIS_OVERLAYMASK_ = 0x0F00; |
| | | |
| | | lvitem lvi; |
| | | lvi.mask = LVIF_TEXT_ | LVIF_IMAGE_ | LVIF_PARAM_; |
| | | lvi.iItem = xIndex; //æå®æå
¥é¡¹ç®çè¡å· |
| | | lvi.iSubItem = 0; //åå· |
| | | //lvi.state = LVIS_FOCUSED_ | LVIS_SELECTED_ | LVIS_OVERLAYMASK_; |
| | | //lvi.stateMask = ; |
| | | lvi.pszText = (LPWSTR)label; |
| | | lvi.cchTextMax = 255; |
| | | lvi.iImage = pictureindex; |
| | | lvi.lParam = data; |
| | | //lvi.iIndent |
| | | |
| | | //int LVIF_GROUPID_ = 0x0100; |
| | | //int I_GROUPIDCALLBACK_ = -1; |
| | | //int I_GROUPIDNONE_ = -2; |
| | | //int iGroupId = 1; |
| | | //lvi.iGroupId = iGroupId; |
| | | return SendMessage(hWnd, LVM_INSERTITEM_, 0, (LPARAM)&lvi); |
| | | } |
| | | |
| | | static int SetItemText(HWND hWnd, int nItem, int nSubItem, string label) |
| | | { |
| | | int LVM_FIRST_ = 0x1000; |
| | | int LVM_SETITEMTEXT_ = LVM_FIRST_ + 116; |
| | | int LVIF_TEXT_ = 0x0001; |
| | | |
| | | lvitem lvi; |
| | | lvi.mask = LVIF_TEXT_; |
| | | lvi.iSubItem = nSubItem; |
| | | lvi.pszText = (LPWSTR)label; |
| | | lvi.cchTextMax = 255; |
| | | return SendMessage(hWnd, LVM_SETITEMTEXT_, nItem, (LPARAM)&lvi); |
| | | } |
| | | |
| | | static int DeleteItemAll(HWND hWnd)//å 餿æ |
| | | { |
| | | int LVM_FIRST_ = 0x1000; |
| | | int LVM_DELETEALLITEMS_ = LVM_FIRST_ + 9; |
| | | return SendMessage(hWnd, LVM_DELETEALLITEMS_, 0, 0); |
| | | } |
| | | |
| | | static int DeleteColumn(HWND hWnd, int nCol)//å é¤å |
| | | { |
| | | int LVM_FIRST_ = 0x1000; |
| | | int LVM_DELETECOLUMN_ = LVM_FIRST_ + 28; |
| | | return SendMessage(hWnd, LVM_DELETECOLUMN_, nCol, 0); |
| | | } |
| | | |
| | | static int DeleteItem(HWND hWnd, int nIndex)//å é¤è¡ |
| | | { |
| | | int LVM_FIRST_ = 0x1000; |
| | | int LVM_DELETEITEM_ = LVM_FIRST_ + 8; |
| | | return SendMessage(hWnd, LVM_DELETEITEM_, nIndex, 0); |
| | | } |
| | | |
| | | static int EditLabel(HWND hWnd, int nIndex)//nIndex= -1è¡¨ç¤ºåæ¶ç¼è¾ |
| | | { |
| | | int LVM_FIRST_ = 0x1000; |
| | | int LVM_EDITLABEL_ = LVM_FIRST_ + 118; |
| | | return SendMessage(hWnd, LVM_EDITLABEL_, nIndex, 0); |
| | | } |
| | | |
| | | static int FindItem(HWND hWnd, int iStart, string label, bool partial, bool wrap) |
| | | { |
| | | //FindItem( int iStart, string label, boolean partial,boolean wrap ) |
| | | //partial=trueæç´ å
å«labelå¼å¤´çï¼=falseå¿
é¡»å¹é
æ´ä¸ªæ ç¾ |
| | | //wrap =trueè¿å第ä¸ä¸ªæ¾å°çï¼=falseè¿åæåæ¾å°ç |
| | | int LVM_FIRST_ = 0x1000; |
| | | int LVM_FINDITEM_ = LVM_FIRST_ + 83; |
| | | |
| | | //flags |
| | | int LVFI_PARAM_ = 0x0001; |
| | | int LVFI_STRING_ = 0x0002; |
| | | int LVFI_PARTIAL_ = 0x0008; |
| | | int LVFI_WRAP_ = 0x0020; |
| | | int LVFI_NEARESTXY_ = 0x0040; |
| | | //vkDirection |
| | | int VK_PRIOR_ = 0x21; |
| | | int VK_NEXT_ = 0x22; |
| | | int VK_END_ = 0x23; |
| | | int VK_HOME_ = 0x24; |
| | | int VK_LEFT_ = 0x25; |
| | | int VK_UP = 0x26; |
| | | int VK_RIGHT_ = 0x27; |
| | | int VK_DOWN_ = 0x28; |
| | | |
| | | lvfindinfo lvfi; |
| | | if (partial == true) |
| | | { |
| | | lvfi.flags = LVFI_PARTIAL_ | LVFI_STRING_; |
| | | } |
| | | else |
| | | lvfi.flags = LVFI_STRING_; |
| | | if (wrap == true) |
| | | { |
| | | lvfi.flags |= LVFI_WRAP_; |
| | | } |
| | | lvfi.psz = label; |
| | | //lvfi.lParam = //为LVFI_PARAMæ¶ææ |
| | | //lvfi.pt //åå§æç´¢ä½ç½®,为LVFI_NEARESTXY æ¶ææ |
| | | //lvfi.vkDirection = VK_NEXT_; //æç´ æ¹åãThis member is valid only if LVFI_NEARESTXY is set in the flags member |
| | | |
| | | return SendMessage(hWnd, LVM_FINDITEM_, iStart, (LPARAM)&lvfi); |
| | | } |
| | | |
| | | static int GetColumn(HWND hWnd, int iCol, lvcolumn lvc) |
| | | { |
| | | int LVM_FIRST_ = 0x1000; |
| | | int LVM_GETCOLUMN_ = LVM_FIRST_ + 95; |
| | | return SendMessage(hWnd, LVM_GETCOLUMN_, iCol, (LPARAM)&lvc); |
| | | } |
| | | |
| | | static int GetItem(HWND hWnd, lvitem& lvi) |
| | | { |
| | | int LVM_FIRST_ = 0x1000; |
| | | int LVM_GETITEM_ = LVM_FIRST_ + 75; |
| | | return SendMessage(hWnd, LVM_GETITEM_, 0, (LPARAM)&lvi); |
| | | } |
| | | |
| | | static int GetItemCount(HWND hWnd) |
| | | { |
| | | int LVM_FIRST_ = 0x1000; |
| | | int LVM_GETITEMCOUNT_ = LVM_FIRST_ + 4; |
| | | return SendMessage(hWnd, LVM_GETITEMCOUNT_, 0, 0); |
| | | } |
| | | |
| | | static int GetItemText(HWND hWnd, int nIndex, lvitem lvi) |
| | | { |
| | | int LVM_FIRST_ = 0x1000; |
| | | int LVM_GETITEMTEXT_ = LVM_FIRST_ + 115; |
| | | return SendMessage(hWnd, LVM_GETITEMTEXT_, nIndex, (LPARAM)&lvi); |
| | | } |
| | | |
| | | static int GetNextItem(HWND hWnd, int nIndex, int flags)//nIndex=-1æ¶ä»ç¬¬ä¸ä¸ªå¼å§ |
| | | { |
| | | int LVM_FIRST_ = 0x1000; |
| | | int LVM_GETNEXTITEM_ = LVM_FIRST_ + 12; |
| | | return SendMessage(hWnd, LVM_GETNEXTITEM_, nIndex, flags); |
| | | } |
| | | |
| | | static int GetSelectColumn(HWND hWnd) |
| | | { |
| | | int LVM_FIRST_ = 0x1000; |
| | | int LVM_GETSELECTEDCOLUMN_ = LVM_FIRST_ + 174; |
| | | return SendMessage(hWnd, LVM_GETSELECTEDCOLUMN_, 0, 0); |
| | | } |
| | | |
| | | static int GetSelectCount(HWND hWnd) |
| | | { |
| | | int LVM_FIRST_ = 0x1000; |
| | | int LVM_GETSELECTEDCOUNT_ = LVM_FIRST_ + 50; |
| | | return SendMessage(hWnd, LVM_GETSELECTEDCOUNT_, 0, 0); |
| | | } |
| | | |
| | | static int SetColumn(HWND hWnd, int iCol, lvcolumn lvc) |
| | | { |
| | | int LVM_FIRST_ = 0x1000; |
| | | int LVM_SETCOLUMN_ = LVM_FIRST_ + 96; |
| | | return SendMessage(hWnd, LVM_SETCOLUMN_, iCol, (LPARAM)&lvc); |
| | | } |
| | | |
| | | static int SetItem(HWND hWnd, lvitem lvi) |
| | | { |
| | | int LVM_FIRST_ = 0x1000; |
| | | int LVM_SETITEM_ = LVM_FIRST_ + 76; |
| | | return SendMessage(hWnd, LVM_SETITEM_, 0, (LPARAM)&lvi); |
| | | } |
| | | |
| | | static int SetItemText(HWND hWnd, int nIndex, lvitem lvi) |
| | | { |
| | | int LVM_FIRST_ = 0x1000; |
| | | int LVM_SETITEMTEXT_ = LVM_FIRST_ + 116; |
| | | return SendMessage(hWnd, LVM_SETITEMTEXT_, nIndex, (LPARAM)&lvi); |
| | | } |
| | | |
| | | static int InsertColumn(HWND hWnd, int nCol, int nFormat, int nWidth, string label, int nSubItem)//å¢å å |
| | | { |
| | | lvcolumn lvc; // å |
| | | // ZeroMemory(&lvc, sizeof(lvcolumn)); |
| | | |
| | | int LVCF_FMT_ = 0x0001; |
| | | int LVCF_WIDTH_ = 0x0002; |
| | | int LVCF_TEXT_ = 0x0004; |
| | | int LVCF_SUBITEM_ = 0x0008; |
| | | int LVCFMT_LEFT_ = 0x0000; |
| | | lvc.mask = LVCF_FMT_ | LVCF_TEXT_ | LVCF_WIDTH_ | LVCF_SUBITEM_; // 飿 ¼ |
| | | lvc.fmt = nFormat;//ææ¬å·¦å¯¹é½ |
| | | lvc.cx = nWidth; // cx æ¯åç宽度ï¼ä»¥åç´ ç¹ä¸ºåä½ï¼ã以忍å¯ä»¥åéæ¶æ¯LVM_SETCOLUMNWIDTH æ¥æ¹ååç宽度ã |
| | | lvc.pszText = (LPWSTR)label; // æå |
| | | lvc.cchTextMax = 255; // æåé¿åº¦ |
| | | lvc.iSubItem = nSubItem; // åå· |
| | | |
| | | int LVM_FIRST_ = 0x1000;// ListView messages |
| | | int LVM_INSERTCOLUMN_ = LVM_FIRST_ + 97; |
| | | return SendMessage(hWnd, LVM_INSERTCOLUMN_, nCol, (LPARAM)&lvc); |
| | | //lvc.pszText = "å
å使ç¨"; |
| | | //SendMessage(hWnd, LVM_INSERTCOLUMN_, 0, (LPARAM_)&lvc); |
| | | //lvc.pszText = "ID"; |
| | | //SendMessage(hWnd, LVM_INSERTCOLUMN_, 0, (LPARAM_)&lvc); |
| | | |
| | | } |
| | | static int InsertItem(HWND hWnd, int nItem, int nSubItem, string label, int pictureindex)//å¢å è¡ |
| | | { |
| | | lvitem lvi; // å |
| | | // ZeroMemory(&lvi, sizeof(lvitem)); |
| | | |
| | | int LVIF_TEXT_ = 0x0001; |
| | | int LVIF_IMAGE_ = 0x0002; |
| | | int LVIF_PARAM_ = 0x0004; |
| | | int LVIF_STATE_ = 0x0008; |
| | | |
| | | int MAX_PATH_ = 255; |
| | | int LVIS_STATEIMAGEMASK_ = 0xF000; |
| | | int LVIS_FOCUSED_ = 0x0001; |
| | | int LVIS_SELECTED_ = 0x0002; |
| | | lvi.mask = LVIF_TEXT_ | LVIF_IMAGE_ | LVIF_STATE_ | LVIF_PARAM_; // æåãå¾ç// æ©ç ä½çç»åï¼ä¸é¢æå¯¹åºæ©ç çå
ç´ é½å·²å¨æ¬å·ä¸æ åºæ©ç ï¼ï¼è¡¨æåªäºå
ç´ æ¯ææç |
| | | lvi.iItem = nItem; //è¡å· |
| | | lvi.iSubItem = nSubItem; //åå· |
| | | lvi.pszText = (LPWSTR)label; |
| | | lvi.cchTextMax = 255; // æåé¿åº¦ |
| | | lvi.iImage = pictureindex; |
| | | lvi.state = LVIS_FOCUSED_; // ç¶æï¼ä¸é¢ä¼ååºãï¼LVIF_STATEï¼ |
| | | lvi.stateMask = LVIS_STATEIMAGEMASK_;// ç¶ææ©ç ï¼ç¨æ¥è¯´æè¦è·åæè®¾ç½®åªäºç¶æã |
| | | int LVM_FIRST_ = 0x1000;// ListView messages |
| | | int LVM_INSERTITEM_ = LVM_FIRST_ + 77; |
| | | return SendMessage(hWnd, LVM_INSERTITEM_, 0, (LPARAM)&lvi); |
| | | //lvi.pszText = "æ¥æ¬"; |
| | | //SendMessage(hWnd, LVM_INSERTITEM_, 0, (LPARAM_)&lvi); |
| | | //lvi.pszText = "å¾·å½"; |
| | | //SendMessage(hWnd, LVM_INSERTITEM_, 0, (LPARAM_)&lvi); |
| | | } |
| | | |
| | | static string GetItemText(HWND hWnd, int nIndex) |
| | | { |
| | | int LVM_FIRST_ = 0x1000; |
| | | int LVM_GETITEMTEXT_ = LVM_FIRST_ + 115; |
| | | int LVIF_TEXT_ = 0x0001; |
| | | |
| | | lvitem lvi; |
| | | lvi.mask = LVIF_TEXT_; |
| | | lvi.iItem = nIndex; |
| | | lvi.pszText = new wchar_t[255]; |
| | | lvi.cchTextMax = 255; |
| | | int ret = SendMessage(hWnd, LVM_GETITEMTEXT_, nIndex, (LPARAM)&lvi); |
| | | //trace("result: %s", ret.toString()); |
| | | return lvi.pszText; |
| | | } |
| | | |
| | | /*static int AddItem(HWND hWnd,string label, int pictureindex = 0) //åååå¾ç |
| | | { |
| | | int LVM_FIRST_ = 0x1000; |
| | | int LVM_INSERTITEM_ = LVM_FIRST_ + 77; |
| | | lvitem pitem; |
| | | pitem.iItem = 0; |
| | | pitem.iSubItem = 0; |
| | | pitem.pszText = label; |
| | | pitem.iImage = pictureindex; |
| | | |
| | | return win__::SendMessage(hWnd, LVM_INSERTITEM_, 0, &pitem); |
| | | } |
| | | |
| | | static int AddItem(HWND hWnd,lvitem hItem) |
| | | { |
| | | int LVM_FIRST_ = 0x1000; |
| | | int LVM_INSERTITEM_ = LVM_FIRST_ + 77; |
| | | return win__::SendMessage(hWnd, LVM_INSERTITEM_, 0, &hItem); |
| | | } |
| | | |
| | | |
| | | static int InsertItem(HWND hWnd,int nIndex,lvitem hItem )//more than the label and picture index need to be specified |
| | | { |
| | | int LVM_FIRST_ = 0x1000; |
| | | int LVM_INSERTITEM_ = LVM_FIRST_ + 77; |
| | | return win__::SendMessage(hWnd, LVM_INSERTITEM_, 0, &hItem); |
| | | } |
| | | |
| | | static int Sort (HWND hWnd,int hItem ,string sorttype ) |
| | | { |
| | | } |
| | | |
| | | //------- |
| | | static int AddLargePicture() |
| | | { |
| | | } |
| | | static int AddStatePicture() |
| | | { |
| | | } |
| | | static int DeleteLargePicture(int nIndex) |
| | | { |
| | | } |
| | | static int DeleteLargePictures() |
| | | { |
| | | } |
| | | static int DeleteStatePictures() |
| | | { |
| | | } |
| | | static int Drag () |
| | | { |
| | | //dragmode = Begin!ï¼Cancel!,End! |
| | | } |
| | | static int SetColumn (HWND hWnd,int nIndex,string label,string alignment,int width ) |
| | | { |
| | | }*/ |
| | | |
| | | }; |