
Introduction
I developed this project as a learning experience after seeing such a GUI on
some FTP Shareware Programs; the Icons and File Types unfortunately have been hardcoded in the project, unlike the ones available on Windows Explorer. The
Icons are a part of the project and not picked up from the Windows Operating
System. This project uses a ListView to display all the drives (including CD Drive) on
the Computer System
Features
This project has the following features
| You must Sign In to use this message board. |
|
| | Msgs 1 to 5 of 5 (Total in Forum: 5) (Refresh) | FirstPrevNext |
|
 |
|
 |
There is a bug when trying to go one step back to the previous folder. If you started at the top level (cd-rom, removables, floppy..) when browsing the content of one disk, and then jumping back to what was supposed to be the previous folder, you end up on c:\. In "OnDblclk" something like this would fix the problem:
if (m_cPath.Left(m_cPath.ReverseFind('\\')+1) != m_cPath) m_cPreviousPath = m_cPath.Left(m_cPath.ReverseFind('\\')+1); else m_cPreviousPath = "";
Also: E.g. USB memory sticks shows up as floppy drive......
Fix:
In "AddDrives":
Update "case DRIVE_REMOVABLE...." to the following:
case DRIVE_REMOVABLE: nItem = GetListCtrl().InsertItem(0, strDrive,ICI_FLOPPYDRV); if (nDrive == 0 || nDrive == 1) GetListCtrl().SetItemText(0, 1 , "Floppy Drive"); else GetListCtrl().SetItemText(0, 1 , "Removable Drive"); break;
And thanks for the sample code!

|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
 |
1. A lot of hard-coded constants. 2. Source code package should not include intermediate files that can be built from sources: .APS, .CLW, .PLG. DriveBrowser.aps alone occupies more than the rest of the code! 3. This is an extract from the function GetFileType.
CString CBrowsingListView::GetFileType(CString s) { if(ext == ".PDF") return "PDF File"; if(ext == ".CPP") return "VC Source"; if(ext == ".H") return "Header File"; if(ext == ".C") return "C Source"; else if(s == "SETUP.EXE") return "SETUP File"; else if(s == "ISUNINST.EXE") return "UNINSTALL File"; else if(ext == ".TXT" || ext == ".LOG") return "TEXT File"; else if(ext == ".ZIP" || ext == ".ARJ" || ext == ".TGZ" || ... }
What if my CPP files are handled by Borland C, not VC, what will you do then? Have you ever heard about registry?
Vagif Abilov MCP (Visual C++) Oslo, Norway
If you're in a war, instead of throwing a hand grenade at the enemy, throw one of those small pumpkins. Maybe it'll make everyone think how stupid war is, and while they are thinking, you can throw a real grenade at them. Jack Handey, Deep Thoughts
|
| Sign In·View Thread·PermaLink | 1.11/5 (6 votes) |
|
|
|
 |
|
 |
Anyone know how to rename registry key programmatically? I cann't find a function call to rename registry key, but registry editor allows users to do so.
Thanks.
|
| Sign In·View Thread·PermaLink | 1.50/5 (6 votes) |
|
|
|
 |
|
 |
Hi, try asking in the VC++ forum.
Regardz Colin J Davies
Sonork ID 100.9197:Colin
You are the intrepid one, always willing to leap into the fray! A serious character flaw, I might add, but entertaining. Said by Roger Wright about me.
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
General
News
Question
Answer
Joke
Rant
Admin