|
hi
thanx but i want the text not the position of selected item.
how can i get it.
thanx
|
|
|
|
|
|
hi
thanx
i hav tried like this
Position pos = m_listctrl.GetFirstSelectedItemPosition();
str = m_listctrl.GetItemText(pos,1);
then it gives me error
error C2664: 'CString CListCtrl::GetItemText(int,int) const' : cannot convert parameter 1 from 'POSITION' to 'int'
how to get the current index in int format.
thanx
|
|
|
|
|
You have to use GetNextSelectedItem(Pos)to get the item index, this will return the item index as 'int', use this 'int' value in GetItemText() and assign 0(zero) to subitem if you are not using the ListCtrl in Report View
|
|
|
|
|
You have to use GetNextSelectedItem()to get the item index, this will return the item index as 'int', use this 'int' value in GetItemText() and assign 0(zero) to subitem if you are not using the ListCtrl in Report View
|
|
|
|
|
hi thanx
its working now but there is a problem..
i get the seleted string into the String variable and displaying the it in the MessageBox().
what is happing when i click on any item it shows the text but it shows the messagebox three time.
why is this happening.......plz tell me
thanx
|
|
|
|
|
aavesh wrote: what is happing when i click on any item it shows the text but it shows the messagebox three time.
It sounds as though you are responding to the LVN_ITEMCHANGED message. When you select an item, more than one item has changed at that point. Study the NMLISTVIEW structure for details.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
ok tell me which message i should pass for selecting item in listControl.
for a simple list box there is lvnselchange message.
but for a ListControl which one should i use.
thanx
|
|
|
|
|
Try this
CListCtrl::GetSelectionMark
Regards,
FarPointer
Blog:FARPOINTER
|
|
|
|
|
which message i should pass for selecting item in listControl.
|
|
|
|
|
try this
LVM_SETSELECTIONMARK
Regards,
FarPointer
Blog:FARPOINTER
|
|
|
|
|
If you are using MFC, use the CListCtrl::GetNextItem(-1, LVNI_SELECTED) method.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
will this function return me the current item ..when i tried this function it give me error
"LVS_SELECTED is uncdeclare identifier"
thanx
|
|
|
|
|
|
This is not implemented :-
LVS_SELECTED
Regards,
FarPointer
Blog:FARPOINTER
|
|
|
|
|
We have a custom control ( similar to tree control ) in which we can insert columns. In one of the columns i want to have check boxes.
I need some pointers as in how to do it as the original developer of the control is not with us.
kaps
-- modified at 6:38 Tuesday 11th July, 2006
|
|
|
|
|
hi
i want to place a wallpaper on dialog box
plz tell me code how to use wallpaper on dialog box
thanks
Ashish Dogra
MCA
Noida
|
|
|
|
|
I think you asked this question yes(i usually remember questions) Load your picture and use WM_PAINT or WM_CTLCOLOR or WM_ERASEBKGND
whitesky
|
|
|
|
|
thanks sir
but can you tell me the code for this
Ashish Dogra
MCA
Noida
|
|
|
|
|
you answerd always "can you tell me the code for this" yes
include atlImage.h
CImage m_Image;
m_Image.Load(filename);
<br />
m_Image.BitBlt(dc.m_hDC,CRect(0,0,800,600),CPoint(0,0));<br />
use this code in WM_PAINT <br />
whitesky
|
|
|
|
|
sir this will give error as
: fatal error C1083: Cannot open include file: 'AtlImage.g': No such file or directory
as i use 'AtlImage.h'
Ashish Dogra
MCA
Noida
-- modified at 6:41 Tuesday 11th July, 2006
|
|
|
|
|
You need to include AtlImage.h
whitesky
|
|
|
|
|
yes sir i include AtlImage.h plz solve my problem
Ashish Dogra
MCA
Noida
-- modified at 8:01 Tuesday 11th July, 2006
|
|
|
|
|
ashish dogra wrote: yes sir i include AtlImage.h plz solve my problem
Did you even bother to search for a solution? It is assumed that you will at least put forth some effort to go along with the suggestons you receive here.
http://www.codeguru.com/Cpp/COM-Tech/atl/graphics/article.php/c3597/[^]
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
sir plz tell me why my application does not include AtlImage.h
sirplz fast
Ashish Dogra
MCA
Noida
|
|
|
|