|
did you try GetDlgItemText(IDC_LIST1);
|
|
|
|
|
thanks for your reply.
I tried like the
1.with the click function of the list control i tried the way you told
GetDlgItemText(IDC_LIST1,variable);
but the value returned to the variable is LIST1.
is there any events for capturing the text in list control.like i saw one for capturing the entire row if i click on it
|
|
|
|
|
Deepu Antony wrote: GetDlgItemText(IDC_LIST1,variable);
CListBox::GetText
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
ThatsAlok wrote: CListBox::GetText
For a list control?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote:
ThatsAlok wrote:
CListBox::GetText
For a list control?
Sorry my Mistake, it should be CListCtrl::GetItemText
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Of course I think you show that your answer is CListBox.;P
ThatsAlok wrote: CListBox::GetText
|
|
|
|
|
Well, because you mention columns, presumably you are dealing with a ListViewControl and not a ListBox, so try something like this:
TCHAR pszText[_MAX_PATH];<br />
LVITEM lvi = { 0 };<br />
lvi.mask = LVIF_TEXT;<br />
lvi.pszText = pszText;<br />
lvi.cchTextMax = _MAX_PATH;<br />
lvi.iItem = 0;
lvi.iSubItem = 0;
SendMessage(hwndList,LVM_GETITEM,(WPARAM)0,(LPARAM)(LPLVITEM)&lvi);
lvi.pszText may not be still pointing to pszText upon return.
|
|
|
|
|
Roger Broomfield wrote: ...you are dealing with a ListViewControl and not a ListBox...
Wasn't that much obvious from the subject?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Well yes I thought it was, but I also thought I had better state the obvious, just in case the other 3 were right.
|
|
|
|
|
Thanks a lot .. i was able to solve it....
|
|
|
|
|
Thanks for your reply ..
but im getting an error
error C2065: 'hWndList' : undeclared identifier
How do I have to declare this?
Thanks.
|
|
|
|
|
If you are using MFC, you should have a CListBox member variable associated with the listbox control. Use its GetItem() method instead.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
I have a csplitterWnd based class with 2 view and one view contains cscrollview along with some other controls. My problem is when i set the scroll sizes of the scrollview i sometimes get an unnecessary vertical scroll bar. This scrollbar disappears as soon as i move the split. Remember the splitter view is not direct child of the csplitterwnd class. But i still tried to call the recalclayout of the csplitterwnd when ever i change the scrollsizes of the cscrollview. But the scrollbar is still there. Any suggestions please!
|
|
|
|
|
Take a look into ResizeToFit or try to SetScrollSizes with a lower value.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
how to create a window which will reside inside MDI frame other than views..
for example: can i create a dialog inside MDI Frame window , which will reside in it.PLz help
|
|
|
|
|
a modeless dialog will do that. Look for CDialog::Create()
Greetings from Germany
|
|
|
|
|
Thanks for replyin..
i have tried it ... but when i move my MDI frame it doesn't move along with it..
it gets out of MDI frame area...
i want it inside the frame..
|
|
|
|
|
A dialog box will have a different frame. Better create new Window being child of the active one.
Diference between Modal and NonModal is if you are allowed to make another things while the dialog is active, but has nothing to do with your question.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Hello,
Is there a decent way to check if the user currently logged in is the Administrator??
Thanks
Draco
|
|
|
|
|
do you mean something like this:
LONG WINAPI IsUserAdmin(void)
{
BOOL b;
SID_IDENTIFIER_AUTHORITY NtAuthority = SECURITY_NT_AUTHORITY;
PSID AdministratorsGroup;
b = AllocateAndInitializeSid(
&NtAuthority,
2,
SECURITY_BUILTIN_DOMAIN_RID,
DOMAIN_ALIAS_RID_ADMINS,
0, 0, 0, 0, 0, 0,
&AdministratorsGroup);
if(b) {
if (!CheckTokenMembership( NULL, AdministratorsGroup, &b)) {
b = FALSE;
}
FreeSid(AdministratorsGroup);
}
return(b);
}
Martin
--------------------------------------------
C'mon we all know computers are experimental devices and should only be used for playing games.
Using them for alternative stuff like business, is clearly not using them for what they are intended.
Colin Davies
|
|
|
|
|
I am so shocked that anyone understands the security stuff in windows!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</A>
|
|
|
|
|
LOL, it is not that difficult, you just need to spend a lot of time reading and experimenting.
Martin
--------------------------------------------
C'mon we all know computers are experimental devices and should only be used for playing games.
Using them for alternative stuff like business, is clearly not using them for what they are intended.
Colin Davies
|
|
|
|
|
The best thing about windows security -- is that you don't have to understand it. All those functions that want a SECURITY_ATTRIBUTES pointer happily accept a NULL pointer!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</A>
|
|
|
|
|
Everyday I think more and more to move on linux
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
and still it works, using NULL indicates that default attributes for the process will be used hence the job is done for you. if you need a different attributes then you can set them up, used to be pretty dull and long code but it is getting better. get hold of books 'Writing Secure Code' and 'Writing Secure Code for Windows Vista', that's good start.
Martin
--------------------------------------------
C'mon we all know computers are experimental devices and should only be used for playing games.
Using them for alternative stuff like business, is clearly not using them for what they are intended.
Colin Davies
|
|
|
|