WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Control Manager
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

cDblClickItem Fails on SysListView32

 Keywords: cDblClickItem SysListView32 Focus

Question:

This is my trace file, the right user in the right column is getting selected "PICISSU1" but when executing the last command it is not opening this item, even though it is the one with focus?
************************************************************
*** Debug Initialized ***
==============================
Thu 8/27/2009 13:53:15
WinBatch 32 2008B
WIL DLL 6.08bhb
\\hscinstall\scripts\Code\Picis\DEV\DBEditor.exe
Windows platform: NT, version: 5.1, build: 2600 (Service Pack 2)
ErrorMode: @CANCEL
==============================

----- Extender loaded: \\hscinstall\scripts\Code\Picis\DEV\wwctl44i.dll (file version: 44037,0,0,0)

AddExtender("wwctl44i.dll")
(31) VALUE INT => 1

window1=DllHwnd('Picis DB Editor')
(31) VALUE INT => 3342484

window2=cWndByID(window1,59648)
(47) VALUE INT => 3866964

window3=cWndByID(window2,65280)
(47) VALUE INT => 1573292

window4=cWndByID(window3,59648)
(47) VALUE INT => 917918

ControlHandle=cWndByID(window4,59648)
(63) VALUE INT => 1311204

cSetFocus(ControlHandle)
(94) VALUE INT => 1

cSetTVItem(ControlHandle,"Groups, Users and Access Rights Users")
(938) VALUE INT => 1

ControlHandle=cWndByClass(window4,`SysListView32`)
(953) VALUE INT => 983422

UserList=cGetLVColText(ControlHandle,1)
(1906) VALUE STRING => "ABAZARI ABDEL-RAHMAN ABI-JAOUDEH ABISOGUN ABRAHAM ABRAMCZYK ACHILLI ACOSTA ACOSTA ADAMS ADAMS ADAMS ADANG ADDY ADEN ADESO ADRIANS AGGARWAL AGUILA AHMAD AHMAD AHMED AILAWADI AKERS AKINLI AL-AWABDY ALBRECHT ALBU ALDRIDGE ALEXANDER ALEXANDER ALEXANDER ALEXANDER ALFSON ALLAK ALLEN ALLEN ALLISON ALLMON ALOI AL-OSAIMI ALTHOFF ALTHOFF ALTSCHULER ALVARENGA AMATO ANDERSON ANDERSON ANDERSON ANDERSON ANDERSON ANDERSON ANDERSON ANDRA ANDREAS ANDREAS ANDREWS ANGELOS ANGLE ANNEX ANTON ANTONAKAKIS ANTONIO APPIAH APPLER ARCHBALD ARCHER ARDALAN ARDREY ARDRON AREGAWI ARGO ARLET ARMATAS ARMSTRONG ARNER ARNEY ARNOLD ARNOLD ARNOLD ARNOLD ARONSOHN ARRINGTON ATASSI ATTNEIGHT ATTNELEVEN ATTNFIVE ATTNFOUR ATTNNINE ATTNONE ATTNSEVEN ATTNSIX ATTNTEN ATTNTHREE ATTNTWELVE ATTNTWO AUTIO AUXIER AUZA AYERS BABCOCK BABER BABER BACZUK BAGAYOKO BAILEY BAILEY BAILEY BAILEY BAILEY BAINS BAIRD BAIRD BAJWA BAKER BAKER BAKER BAKER BAKHRU BALFOUR BALLERT BALLERT BALLEW BALLEW BALLIF BALOGUN BALTZ BANE BANH BARAZI BARBATO BARCLAY BARCLAY BARESCH BARGMANN BARKER BARKER BARKER BARKER BARKER BARNETT BARNEY BARNS BARR BARRETT BARRETT BARRETT BARROSO BARRY BARTELS BARTELT BARTH BARTKUS BARUCH BASHAM BASINA BASKETT BATES BATTISTON BATTLE BAUER BAXTER BAYAN BAYLUS BAYNHAM BEACH BEARDSLEY BEA

User1=ItemLocate("PICISSU2",UserList, @TAB)
(1922) VALUE INT => 1679

cSetLVitem(ControlHandle,User1)
(1953) VALUE INT => 1

ItemText = cGetLvFocText(ControlHandle)
(1953) VALUE STRING => "PICISSU2"

cDblClickItem(ControlHandle,User1)
(2000) VALUE INT => 1

--- Normal termination ---

;;;END OF JOB;;; 
I have also tried specifying -1 instead of the item number. no luck.
cDblClickItem(ControlHandle,-1)
The focus seems to be staying on the left side, If I manually navigate to the right side and scroll down, the right item is highlighted. I need to scroll down so the selected item is in the window, then I can double click it. Manual enter key is also not responding.

Answer:

Try adding this line
   cSendMessage(ControlHandle, 4115, User1-1, 1 )
just before calling
   cDblClickItem(ControlHandle,User1)
Depending on the style of your listview control it might cause the selected item to scroll into view so it can be double-clicked.
Article ID:   W17556
Filename:   cDblClickItem Fails on SysListView32.txt
File Created: 2017:07:28:12:58:24
Last Updated: 2009:08:27:14:29:58