|
I think the WIN32 function SHGetFileInfo should do the work.
David
|
|
|
|
|
Thanx i'll do that...
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Hi everyone,
I had to say it out loud. This guy took time to help me out with a major problem that I had since two days. He replies several time and answered all my questions. I`m sure there also a lot other buddies that help other persons, to all of them, Thank for taking this precious time !
|
|
|
|
|
I dunno if this is the appropriate forum for this kinda of comment, but I agree with you...
Joaquín M López Muñoz knowledge of templates saved me hours of reading and made my code half the size it probably would have been. Definetly the most challenging question/problem i've ever encountered.
Kudos Joaquín M López Muñoz.
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Yup, he does a lot of good helping out of people.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
You are gonna make me blush I'm but a newbie among such gurus as Tomasz, Nish, Mr. GDI-man Christian Grauss and the other CP folks we all know and love.
C++ questions are the most interesting to me because Stroustrup's brainchild is such an awesome tool and never stops surprising me. IMHO it is just out of lack of aquaintance with C++ that people consider embracing other toy languages that unfortunately are being given excessive hype lately.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
How can I get a pointer to which ever window is activated, but not windows in my program? Programs such as internet explorer or paint or some other program.
-Raffi<marquee behavior="ALTERNATE" width="100" scrollamount="2">
Bug Report
|
|
|
|
|
You can use GetForegroundWindow()
You cannot use GetActiveWindow() cause it only returns the active window in your program.
Nish
Chris,
Can I have a Johnny Bravo icon please?
Please, please, please........
|
|
|
|
|
Thanks
-Raffi<marquee behavior="ALTERNATE" width="100" scrollamount="2">
Bug Report
|
|
|
|
|
Hi,
I have created a class with a dialog box called Calculate with three edit boxes.
IDC_EDIT1,IDC_EDIT2 and IDC_EDIT3
each are to calclate different percentages for a project.
The member variables for each are: m_edit1,m_edit2,m_edit3 which are all of type float
What I want to do is in the dialog source file
(calculate.cpp) is define how to calculate each percentage which I have done.
The three variables containing the percentages are answer1, answer2 and answer3.
What I want to do now is to be able to display answer1 in the IDC_EDIT1 box, answer2 in IDC_EDIT2 and answer3 in IDC_EDIT3. Please can someone help me! Thanks a lot in advance!
|
|
|
|
|
m_edit1=answer1;
m_edit2=answer2;
m_edit3=answer3;
UpdateData(false);
Nish
Chris,
Can I have a Johnny Bravo icon please?
Please, please, please........
|
|
|
|
|
Thanks for the help but where in the source file do I put the code? the compiled keeps telling me that m_edit1,2,3 are all undeclared identifiers
|
|
|
|
|
I'm trying to create a file dialog box with 2 filter extensions. How can i update the filename field everytime i select a different extension from the save as type.
|
|
|
|
|
Look at
CFileDialog::OnTypeChange
But u would need to create a new class to recive the notifications.
U could use spy to get the pointer to the edit box id,
and get a handle to it and change the text in it.
|
|
|
|
|
I want to be able to select one item in the the list box and remove it from the list with the push of a button but leaving all the other items in it.
|
|
|
|
|
That's exactly what DeleteString does. It deletes the string from the list box whose index you specified. It leaves all other items intact.
Call index=GetCurSel() to get the index of the selected item.
Then in the button's click handler call DeleteString(index)
Nish
Chris,
Can I have a Johnny Bravo icon please?
Please, please, please........
|
|
|
|
|
Johnny5 wrote:
Re: Nish {BusterBoy] Deleting strings
What does this means?Nish {Buster Boy]...
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
Mazdak wrote:
What does this means?Nish {Buster Boy]...
Well spotted Mazy.
Thanks too.
Yes The first [ has been mis-spelt as {
I have corrected it in my reply...
Nish
Chris,
Can I have a Johnny Bravo icon please?
Please, please, please........
|
|
|
|
|
where do i call the index from?
would i do this?
//m_lsFile is the control CString variable to that list box
void CMainDlg::OnBdelete()
{
m_lsFile.GetCurSel();
m_lsFile.DeleteString();
}
|
|
|
|
|
Johnny5 wrote:
m_lsFile.GetCurSel();
m_lsFile.DeleteString();
int index=m_lsFile.GetCurSel();
m_lsFile.DeleteString(index);
Nish
Chris,
Can I have a Johnny Bravo icon please?
Please, please, please........
|
|
|
|
|
Hey, i have a listbox that contains various items inside of it. can someone tell me how i can make only one of those items selected in the listbox, be deleted by pressing a button?
|
|
|
|
|
You want to have exactly one string in listbox? Or one selected string in listbox?
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
I want to be able to select one item in the the list box and remove it from the list with the push of a button.
|
|
|
|
|
CListBox::SetCurSel selects item (assuming that you have single-selection listbox). CListBox::DeleteString deletes item with specified index.
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
Hi Tomasz
This thread is now dead. The question has been reposted and using my nick in the subject. The nick was spelt wrong and I had to replace a { with a [ in the reply. But I think the subject of the re-post might actually confuse some people and they might think I am deleting strings for whatever reasons I might have
Nish
Chris,
Can I have a Johnny Bravo icon please?
Please, please, please........
|
|
|
|