
powerofos
Active Members-
Posts
44 -
Joined
-
Last visited
Everything posted by powerofos
-
Hi, Everyone, i have a muliple column listview, How to get the right click position for multiple column items ? Thank you! #include <GUIConstantsEx.au3> #include <GuiListView.au3> Local $hGUI = GUICreate("How to obtain the right mouse click position for multiple column items",1000,600) Local $OK = GUICtrlCreateButton("OK", 10, 10, 85, 25) Local $ListView = GUICtrlCreateListView("",10,50,978,500) Local $hListView = GUICtrlGetHandle($ListView) For $i = 0 To 19 _GUICtrlListView_AddColumn($ListView,$i,80) Next Local $2DArray[100][20] For $i = 0 To 19 For $t = 0 To 99 $2DArray[$t][$i] = "R"&$t&" - "&"C"&$i Next Next _GUICtrlListView_AddArray($ListView,$2DArray) Local $header = _GUICtrlListView_GetHeader($ListView) GUISetState(@SW_SHOW, $hGUI) GUIRegisterMsg(0x004E,"WM_NOTIFY") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $OK Exit EndSwitch WEnd Func WM_NOTIFY($hWnd,$Msg,$wParam,$lParam) Local $tNMHDR = DllStructCreate("struct;hwnd hWndFrom;uint_ptr IDFrom;INT Code;endstruct",$lParam);$tagNMHDR Local $hWndFrom = HWnd(DllStructGetData($tNMHDR,"hWndFrom")) Local $Code = DllStructGetData($tNMHDR,"Code") Switch $hWndFrom Case $header Switch $Code Case -5;$NM_RCLICK ;Local $cID = DllStructGetData(DllStructCreate($tagNMHEADER,$lParam),"Item") Local $mPos = _WinAPI_GetMousePos(True,$hListView) Local $hID = _GUICtrlHeader_HitTest($header,DllStructGetData($mPos,"X"),DllStructGetData($mPos,"Y")) If $hID[0] = -1 Then Return MsgBox(0,"","Header RightClick:"&$hID[0]) Case $HDN_ITEMCLICK,$HDN_ITEMCLICKW Local $cID = DllStructGetData(DllStructCreate($tagNMHEADER,$lParam),"Item") MsgBox(0,"","Header LeftClick:"&$cID) EndSwitch EndSwitch EndFunc
-
How i get the specified value through StringRegExp
powerofos replied to powerofos's topic in AutoIt General Help and Support
@Luke94 Thanks, idea from Nine is good! @Nine,thanks,it's perfect for me! -
#include <MsgBoxConstants.au3> #include <StringConstants.au3> Local $aArray = 0, $iOffset = 1 Local $string = "<a>1</a><b>2</b><c>3</c><d>4</d><e>5</e>|<a>1-1</a><b>2-1</b><c>3-1</c><d>4-1</d><e>5-1</e>|<a>1-2</a><b>2-2</b><c>3-2</c><d>4-2</d><e>5-2</e>|" While 1 $aArray = StringRegExp($string, '(?i)<a>(.*?)</a><b>(.*?)</b><c>(.*?)</c><d>(.*?)</d><e>5-1</e>', $STR_REGEXPARRAYMATCH, $iOffset) If @error Then ExitLoop $iOffset = @extended For $i = 0 To UBound($aArray) - 1 MsgBox($MB_SYSTEMMODAL, "RegExp Test with Option 1 - ", $aArray[0]) Next WEnd Hello guys, how i get data from <a>?</a> where condition <e>5-1</e> in one time runing? (not in while loop?) Thanks a lot!
-
Incremental search in owner and custom drawn ListViews
powerofos replied to LarsJ's topic in AutoIt Example Scripts
All the problems I mentioned are caused by the fact that the position X of column 0 cannot be dynamically obtained (horizontal scrolling) through the function after it is changed😖 -
Incremental search in owner and custom drawn ListViews
powerofos replied to LarsJ's topic in AutoIt Example Scripts
@ pixelsearch thank you! Function: _GUICtrlHeader_GetItemRect($g_hHeader, 0) The return value of getitemrect is static. It cannot dynamically update the position data of column 0 with the operation of the horizontal scroll bar of the listview So in the last report, I mentioned that I need to get the left column ID of 0 column , and use the position of the left column ID to dynamically update, so as to deal with the problem of self drawing and redrawing caused by horizontal scrolling I'm sorry that this issue was not mentioned in the last report Have a nice weekend! -
Incremental search in owner and custom drawn ListViews
powerofos replied to LarsJ's topic in AutoIt Example Scripts
@pixelsearch Thanks a lot. As i reported before, it crash. try run it and scroll by mouse, and you will see...... -
Incremental search in owner and custom drawn ListViews
powerofos replied to LarsJ's topic in AutoIt Example Scripts
@pixelsearch @Larsj LarsJ 's solution in $NM_CUSTOMDRAW ; Stage 4 Case BitOR( $CDDS_ITEMPOSTPAINT, $CDDS_SUBITEM ) ; After a subitem has been painted If DllStructGetData( $tNMLVCustomDraw, "iSubItem" ) = $iSubItem Then Local $hDC = DllStructGetData( $tNMLVCUSTOMDRAW, "hdc" ) ; Device context If $iSubItem Then $aRect = _GUICtrlListView_GetSubItemRect( $hListView, $iItem, $iSubItem ); Subitem rectangle Else ; $iSubItem = 0, the listview item, first column ; This calculation of $aRect for the listview item is necessary to get ; things to work properly if $LVS_EX_HEADERDRAGDROP style is applied. $aRect = _GUICtrlListView_GetItemRect( $hListView, $iItem, 2 ) ; 2 - The bounding rectangle of the item text $aRect[0] -= 4 EndIf If $bNotXP And $iSubItem = 0 And $aColumnOrder[1] <> 0 Then DllStructSetData( $tRect, "Left", $aRect[0] ) ; Margin for first column if dragged to another position Else DllStructSetData( $tRect, "Left", $aRect[0]+4 ) EndIf DllStructSetData( $tRect, "Top", $aRect[1] ) DllStructSetData( $tRect, "Right", $aRect[2] ) DllStructSetData( $tRect, "Bottom", $aRect[3] ) _WinAPI_FillRect( $hDC, $tRect, $hBrush ) ; Fill subitem background _WinAPI_SetBkMode( $hDC, $TRANSPARENT ) ; Transparent background _WinAPI_SetTextColor( $hDC, 0x000000 ) ; Set black text color DllStructSetData( $tRect, "Left", DllStructGetData( $tRect, "Left" ) + 2 ) ; Adjust rectangle If $bNotXP Then DllStructSetData( $tRect, "Top", DllStructGetData( $tRect, "Top" ) + 2 ) _WinAPI_DrawText( $hDC, _GUICtrlListView_GetItemText( $hListView, $iItem, $iSubItem ), $tRect, $DT_WORD_ELLIPSIS ) ; Draw text EndIf Return $CDRF_NEWFONT ; $CDRF_NEWFONT must be returned after changing font or colors used _GUICtrlListView_GetItemRect to get rectangle position if column index is 0 i can't used it in Itemdraw message , it crash After several modifications, I use the position of a column to the left of column 0 to fix the position problem of column 0 Case $HDN_ENDDRAG GUICtrlSendToDummy($vColsDragDummy) ;----------------------------------------------- Case $vColsDragDummy $vColsOrder = _GUICtrlListView_GetColumnOrderArray($hVDListView) If $vColsOrder[1] <> 0 Then For $i = 1 To $vColsOrder[0] Step 1 If $vColsOrder[$i] = 0 Then $vColsZero_LeftID = $vColsOrder[$i-1] ExitLoop EndIf Next EndIf ;ItemDraw message:------------------------------------ Local $tSubRect = DllStructCreate("struct;long Left;long Top;long Right;long Bottom;endstruct");$tagRECT DllStructSetData($tSubRect,"Top",$iColsID) DllStructSetData($tSubRect,"Left",0);$LVIR_BOUNDS = 0 GUICtrlSendMsg($VDListView,0x1000+56,$iRowsID,DllStructGetPtr($tSubRect)) If $iColsID = 0 Then If $vColsOrder[1] <> 0 Then Local $tSub0Rect = DllStructCreate("struct;long Left;long Top;long Right;longBottom;endstruct");_GUICtrlListView_GetSubItemRect($hVDListView,$iRowsID,$vColsZero_LeftID) DllStructSetData($tSub0Rect,"Top",$vColsZero_LeftID) DllStructSetData($tSub0Rect,"Left",0);$LVIR_BOUNDS = 0 GUICtrlSendMsg($VDListView,0x1000+56,$iRowsID,DllStructGetPtr($tSub0Rect)) DllStructSetData($tSubRect,"Left",DllStructGetData($tSub0Rect,"Right")) EndIf DllStructSetData($tSubRect,"Right",DllStructGetData($tSubRect,"Left")+GUICtrlSendMsg($VDListView,0x1000+29,0,0));$LVM_GETCOLUMNWIDTH EndIf Any other good idea ? -
Incremental search in owner and custom drawn ListViews
powerofos replied to LarsJ's topic in AutoIt Example Scripts
@pixelsearch Hi, thanks for your example! is $LVS_EX_HEADERDRAGDROP style acceptable? i found a problem about Zero column draged. column 0 rectangle is not correct after dragged to other column position, especially horizontal direction listview croll. both : _GUICtrlListView_GetSubItemRect and _GUICtrlListView_GetItemRect can't get the correct positon of column zero, any other idea about this question? -
SQLite Virtual Listview, WM_DRAWITEM questions
powerofos replied to powerofos's topic in AutoIt General Help and Support
Hi Larsj, Thank you for your reply! Through your explanation, I don't think I have the ability to deal with this problem, so I changed to another way. Instead of reading data directly from the database, I read the data to the array first, and then use the drawitem message to draw it down,include the image. The following rar package is an example that I modified from yours, can you help me improve it or give me any suggestion? Thank you! @Larsj Image Virtual Listview(WM_DrawItem).rar -
Hello everyone! I got a problem in making a SQL Virtual listview image tool, The images are stored in binary and I need to read and display them in a virtual listview, Listview style: $LVS_ OWNERDATA and $LVS_ OWNERDRAWFIXED, not Imagelist method Data Array I got from $LVN_ODCACHEHINT(Virtual listview) is not match when I scrolled up or down listview ctrl, so WM_DRAWITEM report errors My test script are in rar package below. Thank you very much! @LarsJ #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 ;#AutoIt3Wrapper_UseX64=y #include <GUIConstants.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> #include <SQLite.au3> Opt( "MustDeclareVars", 1 ) Global Const $ODT_LISTVIEW = 102 Global Const $ODA_DRAWENTIRE = 0x1 Global Const $ODA_SELECT = 0x2 Global Const $ODA_FOCUS = 0x4 Global Const $ODS_SELECTED = 0x0001 Global $pTable, $iCols, $hLV, $array _SQLite_Startup() _SQLite_Open( "random_data.db" ) Global $iRows Global $sSQL = "SELECT * FROM RandomData;" _SQLite_GetTableEx( -1, $sSQL, $pTable, $iRows, $iCols ) $pTable += $iCols * ( @AutoItX64 ? 8 : 4 ) GUICreate( "Virtual ListView", 1650, 800 ) Global $idLV = GUICtrlCreateListView( "", 10, 10, 1650-20, 800-20, $LVS_OWNERDATA+$LVS_OWNERDRAWFIXED, BitOR( $WS_EX_CLIENTEDGE, $LVS_EX_DOUBLEBUFFER, $LVS_EX_FULLROWSELECT ) ) $hLV = GUICtrlGetHandle( $idLV ) ; Virtual listview Reduces flicker For $i = 0 To $iCols - 1 _GUICtrlListView_AddColumn( $idLV, "Col" & $i, 160 ) Next GUIRegisterMsg($WM_DRAWITEM, "WM_DRAWITEM") GUICtrlSendMsg( $idLV, $LVM_SETITEMCOUNT, $iRows, 0 ) GUIRegisterMsg( $WM_NOTIFY, "WM_NOTIFY" ) GUISetState( @SW_SHOW ) HotKeySet("{F1}","RowsCount") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd $pTable -= $iCols * ( @AutoItX64 ? 8 : 4 ) _SQLite_FreeTable( $pTable ) _SQLite_Close() _SQLite_Shutdown() Func RowsCount() ;ToolTip(UBound($array,1)) _ArrayDisplay($array) EndFunc Func WM_DRAWITEM($hWnd, $Msg, $wParam, $lParam) #forceref $hWnd, $Msg, $wParam Local $tagDRAWITEMSTRUCT, $cID, $itmID, $itmAction, $hDC $tagDRAWITEMSTRUCT = DllStructCreate( _ "uint cType;" & _ "uint cID;" & _ "uint itmID;" & _ "uint itmAction;" & _ "uint itmState;" & _ "hwnd hItm;" & _ "handle hDC;" & _ "long itmRect[4];" & _ "ulong_ptr itmData" _ , $lParam) If DllStructGetData($tagDRAWITEMSTRUCT, "cType") <> $ODT_LISTVIEW Then Return $GUI_RUNDEFMSG $cID = DllStructGetData($tagDRAWITEMSTRUCT, "cID") $itmID = DllStructGetData($tagDRAWITEMSTRUCT, "itmID") $itmAction = DllStructGetData($tagDRAWITEMSTRUCT, "itmAction") $hDC = DllStructGetData($tagDRAWITEMSTRUCT, "hDC") Local $itmState = DllStructGetData($tagDRAWITEMSTRUCT, "itmState") ;Local $hItm = DllStructGetData($tagDRAWITEMSTRUCT, "hItm") Local $bSelected = BitAND($itmState, $ODS_SELECTED),$iBrushColor Switch $cID ; will look for ControlID, not window handle. Case $idLV Switch $itmAction Case $ODA_DRAWENTIRE ;#cs ; don't forget, this is BGR, not RGB If $itmState = $bSelected Then ; item is not selected $iBrushColor = 0xCCEECC Else ; item is selected $iBrushColor = 0xEEDDBB EndIf Local $aBrush = DllCall("gdi32.dll", "hwnd", "CreateSolidBrush", "int", $iBrushColor) Local $aBrushOld = _WinAPI_SelectObject($hDC, $aBrush[0]) Local $iLeft = DllStructGetData($tagDRAWITEMSTRUCT, "itmRect", 1) DllStructSetData($tagDRAWITEMSTRUCT, "itmRect", $iLeft + 1, 1) ; rectangle coordinates for coloring ;+1 is the left margin _WinAPI_FillRect($hDC, DllStructGetPtr($tagDRAWITEMSTRUCT, "itmRect"), $aBrush[0]) _WinAPI_SelectObject($hDC, $aBrushOld) _WinAPI_DeleteObject($aBrush[0]) ;#ce ;For $i = 0 To _GUICtrlListView_GetColumnCount($hLV) - 1 For $i = 0 To UBound($array,2) - 1 ; 1. get subitem text: Local $iSubItmText = $array[$itmID][$i];_GUICtrlListView_GetItemText($hLV, $itmID, $i) ; 2. get subitem coordinates for drawing its respective text Local $aSubItmRect = _GUICtrlListView_GetSubItemRect($hLV, $itmID, $i) ; the function above accepts not only subitems (one-based index), but also main item (index=0) ; 3. pass the coordinates to a DLL struct Local $iSubItmRect = DllStructCreate("long[4]") DllStructSetData($iSubItmRect, 1, $aSubItmRect[0] + 6, 1) ; +6 is left margin (X) DllStructSetData($iSubItmRect, 1, $aSubItmRect[1] + (-2), 2) ; + (-2) is upper margin (Y) DllStructSetData($iSubItmRect, 1, $aSubItmRect[2], 3) DllStructSetData($iSubItmRect, 1, $aSubItmRect[3], 4) DllCall("user32.dll", "int", "DrawTextW", "hwnd", $hDC, "wstr", $iSubItmText, "int", StringLen($iSubItmText), _ "ptr", DllStructGetPtr($iSubItmRect), "int", $DT_LEFT ) ;_WinAPI_DrawText ( $hDC, $iSubItmText, $iSubItmRect, $DT_WORD_ELLIPSIS +$DT_LEFT ) #cs ; Load image Local $hSource = _WinAPI_LoadImage(0, @ScriptDir & '\1.bmp', $IMAGE_BITMAP, 0, 0, $LR_LOADFROMFILE) Local $hDestDC = _WinAPI_CreateCompatibleDC($hDC) Local $hBitmap = _WinAPI_CreateCompatibleBitmap($hDC, @DesktopWidth, @DesktopHeight) Local $hDestSv = _WinAPI_SelectObject($hDestDC, $hBitmap) _WinAPI_DrawBitmap($hDC, 10,10, $hSource) #ce Next EndSwitch EndSwitch ;#ce Return $GUI_RUNDEFMSG EndFunc ;==>WM_DRAWITEM Func WM_NOTIFY( $hWnd, $iMsg, $wParam, $lParam ) Static $iPtrSize = @AutoItX64 ? 8 : 4, $hDLL = DllOpen( "kernel32.dll" ), $aDisplay[100][$iCols], $iFrom, $iTo ;Static $tText = DllStructCreate( "wchar[4094]" ), $pText = DllStructGetPtr( $tText ) ;Static $tagNMLVCACHEHINT = $tagNMHDR & ";int iFrom;int iTo" Local $tNMHDR, $hWndFrom, $iCode $tNMHDR = DllStructCreate( $tagNMHDR, $lParam ) $hWndFrom = HWnd( DllStructGetData( $tNMHDR, "hWndFrom" ) ) $iCode = DllStructGetData( $tNMHDR, "Code" ) Switch $hWndFrom Case $hLV Switch $iCode Case $LVN_GETDISPINFOW #cs Local $tNMLVDISPINFO = DllStructCreate( $tagNMLVDISPINFO, $lParam ) If Not BitAND( DllStructGetData( $tNMLVDISPINFO, "Mask" ), 1 ) Then Return ; 1 = $LVIF_TEXT Local $iItem = DllStructGetData( $tNMLVDISPINFO, "Item" ) - $iFrom If $iItem < 0 Or $iItem > $iTo - $iFrom Then Return Local $iSubItem = DllStructGetData($tNMLVDISPINFO,"SubItem") Local $sItem = $aDisplay[$iItem][$iSubItem] Local $l = StringLen( $sItem ) DllStructSetData( $tText, 1, $sItem ) DllStructSetData( $tNMLVDISPINFO, "Text", $pText ) DllStructSetData( $tNMLVDISPINFO, "TextMax", ( $l <= 4094 ? $l : 4094 ) ) Return #ce Case $LVN_ODCACHEHINT ;Local $tNMLVCACHEHINT = DllStructCreate( $tagNMLVCACHEHINT, $lParam ) ;$iFrom = DllStructGetData( $tNMLVCACHEHINT, "iFrom" ) ;$iTo = DllStructGetData( $tNMLVCACHEHINT, "iTo" ) $iFrom = _GUICtrlListView_GetTopIndex ( $idLV ) $iTo = $iFrom+39 If $iTo > $iRows-1 Then $iTo = $iRows-1 ;ToolTip($iFrom&" - "&$iTo) Local $pFrom, $pStr, $iLen, $tWstr For $i = $iFrom To $iTo $pFrom = $pTable + $i * $iCols * $iPtrSize For $j = 0 To $iCols - 1 $pStr = DllStructGetData( DllStructCreate( "ptr", $pFrom + $j * $iPtrSize ), 1 ) $iLen = DllCall( $hDLL, "int", "MultiByteToWideChar", "uint", 65001, "dword", 0, "ptr", $pStr, "int", -1, "ptr", 0, "int", 0 )[0] $tWstr = DllStructCreate( "wchar[" & $iLen & "]" ) DllCall( $hDLL, "int", "MultiByteToWideChar", "uint", 65001, "dword", 0, "ptr", $pStr, "int", -1, "struct*", $tWstr, "int", $iLen ) $aDisplay[$i-$iFrom][$j] = DllStructGetData( $tWstr, 1 ) Next Next ;ToolTip(_GUICtrlListView_GetTopIndex ( $idLV )&" - "&_GUICtrlListView_GetNumberOfWorkAreas( $idLV )&" - "&$iFrom&" - "&$iTo) $array = $aDisplay Return EndSwitch EndSwitch Return $GUI_RUNDEFMSG #forceref $hWnd, $iMsg, $wParam EndFunc Func _SQLite_GetTableEx( $hDB, $sSQL, ByRef $pTable, ByRef $iRows, ByRef $iCols ) If __SQLite_hChk($hDB, 2) Then Return SetError(@error, 0, $SQLITE_MISUSE) Local $tSQL8 = __SQLite_StringToUtf8Struct($sSQL) If @error Then Return SetError(3, @error, 0) Local $avRval = DllCall($__g_hDll_SQLite, "int:cdecl", "sqlite3_get_table", _ "ptr", $hDB, _ ; An open database "struct*", $tSQL8, _ ; SQL to be executed "ptr*", 0, _ ; Results of the query "int*", 0, _ ; Number of result rows "int*", 0, _ ; Number of result columns "long*", 0) ; Error msg written here If @error Then Return SetError(1, @error, $SQLITE_MISUSE) ; DllCall error $pTable = $avRval[3] $iRows = $avRval[4] $iCols = $avRval[5] EndFunc Func _SQLite_FreeTable( $pTable ) DllCall($__g_hDll_SQLite, "int:cdecl", "sqlite3_free_table", "ptr", $pTable) If @error Then Return SetError(1, @error, $SQLITE_MISUSE) ; DllCall error EndFunc SQL - Virtual listview custom draw.rar
-
Virtual listviews for huge number of rows
powerofos replied to LarsJ's topic in AutoIt Example Scripts
Hi LarsJ, Please refer to the attachment. Question is based on the virtual listview database model. 1. How to fix the customdraw problem? 2. In order to get the listview subitem ID, I have to regist the listview callback function, any other good idea? 3. How to get Item/subitem data form virtual listview in NM_CLICK? Thanks Regards Virtual listview customdraw problem.rar -
UDF: IconImage.au3 problem
powerofos replied to powerofos's topic in AutoIt General Help and Support
Hi, Problem is still not be solved。。 -
Dear all, I got a problem of Iconimage.au3 UDF. I want to write a File browser, so i used a Icon style listview control, with the help of iconimage UDF, it's very convenient。 but please check my sample scipt, when i press F3 hotkey quickly, why there is different listview item count on listview control ? Thanks for your reply, ZQY #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> #include <GuiImageList.au3> #include "IconImage.au3" #include "Binary.au3" Opt("GUIOnEventMode",1) Global $w = 128,$h = 128 Global $hGUI = GUICreate("Example", 1500, 900) GUISetOnEvent($GUI_EVENT_CLOSE,"_exit") Global $g_hListView = GUICtrlCreateListView('', 2, 10, 1494, 868) _GUICtrlListView_SetView($g_hListView,0) ;_GUICtrlListView_SetIconSpacing($g_hListView,200,200) Global $hImage = _GUIImageList_Create($w,$h,5) _GUICtrlListView_SetImageList($g_hListView, $hImage, 0) _WinAPI_GetDefineWH_IconFromFile($g_hListView,$hImage,"D:\....\excel.xlsx",$w,$h) ; define file fullpath _WinAPI_GetDefineWH_IconFromFile($g_hListView,$hImage,"D:\....\coreldra.cdr",$w,$h) ; define file fullpath GUISetState(@SW_SHOW, $hGUI) HotKeySet("{F3}","test") ; press F3 quickly , difference item coult in listview control Func _exit() Exit EndFunc While 1 Sleep(1000) WEnd Func test() _GUIImageList_Remove($hImage,-1) _GUICtrlListView_DeleteAllItems($g_hListView) _WinAPI_GetDefineWH_IconFromFile($g_hListView,$hImage,"D:\....\excel.xlsx",$w,$h) ;Press add more file here _WinAPI_GetDefineWH_IconFromFile($g_hListView,$hImage,"D:\....\excel.xlsx",$w,$h) _WinAPI_GetDefineWH_IconFromFile($g_hListView,$hImage,"D:\....\excel.xlsx",$w,$h) _WinAPI_GetDefineWH_IconFromFile($g_hListView,$hImage,"D:\....\excel.xlsx",$w,$h) _WinAPI_GetDefineWH_IconFromFile($g_hListView,$hImage,"D:\....\excel.xlsx",$w,$h) _WinAPI_GetDefineWH_IconFromFile($g_hListView,$hImage,"D:\....\excel.xlsx",$w,$h) _WinAPI_GetDefineWH_IconFromFile($g_hListView,$hImage,"D:\....\excel.xlsx",$w,$h) _WinAPI_GetDefineWH_IconFromFile($g_hListView,$hImage,"D:\....\excel.xlsx",$w,$h) EndFunc Func _WinAPI_GetDefineWH_IconFromFile($iLVCtrlID,$hImageList,$iFile,$iIconW,$iIconH) _IconImage_Startup() Local $iIconImage,$iIconScale,$hIcon ;#cs Switch _WinAPI_PathFindExtension($iFile) Case ".png",".jpg",".bmp",".tif",".gif",".tiff" $iIconImage = _IconImage_FromImageFile($iFile) Case Else $iIconImage = _IconImage_FromPath($iFile,$iIconW,$iIconH) ;$iIconImage = _WinAPI_ShellExtractAssociatedIcon($iFile,False) EndSwitch ;#ce ;$iIconImage = _WinAPI_ShellExtractAssociatedIcon($iFile,False) $iIconScale = _IconImage_Scale($iIconImage,$iIconW,$iIconH,$GDIP_ModeHighQuality) $hIcon = _IconImage_ToHandle($iIconScale,$iIconW,$iIconH) Local $Index = _GUIImageList_ReplaceIcon($hImageList, -1, $hIcon) Local $icount = _GUICtrlListView_GetItemCount($iLVCtrlID)+1 _GUICtrlListView_AddItem($iLVCtrlID, "Item"&$icount, $Index) _WinAPI_DestroyIcon($hIcon) _IconImage_Shutdown() EndFunc TestScript.rar
-
Control WIN10 On screen keyboard for my apps
powerofos replied to powerofos's topic in AutoIt General Help and Support
Yeah, unfortunately, WIN10 HOME EDIT 1703 doesn't work !!! Thanks Subz -
Control WIN10 On screen keyboard for my apps
powerofos replied to powerofos's topic in AutoIt General Help and Support
Hi Subz, As they say: "In Windows 8 and Windows 10 before Anniversary update it was possible to show touch keyboard by starting C:\Program Files\Common Files\microsoft shared\ink\TabTip.exe It no longer works in Windows 10 Anniversary update; the TabTip.exe process is running, but the keyboard is not shown" Just refer the links i posted in 1# Regards Thank you! ZQY -
Control WIN10 On screen keyboard for my apps
powerofos replied to powerofos's topic in AutoIt General Help and Support
yeah, you are right! it seems much difficult for me! -
Control WIN10 On screen keyboard for my apps
powerofos replied to powerofos's topic in AutoIt General Help and Support
My apps is designd for someone signature, because i can't achieve the wacam pen function, so tabtip.exe is my second choice. I remember @UEZ wrote a script can draw on screen directly, but i can't found it! -
Control WIN10 On screen keyboard for my apps
powerofos replied to powerofos's topic in AutoIt General Help and Support
My tablet pc is lenovo miix520, with touch screen and wacam pen. win10 home edition. OSK.exe do not have wacam pen funtion, so it's not suitable for apps. i wonder, can GDI+ do the jobs likes wacam pen? maybe @UEZ can help! -
Control WIN10 On screen keyboard for my apps
powerofos replied to powerofos's topic in AutoIt General Help and Support
Hi Bilgus, Thanks for your reply, the method your provide i had tried a weeks ago , but i felt nothing difference. regards ZQY -
Hi, everyone, My first programing language is AUTOIT3, so i do not know much about C# language. What i want to do is control WIN10 on screen keyboard for my apps, control it show and hide. Just execute tabtip.exe can call it appear, it's easy in WIN7, WIN8, but not work in win10, it works : _WinAPI_FindWindow("IPTip_Main_Window","") but how can i make it appear? except use the mouseclick function to click its trayicon? After searching ,i got this: https://stackoverflow.com/questions/38774139/show-touch-keyboard-tabtip-exe-in-windows-10-anniversary-edition anybody makes it for au3 ? Thanks. ZQY Regards!
-
AutoPopKeyboard - exclude windows by class
powerofos replied to johnnyzero's topic in AutoIt General Help and Support
<snip> Hey guys, I appreciate your code, but its not works right now, my tablet pc is lenovo miix520, system; win10 HOME edition, can you figure out what happens? regards, ZQY -
Hi Melba23, listview with _GUIImageList_Create, i mean every rows with a define image, drag and drop function can use? attach file for detail, thank you very much! Best regards Ansels image listview drag test.rar
-
Thank you Kim.Y
-
Thanks M23. Kim.Y