|
I am writing a project of ListView . I want to show the Application's Icon in
the Local disk when the ListView initializing.
Although I use the follow way:
CImageList m_img;
SHFILEINFO sfi;
::SHGetFileInfo(_T("C:\Program file\"),//I want to read all the
//Application's ICON under the directory
FILE_ATTRIBUTE_NORMAL,
&sfi,
sizeof(sfi),
SHGFI_DISPLAYNAME | SHGFI_ICON);
m_img.create(32,32,TRUE | COLOR8,1,100);
m_img.Add(sfi.hIcon);
GetListCtrl().SetImageList(&m_img);
but I wonder that why the ListView can not show the Application's icon?
Do you know this is why?
Can you tell me if you me ?
Or Give me a example if you have similar project.
Thank you very much!
|
|
|
|
|
Hi.
A piece of software I have been working on relies on the locking and unlocking of 1 byte inside a specified file, from within a thread that is controlled via mutexes.
The problem I am having is intermittent. Occasionally while the following code is called:
TRY
{
m_File.Flush ();
m_File.UnlockRange ( LOCK_BYTE, 1);
}
CATCH (CFileException, e)
{
e->ReportError ();
e->Delete ();
}
END_CATCH
An exception is returned and the exception puts up on the screen "An unknown error occured while accessing an unnamed file" and in the output window "CFile exception: generic, File Unknown, OS error information = 158".
Looking at the values in the CFile object, everything looks fine. Valid handle and valid values in the variables.
Just wondering if anyone has some clue on where to look, what to look for, or even how to fix. Any ideas are welcomed as deadline is fast approaching.
|
|
|
|
|
I am not interested in writing an application which send a hello world program to the users on internet.
If you guys have ever heard of computer worm , then this is my point.I just want to work on the issue of spreading a worm with the payload in the form of a message box , take a not, message box containing a message "HELLO".You guys tell me how and what should be done or any reference of website of anypiece of code which you can refer which tells or helps me in the reproduction process of worm.
Desparately seeking help.
|
|
|
|
|
You want us to help you write a worm ? Brilliant.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
You want us to help you write a worm ? Brilliant.
Plus He is putting his Query about making virus On LEGAL MS partner Site!
This guy got lot of Guts!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
|
Michael Dunn wrote:
To quote Gorilla Monsoon: More guts than brains
What About Stone Cold Steve Austin!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
I being a student of Bachelor of computer sciences has got the project of working on the spreading mechanism of computer worm.My aim is to understand the spreading mechanism and not to do and harm and i do mean it.So if anyone can please guide and help me , i would be much grateful.
Regards.
|
|
|
|
|
Now, how would we distinguish this request from the request of a hacker ? Perhaps the best way is that a Bachelor of Computer Sciences would be more likely to be able to work this stuff out for himself ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
It means no help for a computer student from a forum which is very famous world wide.Just to prove that i am a student , i want to say that i didn't any clue about spreading of computer worm from the Giant Black Book on computer viruses (second edition) which i got from hell of difficulty.
Thanks.
|
|
|
|
|
Here's something worth considering. What makes you think that I know how to write a worm ? Not to mention, if I did know, why would I tell someone I don't know, unless I don't care if they use the information for destructive purposes. What you're asking is basically dodgy, no matter which way you look at it.
I'd suggest you need to inhabit some rather shadier places if you want to know how to write destructive code, even if don't intend to use it destructively.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Lets assume for a moment that what you claim is true; that you are only interested in learning this form of coding and no malicious harm intended.
The fact of the matter is that there is no way of creating a 'harm-free' and 'cautious' worm. Its main purpose is to spread. It may not be created to create havoc, but that might very well be the eventual effect. I recall a few self-replicating 'worms' a few years back that brought a few servers down because of this, even though it did nothing destructive in itself.
At worst it will cause serious damage, but it will at least be a very irritating problem for others that are 'infected'. And there is the small thing that you may very well be prosecuted in certain countries if your 'worm' is very successful!
I think it is very clear what others have implied (by their nature of the replies), that what you are considering is a bad idea. I think this is one programming concept that should be kept in the text book only.
I Dream of Absolute Zero
|
|
|
|
|
I HAVE A LITTLE WORM. HIS NAME IS ALBERT, HE LIVES IN MY GARDEN, I CAN SEND U SOME PICS IF U WANT
|
|
|
|
|
How to refresh Explorer window after Registry key changed?
I want to hide the files that have hide attribe so I set
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"Hidden" to 0
But that doesn't affect the current opened explorer window. I have to use "refresh" menu (not F5 button) to command to hide the hidden files.
How to tell the current opened explorer window to hide these hidden files after I set the registry key?
Thanks a lot!
Let's roll!
|
|
|
|
|
|
Anyone know of a workaround to force the Visual Studio 6.0 editor to Copy and Paste OEM font characters correctly without translating them through ANSI?
(It correctly saves the text using CF_OEMTEXT flag, as it can be safely pasted into other editors like Codewright, but it apparently decides to convert it when it is pasted - an annoying "feature" that no other editor seems to display.)
gjr
|
|
|
|
|
From what I'm able to find, this can't be done. As a result, I copy into notepad and then paste into VS
Cheers,
Tom Archer - Archer Consulting Group
"Eat your brussel sprouts, Junior. There are starving Chinese children American programmers that would kill for that food!"
|
|
|
|
|
Thanks for the comment. I find that I have to use another editor like notepad or codewright to even do the pasting as it seems VS changes the chars during the paste. I guess one (awful) way might be to patch the VS editor to paste using the OEMCHARS flag as I suspect it is handled in one call. i was hoping there might be some obscure setting I was unaware of that would avoid the problem.
gjr
|
|
|
|
|
I need to place a ListCtrl inside a RichEdit document (MDI). How do I do this? Also how do I setup event messages (double clicking on an item) for the control?
|
|
|
|
|
this document can help:
http://codeproject.com/listctrl/listctrldemo.asp
|
|
|
|
|
I actually need to know how to place the control in a RichEdit Document. I understand how to place it in a dialog but not inside a doc/view.
|
|
|
|
|
Hi Guys,
I would like to retrive the Unique ID of my computer in VC++ code. Can any one can help with the sample function to retrive the unique ID.
Thank You.
Regards
.
|
|
|
|
|
What Unique ID?
-- Rocky Dean Pulley
|
|
|
|
|
I assume you're talking about the SID.
Check out the NewSID program by Mark Russinovich over at SysInternals. It comes with the source code and should tell you way more than you were wanting to know.
Excerpt from the article:
A computer's SID is stored in the Registry's SECURITY hive under SECURITY\SAM\Domains\Account. This key has a value named F and a value named V. The V value is a binary value that has the computer SID embedded within it at the end of its data.
|
|
|
|
|
Does anyone know if visual c++ 6 MFC will let me insert jpg files. I have found in the properties box of a picture object Bitmap, Icon, etc. I tried importing a jpg, but did not seem to work.
Regards
Paul
|
|
|
|