Sign in to follow this  
Followers 0
Danyfirex

[Solved] Diferents contextmenu on diferents listviews?

8 posts in this topic

#1 ·  Posted (edited)

Hi I making this simple script. But I wanted to put another context menu in the second listview of my form2.

When I click on "Form2" in my context menu go to seconnd form with a listview, but I don't know how to do to put a context menu too.

I hope you onderstand.

here my code:

#include <GuiMenu.au3>
#include <WindowsConstants.au3>
#include <GuiConstantsEx.au3>
#include <GuiListView.au3>
#include <GuiImageList.au3>
Opt("GUIOnEventMode", 1)

;>>>>>>>>>>>>>>>>>>>>>>>>>>>> Global variables <<<<<<<<<<<<<<<<<<<<<<<<<<<<

Global $hGUI2
Global Enum $actualizar=1000,$openfolder, $openkey, $borrarfile, $borrarkey, $borrarkeyyfile,$carpetasinicio,$acercade


;>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Principal <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<


$hGUI = GUICreate('Programas de Inicio', 600, 300,-1,-1)
$hListView = _GUICtrlListView_Create($hGUI, "", 2, 2, 594, 250)
_GUICtrlListView_SetExtendedListViewStyle($hListView, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES))
GUICtrlCreateButton("Actualizar", 260, 265, 70,25)
GUICtrlSetOnEvent(-1, "Actualizar")
GUISetOnEvent($GUI_EVENT_CLOSE, "Cerrarme")

GUISetState()


;>>>>>>>>>>>>>> Registramos la función <<<<<<<<<<<<<<<<<<<<
GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")


; >>>>>>>>>>>>>>>>>>>>>>>>>> Columnas <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
_GUICtrlListView_InsertColumn($hListView, 0, "Clave", 50)
_GUICtrlListView_InsertColumn($hListView, 1, "Nombre", 150)
_GUICtrlListView_InsertColumn($hListView, 2, "Datos", 500)
_GUICtrlListView_InsertColumn($hListView, 3, "Estado", 60)
_GUICtrlListView_InsertColumn($hListView, 4, "clave", 0)



;>>>>>>>>>>>>>>>>>>>>>> Listamos <<<<<<<<<<<<<<<<<<<<<<
listar()

GUISetState()

; >>>>>>>>>>>>>>>>>>>>>>> bucle <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
While 1
Sleep(10)
WEnd



;>>>>>>>>>>>>>>>>>>>>>> Menu Contectual <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Func ListView_RClick()
Local $mipost,$rutaarchivo,$rutakey,$nombrekey,$estado

$mipost = _GUICtrlListView_SubItemHitTest($hListView)
If ($mipost[0] <> -1) Then


;>>>>>>>>>>>>>>>>>>>>>>>>>> Menu Contextual <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<


$hMenu = _GUICtrlMenu_CreatePopup()
_GUICtrlMenu_AddMenuItem($hMenu, "Actualizar", $actualizar)
_GUICtrlMenu_AddMenuItem($hMenu, "Abrir Carpeta", $openfolder)
_GUICtrlMenu_AddMenuItem($hMenu, "Abrir en Registro", $openkey)
_GUICtrlMenu_AddMenuItem($hMenu, "Borrar Archivo", $borrarfile)
_GUICtrlMenu_AddMenuItem($hMenu, "Borrar Clave", $borrarkey)
_GUICtrlMenu_AddMenuItem($hMenu, "Borrar Clave+Archivo",$borrarkeyyfile)
_GUICtrlMenu_AddMenuItem($hMenu, "Abrir Carpetas de Inicio",$carpetasinicio)
_GUICtrlMenu_AddMenuItem($hMenu, "Form2", $acercade)
;>>>>>>>>>>>>>>>>>>> Seleccion Menu Contextual <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Switch _GUICtrlMenu_TrackPopupMenu($hMenu, $hListView, -1, -1, 1, 1, 2)

Case $actualizar
;Actualizamos la Lista
_GUICtrlListView_DeleteAllItems($hListView)
Listar()


Case $openfolder
;abrimos la Carpeta

$rutaarchivo=_GUICtrlListView_GetItemText($hListView, $mipost[0],2)
$rutaarchivo=StringRegExpReplace($rutaarchivo, '"?(.+\.\H*).*"?', '\1')
$rutaarchivo=Dir($rutaarchivo)
ShellExecute($rutaarchivo)


Case $openkey
;abrimos la clave en regedit
$rutakey=_GUICtrlListView_GetItemText($hListView, $mipost[0],4)
_RegJump($rutakey)


Case $borrarfile
;borramos Archivo
$estado=_GUICtrlListView_GetItemText($hListView, $mipost[0],3)
$rutaarchivo=_GUICtrlListView_GetItemText($hListView, $mipost[0],2)
$rutaarchivo=StringReplace($rutaarchivo,'"','')
$rutaarchivo=StringRegExpReplace($rutaarchivo, '"?(.+\.\H*).*"?', '\1')
If $estado="Existe" Then
if filedelete($rutaarchivo) Then
_GUICtrlListView_DeleteAllItems($hListView)
Listar()
Else
Msgbox(0,"Error","No se Pudo borrar " & $rutaarchivo)
EndIf
Else
msgbox(0,"","El Archivo no Existe")
EndIf


Case $borrarkey
;borramos clave de registro
$rutakey=_GUICtrlListView_GetItemText($hListView, $mipost[0],4)
$nombrekey=_GUICtrlListView_GetItemText($hListView, $mipost[0],1)
if RegDelete($rutakey,$nombrekey) Then
_GUICtrlListView_DeleteAllItems($hListView)
Listar()
Else

msgbox(0,"Error","No se Pudo Borrar")
EndIf

Case $borrarkeyyfile
;borramos archivo y clave de registro
$estado=_GUICtrlListView_GetItemText($hListView, $mipost[0],3)
$rutakey=_GUICtrlListView_GetItemText($hListView, $mipost[0],4)
$nombrekey=_GUICtrlListView_GetItemText($hListView, $mipost[0],1)
$rutaarchivo=_GUICtrlListView_GetItemText($hListView, $mipost[0],2)
$rutaarchivo=StringReplace($rutaarchivo,'"','')
$rutaarchivo=StringRegExpReplace($rutaarchivo, '"?(.+\.\H*).*"?', '\1')

Select
Case $estado = "Existe"
If regdelete($rutakey,$nombrekey) Then
if filedelete($rutaarchivo) Then
_GUICtrlListView_DeleteAllItems($hListView)
Listar()
Else
Msgbox(0,"Error","No se Pudo Borrar El Archivo")
_GUICtrlListView_DeleteAllItems($hListView)
Listar()
EndIf
Else
Msgbox(0,"Error","No se Pudo Borrar La Clave")
if FileDelete($rutaarchivo) Then
_GUICtrlListView_DeleteAllItems($hListView)
Listar()
Else
Msgbox(0,"Error","No se Pudo Borrar El Archivo")
EndIf

EndIf


Case $estado = "No Existe"
if RegDelete($rutakey,$nombrekey) Then
_GUICtrlListView_DeleteAllItems($hListView)
Listar()
Else
Msgbox(0,"Error","No se Pudo Borrar La Clave")
EndIf




EndSelect

Case $carpetasinicio
ShellExecute(@StartupDir)
ShellExecute(@StartupCommonDir)

Case $acercade

Formulario2()


EndSwitch
_GUICtrlMenu_DestroyMenu($hMenu)
EndIf
EndFunc

;>>>>>>>>>>>> Función WM_NOTIFY <<<<<<<<<<<<<<<<<<<<<
Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam)
Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo
$hWndListView = $hListView
If Not IsHWnd($hListView) Then $hWndListView = GUICtrlGetHandle($hListView)

$tNMHDR = DllStructCreate($tagNMHDR, $ilParam)
$hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
$iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
$iCode = DllStructGetData($tNMHDR, "Code")
Switch $hWndFrom
Case $hWndListView
Switch $iCode
Case $NM_RCLICK
ListView_RClick()
Return 0
EndSwitch
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc




;>>>>>>>>>>>>>>>>>> Listar <<<<<<<<<<<<<<<<<<<<<
Func listar()



Local $clave[18]
local $filekey
for $a = 0 to 17


$clave[0]="HKLM\Software\Microsoft\Windows\CurrentVersion\Run"
$clave[1]="HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce"
$clave[2]="HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx"
$clave[3]="HKLM\Software\Microsoft\Windows\CurrentVersion\RunServices"
$clave[4]="HKLM\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce"
$clave[5]="HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run"
$clave[6]="HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Run"
$clave[7]="HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\RunOnce"
$clave[8]="HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\RunOnceEx"
$clave[9]="HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\RunServices"
$clave[10]="HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\RunServicesOnce"
$clave[11]="HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run"
$clave[12]="HKCU\Software\Microsoft\Windows\CurrentVersion\Run"
$clave[13]="HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce"
$clave[14]="HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnceEx"
$clave[15]="HKCU\Software\Microsoft\Windows\CurrentVersion\RunServices"
$clave[16]="HKCU\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce"
$clave[17]="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run"

Local $valoritems
$instancia = 0
While 1
$instancia += 1
$valores = RegEnumVal($clave[$a], $instancia)
If @error <> 0 Then
ExitLoop


Else
$valor=RegRead($clave[$a],$valores)
$clavereg=StringSplit($clave[$a],"\")


$filekey=StringReplace($valor,'"','')
$filekey=StringRegExpReplace($filekey, '"?(.+\.\H*).*"?', '\1')

If FileExists($filekey) then

_GUICtrlListView_AddItem($hListView, $clavereg[1], $valoritems)
_GUICtrlListView_AddSubItem($hListView, $valoritems, $valores, 1)
_GUICtrlListView_AddSubItem($hListView, $valoritems, $valor, 2)
_GUICtrlListView_AddSubItem($hListView, $valoritems, "Existe", 3)
_GUICtrlListView_AddSubItem($hListView, $valoritems, $clave[$a], 4)

Else
_GUICtrlListView_AddItem($hListView, $clavereg[1], $valoritems)
_GUICtrlListView_AddSubItem($hListView, $valoritems, $valores, 1)
_GUICtrlListView_AddSubItem($hListView, $valoritems, $valor, 2)
_GUICtrlListView_AddSubItem($hListView, $valoritems, "No Existe", 3)
_GUICtrlListView_AddSubItem($hListView, $valoritems, $clave[$a], 4)


EndIf
EndIf
$valoritems+=1
WEnd
Next

EndFunc ;==>Listar

;>>>>>>>>>>>>>>>>>>>>>>> Directorio <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
func Dir($path)
local $delimiter="\"
$array =StringSplit($path,$delimiter)
$len=UBound($array)-1
$numero= $len-1
$num=StringInStr($path,$delimiter,0,$numero)
$dir=StringMid($path,1,$num)
return $dir
EndFunc ;==>Dir

;>>>>>>>>>>>>>>>> Salto clave de registro <<<<<<<<<<<<<<<<<<<<<<<<<<<< de Yashied
Func _RegJump($sKey)

Local $Root, $Text = StringSplit($sKey, '\', 2)

If IsArray($Text) Then
$Text = $Text[0]
Else
$Text = $sKey
EndIf
Switch $Text
Case 'HKEY_CLASSES_ROOT', 'HKEY_CURRENT_USER', 'HKEY_LOCAL_MACHINE', 'HKEY_USERS', 'HKEY_CURRENT_CONFIG'
$Root = $Text
Case 'HKCR'
$Root = 'HKEY_CLASSES_ROOT'
Case 'HKCU'
$Root = 'HKEY_CURRENT_USER'
Case 'HKLM'
$Root = 'HKEY_LOCAL_MACHINE'
Case 'HKU'
$Root = 'HKEY_USERS'
Case 'HKCC'
$Root = 'HKEY_CURRENT_CONFIG'
Case Else
Return 0
EndSwitch

Local $Class = '[CLASS:RegEdit_RegEdit]', $Delay = Opt('WinWaitDelay', 0)
Local $Prev, $Result = 1

If WinExists($Class) Then
WinClose($Class)
If Not WinWaitClose($Class, '', 5) Then
$Result = 0
EndIf
EndIf
If $Result Then
$Prev = RegRead('HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit', 'Lastkey')
If @error Then
$Prev = 0
EndIf
If Not RegWrite('HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit', 'Lastkey', 'REG_SZ', StringReplace($sKey, $Text, $Root, 1)) Then
$Result = 0
Else
If Not Run('regedit.exe') Then
$Result = 0
If IsString($Prev) Then
RegWrite('HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit', 'Lastkey', 'REG_SZ', $Prev)
EndIf
EndIf
EndIf
EndIf
Opt('WinWaitDelay', $Delay)
Return $Result
EndFunc ;==>_RegJump



Func Formulario2()

$hGUI2 = GUICreate("Editar", 400, 300, -1, -1)
GUISetOnEvent($GUI_EVENT_CLOSE, "Cerrar2")
$hListView2= _GUICtrlListView_Create($hGUI2, "", 2, 2, 394, 298)
_GUICtrlListView_SetExtendedListViewStyle($hListView2, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES))
;$hButton3 = GUICtrlCreateButton("Cerrar", 160, 260, 80, 30)
GUICtrlSetOnEvent(-1, "Cerrar2")
_GUICtrlListView_InsertColumn($hListView2, 0, "Archivos Carpetas de Inicio", 390)

for $x= 1 to 100
_GUICtrlListView_AddItem($hListView2, "archivos de los direct", $x)
next

GUISetState()

EndFunc ;==>Formulario2

Func Cerrar2()

GUIDelete($hGUI2)


EndFunc ;==>

Func On_Button3()

MsgBox("", "MsgBox 2", "Test from Gui 2")

EndFunc

Func Cerrarme()

Exit

EndFunc

Func Actualizar()
_GUICtrlListView_DeleteAllItems($hListView)
Listar()
EndFunc

Sorry for my english.

Edited by Danyfirex

Share this post


Link to post
Share on other sites



You want to create sub menu?

Modified the help file example:

#include <GuiMenu.au3>
#include <GUIConstantsEx.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>

Global Enum $idOpen = 1000, $idSave, $idInfo, $idSubMenu_1, $idSubMenu_2

_Main()

Func _Main()
    ; Create GUI
    GUICreate('Menu', 400, 300)
    GUISetState()

    ; Register message handlers
    GUIRegisterMsg($WM_COMMAND, 'WM_COMMAND')
    GUIRegisterMsg($WM_CONTEXTMENU, 'WM_CONTEXTMENU')

    ; Loop until user exits
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc   ;==>_Main

; Handle WM_COMMAND messages
Func WM_COMMAND($hWnd, $iMsg, $iwParam, $ilParam)
    #forceref $hWnd, $iMsg, $ilParam
    Switch $iwParam
        Case $idOpen
            _WinAPI_ShowMsg('Open')
        Case $idSave
            _WinAPI_ShowMsg('Save')
        Case $idInfo
            _WinAPI_ShowMsg('Info')
    EndSwitch
EndFunc   ;==>WM_COMMAND

; Handle WM_CONTEXTMENU messages
Func WM_CONTEXTMENU($hWnd, $iMsg, $iwParam, $ilParam)
    #forceref $hWnd, $iMsg, $ilParam
    Local $hMenu = _GUICtrlMenu_CreatePopup()
    _GUICtrlMenu_InsertMenuItem($hMenu, 0, 'Open', $idOpen)
    _GUICtrlMenu_InsertMenuItem($hMenu, 1, 'Save', $idSave)
    _GUICtrlMenu_InsertMenuItem($hMenu, 3, '', 0)
    _GUICtrlMenu_InsertMenuItem($hMenu, 3, 'Info', $idInfo)

    Local $hContextSubMenu = _GUICtrlMenu_CreateMenu()
    _GUICtrlMenu_AddMenuItem($hMenu, 'SubMenu', 0, $hContextSubMenu)
    _GUICtrlMenu_AddMenuItem($hContextSubMenu, 'SubMenu_1', $idSubMenu_1)
    _GUICtrlMenu_AddMenuItem($hContextSubMenu, 'SubMenu_2', $idSubMenu_2)


    _GUICtrlMenu_TrackPopupMenu($hMenu, $iwParam)
    _GUICtrlMenu_DestroyMenu($hMenu)
    Return True
EndFunc   ;==>WM_CONTEXTMENU

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

You want to create sub menu?

no no.

I want to create a second contextmenu to use in the second listview on second window.

I mean this:

Posted Image

Edited by Danyfirex

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Hi,

Create a default listview by the GUICtrlCreateListView function, then create a simple context menu like this :

$cm = GUICtrlCreateContextMenu($hListView2)
GUICtrlCreateMenuItem("toto", $cm)

I have also though about converting the ListView handle to ID with the function _WinAPI_GetDlgCtrlID but I'm not able to create a context menu.

Edit : typo.

Br, FireFox.

Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

Hi,

Create a default listview by the GUICtrlCreateListView function, then create a simple context menu like this :

$cm = GUICtrlCreateContextMenu($hListView2)
GUICtrlCreateMenuItem("toto", $cm)

I have also though about converting the ListView handle to ID with the function _WinAPI_GetDlgCtrlID but I'm not able to create a context menu.

Edit : typo.

Br, FireFox.

I try so, but does't work.

Share this post


Link to post
Share on other sites

I try so, but does't work.

*sigh*

...

$hGUI2 = GUICreate("Editar", 400, 300, -1, -1)
GUISetOnEvent($GUI_EVENT_CLOSE, "Cerrar2")
$hListView2= GUICtrlCreateListView("", 2, 2, 394, 298)
_GUICtrlListView_SetExtendedListViewStyle($hListView2, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES))
;$hButton3 = GUICtrlCreateButton("Cerrar", 160, 260, 80, 30)
GUICtrlSetOnEvent(-1, "Cerrar2")
_GUICtrlListView_InsertColumn($hListView2, 0, "Archivos Carpetas de Inicio", 390)

$cm = GUICtrlCreateContextMenu($hListView2)
GUICtrlCreateMenuItem("toto", $cm)
...

Br, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

*sigh*

...

$hGUI2 = GUICreate("Editar", 400, 300, -1, -1)
GUISetOnEvent($GUI_EVENT_CLOSE, "Cerrar2")
$hListView2= GUICtrlCreateListView("", 2, 2, 394, 298)
_GUICtrlListView_SetExtendedListViewStyle($hListView2, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES))
;$hButton3 = GUICtrlCreateButton("Cerrar", 160, 260, 80, 30)
GUICtrlSetOnEvent(-1, "Cerrar2")
_GUICtrlListView_InsertColumn($hListView2, 0, "Archivos Carpetas de Inicio", 390)

$cm = GUICtrlCreateContextMenu($hListView2)
GUICtrlCreateMenuItem("toto", $cm)
...

Br, FireFox.

Thank you so much FireFox Now work perfectly.

Now I Can continue. thank you again.

Solve.

Edited by Danyfirex

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0