hello guys,

after the Statement "select * from TABLE where TEXT like '%keyword%' "
we insert the result in the listview the BOOKS and VERSE. my question is in
listview if I double click or select one result i want to display it in Edit02=VERSE
Edit01= TEXT and combobox01=BOOKS



INVOKE SendMessage, hList, LVM_GETNEXTITEM, -1, LVNI_FOCUSED
mov lvi.iItem, eax
mov lvi.iSubItem, 0
mov lvi.imask, LVIF_TEXT
lea eax, szBuff
mov lvi.pszText, eax
mov lvi.cchTextMax, 256
INVOKE SendMessage, hList, LVM_GETITEM, 0, addr lvi



Thanks in advanced


regards,
coredump
Posted on 2003-12-02 18:43:38 by coredump
Hi corredump,

I am a little surprised. It looks like you are rather familiar with the issue. Why do you stop after retrieving the string?

Well, dblclicking in the listview will send a notify message to the mainwindow process. I assume your code is in that place. I also assume szBuff is a buffer and not a zero terminated string. You want to use the buffer three times so you have to zero the buffer each time. Your code is OK. Now you have the first column text in the buffer. You only have to send it to the proper control window.

Then go to next subitem and retriev the listview text. Send it to the proper control. Sending to combobox use CB_SELECTSTRING.

Regards
Posted on 2003-12-03 03:13:55 by minor28
hi minor28,

I got it.. Thank you so much.. but the problem is the BOOKS and the VERSE
are the only column available in the listview. how to add a hidden column in
listview?


Thank you so much.





regards,
coredump
Posted on 2003-12-03 06:06:01 by coredump
I am not sure I understand you right. If you want to add a hidden column to the listview you send message to listview to insert a column with lvc.lx=0.

Regards
Posted on 2003-12-03 07:26:55 by minor28
hi minor28,

I have two column in listview BOOKS and VERSE.
The only value I can retrieve is the BOOKS and the VERSE
value but i want to retrieve also the value of TEXT when I
dbclick the listview.But the problem is I want only Two
column to be displayed in my listview which is BOOKS
and VERSE but when I dbclick the listview it can retrieve also
the value of text.




regards,
coredump
Posted on 2003-12-03 20:33:07 by coredump
What you put in the listview you can get. Nothing else. To retrieve TEXT without a third column you have to do a new recordset with seach criteria from the listview items. However, to be sure you get the right TEXT you must be sure at least one of the seach criteria is unique. Otherwise the result can be wrong.

Another way is to create a third column with width equal to zero for the TEXT. This column is not visible unless you don't grab the column border and drag it visible. I don't know if there is an "unvisible" message to make a column forced unvisible.

Regards
Posted on 2003-12-04 10:12:47 by minor28
hi minor28,

Good Day!

Thank you. i think i will create a third column with width equal to zero for the TEXT.

:)



regards,
coredump
Posted on 2003-12-05 18:39:49 by coredump
hi minor28,

i will not create another column for TEXT coz i encounter a problem in NEXT and PREVIOUS button.I just put the value of the BOOKS in combobox and the verse
in the EDIT02 then i will call the Button01ID button to run.but my question is
"invoke SendMessage,hWnd,WM_COMMAND,Button01ID,0" is not running.

this is ShowCurrentFocus proc


INVOKE SendMessage, hList, LVM_GETNEXTITEM, -1, LVNI_FOCUSED
mov lvi.iItem, eax
mov lvi.iSubItem, 0
mov lvi.imask, LVIF_TEXT
lea eax, TheBook
mov lvi.pszText, eax
mov lvi.cchTextMax, 256
invoke SendMessage, hList, LVM_GETITEM, 0, addr lvi
invoke SendMessage,hCombobox01,CB_SELECTSTRING,0,addr TheBook
inc lvi.iSubItem
lea eax,TheVerse
mov lvi.pszText,eax
invoke SendMessage,hList,LVM_GETITEM,0,addr lvi
invoke SetWindowText,hEdit02, addr TheVerse

[b] invoke SendMessage,hWnd,WM_COMMAND,Button01ID,0 [/b] ; is not running



this is WM_COMMAND

.ELSE
mov edx,wParam
shr edx,16
.IF dx==BN_CLICKED
.IF ax==Button01ID ;Read
invoke GetWindowText,hCombobox01,ADDR SearchName,25
invoke GetWindowText,hEdit02,ADDR SearchVerse,25
.IF ax==0
invoke MessageBox,hWnd,addr NoData,addr AppName,MB_OK+MB_ICONERROR
invoke SetFocus,eax
.ELSE
invoke lstrlen,addr SearchName
mov StrLenN,eax
invoke lstrlen,addr SearchVerse
mov StrLenV,eax
invoke SetWindowText,hEdit01,NULL
mov TheID,0
mov byte ptr ds:[SearchTextString],0
mov StrLenT,0
invoke SQLExecute,hStmt
invoke FillData
invoke SQLCloseCursor,hStmt
.endif


Posted on 2003-12-07 19:56:07 by coredump
You tell the WM_COMMAND it's a menu but it is a button click.

invoke SendMessage,hWnd,WM_COMMAND,Button01ID,BN_CLICKED

Regards
Posted on 2003-12-08 02:29:17 by minor28
hi minor28,

Thank you...I have some question regarding ADD,EDIT,DELETE,UPDATE records
in ASM SQL.I'm planning to create a payroll program using ASM.I think I will learn
ASM in creating more programs.Can you help me?

Can you give some examples?
Thank you in advanced.



regards,
coredump
Posted on 2003-12-08 18:28:43 by coredump
Hi coredump

If you want to learn, you are better to try by youself. Seach on the board and the web and you will find the answers of most of you questions. If you get stuck, post a question and I am sure you get help by someone. If you don't have SQL reference, google for it as a start.

Good luck and best regards
Posted on 2003-12-09 03:58:45 by minor28
hi minor28,

Good Day!
I Agree. I will do it by myself.Thank you to all GOD BLESS.





regards,
coredump
Posted on 2003-12-09 18:38:43 by coredump