Reputation
304
Top tag
Next privilege 500 Rep.
Access review queues
Badges
2 7 23
Impact
~167k people reached

Mar
11
revised Windows 7 failed to load because the system registry file is missing or corrupt
Using code tags for the commands that have to be typed and making the post a bit easier to read.
Mar
11
suggested approved edit on Windows 7 failed to load because the system registry file is missing or corrupt
Jan
10
awarded  Good Question
Jan
6
comment How to assign a icon for “Copy/Cut/Paste/Delete” Windows default context menu items?
Maybe you could mention this in the post to avoid related problems and questions, and it can be an important information what kind of images are accepted. :)
Jan
6
comment How to assign a icon for “Copy/Cut/Paste/Delete” Windows default context menu items?
@BenN: OK, thanks! :) It would have been a bit more convenient. BTW in the meantime I realized that if I open my previously not working images in the legendary Paint, and I do a "Save as" > "24-bit Bitmap (.bmp;.dip)" (so save it to a BMP file again), and I use this new file as a source image, it WORKS. Of course, the bitmap's size have to be exactly 16x16 pixels. So Paint creates the expected bitmap format which is 24 bits per pixel (16.7 million colors), 96x96 DPI and 16x16 pixels in size. Previously I converted and resized .png files in IrfanView to .bmp files, these icons did not work.
Jan
6
comment How to assign a icon for “Copy/Cut/Paste/Delete” Windows default context menu items?
@BenN: don't you know if even a resource icon can be used (e.g. the icons from shell32.dll or an exe) or not in this case? I've only found ways to load BMPs (HBITMAPs) because this is what MENUITEMINFO needs (hbmpItem) and it does not accept HICON instances. Is there any other method to do that or we need to accept the fact that it only works with BMPs? For example if I want to display an icon next to the "Open command window here" menu item, I only have to edit HKEY_CLASSES_ROOT\Directory\Background\shell\cmd, put a String Value called Icon here with the value cmd.exe,0.
Jan
6
comment How to assign a icon for “Copy/Cut/Paste/Delete” Windows default context menu items?
@BenN: great, even better, thank you! :)
Jan
5
comment How to assign a icon for “Copy/Cut/Paste/Delete” Windows default context menu items?
ElektroStudios: you can accept Ben N's answer, it really solves the problem! :) Thank you, Ben, you really deserve the bounty! And @LMFAO_A_JOKE, thanks for your efforts too!
Jan
5
comment How to assign a icon for “Copy/Cut/Paste/Delete” Windows default context menu items?
You will not believe it... IT WORKS with your images! :D :D It means I have some bmp files which Windows couldn't handle, don't know why (later I'll check that too). Anyway, thank you very much, your code really solves the problem! :)
Jan
5
comment How to assign a icon for “Copy/Cut/Paste/Delete” Windows default context menu items?
BTW couldn't you upload your BMP files to Dropbox too? :) Just out of curiosity, I would like to test it with those images that were visible in the your context menu (although I don't think the images are the source of the problem but who knows...). It would be very nice if you could upload the source code to GitHub/Bitbucket. :)
Jan
5
awarded  Altruist
Jan
5
comment How to assign a icon for “Copy/Cut/Paste/Delete” Windows default context menu items?
Anyway, I give you the bounty! :) I can not test all the other circumstances before midnight when it expires, and I believe that it really worked for you. Anyway, if you have a chance, I'd appreciate if you could test it under Windows 10 too. :) Thanks!
Jan
5
comment How to assign a icon for “Copy/Cut/Paste/Delete” Windows default context menu items?
Yes, of course, I checked the new registry entries, and they do exist! I also added the new string entry under the Approved key like you mentioned. Still no change (unregistered and reregistered again after that too). Unfortunately I currently do not have a Windows 8 machine, but I'll try if I can get one.
Jan
5
comment How to assign a icon for “Copy/Cut/Paste/Delete” Windows default context menu items?
I just tried the same with 16x16 BMP images (after unregistering and reregistering the DLL again), and unfortunately there's still no change.
Jan
5
comment How to assign a icon for “Copy/Cut/Paste/Delete” Windows default context menu items?
Wow! I really appreciate your efforts, thank you very much! (+1) I tried my best but couldn't make the compiled version work on Windows 10 (Build 10240). I don't know what the problem is, all the bmp images exist in the right path (C:\shellicon\copy.bmp, etc. - these are 20x20 pixels icons in BMP format) and I registered the dll as an admin in command prompt with regsvr32 ContextIcons.dll which ran successfully, but I see no changes in the context menu. I even restarted the computer, unregistered and reregistered the dll again, but no changes. I'm trying to compile the source in VS2015!
Dec
29
comment How to assign a icon for “Copy/Cut/Paste/Delete” Windows default context menu items?
@BenN: if you had time, I'd appreciate a sample code. :) Thanks in advance.
Dec
29
comment How do I set Notepad++ as the default editor?
It only works if Notepad++ has been installed to "C:\Program Files (x86)\Notepad++\notepad++.exe" (which is the default), otherwise it will fail. There is no real need to write these commands as hexadecimal strings, plain text is accepted too with appropriate escapings. It's not too complicated to convert these hexadecimal texts to string with online tools like this: codebeautify.org/hex-string-converter. BTW the first hexadecimal text can be decoded to "C:\Program Files (x86)\Notepad++\notepad++.exe" "%1".
Dec
29
comment How to assign a icon for “Copy/Cut/Paste/Delete” Windows default context menu items?
@Raystafarian: What's your point? Yes, there is no icon set for those items as we've already explained it and I even posted a screenshot of it (and ElektroStudios kindly pasted it into his question to make it clearer), and this is exactly what we would like to change...
Dec
29
comment How to assign a icon for “Copy/Cut/Paste/Delete” Windows default context menu items?
Here is another screenshot to make it clear (the interesting part is in red borders): i.imgur.com/fmewg6L.png. BTW as you can see, I have some custom items in the context menu with custom icons (like "Open with Notepad++") - this is exactly what we would like to achieve with the existing system context menu items!
Dec
29
comment How to assign a icon for “Copy/Cut/Paste/Delete” Windows default context menu items?
@Raystafarian: the question is how to add a custom icon to existing basic context menu items like "Cut", "Copy", "Delete", "Rename", etc. BTW when adding a new custom item to the context menu, it is very easy, because you only have to add the Icon String Value in a key like HKEY_CLASSES_ROOT\*\shell\MYCUSTOMITEM (and the value of the Icon would be like e.g. %SystemRoot%\System32\shell32.dll,-133 or sg. else). BUT adding the Icon string value to different context menu handlers doesn't work like when adding it to these custom items.