|
-
May 11th, 1999, 01:01 PM
#1
MFC / C++
I am new to MFC / C/C++. I want to know 2 things.
first: Without using any control how to identify the CD Drive Letter so that the path can be set directly from within the program.
Second: I want to make a simulation for plant where i need to show about 500 machines. I want to show them by check boxex? Is is advisable or I should draw circles. More I want to associate a click event with that machines. How to make object array using MFC.
-
May 11th, 1999, 01:33 PM
#2
Re: MFC / C++
Here is the answer to your first question:
CString GetCDDrive()
{
for (int i = 1; i < 27; i++)
{
char chDrive = ((char)((i - 1 + 'A')));
CString strDrive = (CString)cDrive;
strDrive += ":";
UINT type = GetDriveType(strDrive);
switch(type)
{
case DRIVE_CDROM:
return strDrive;
default:
break;
}
}
}
If E:\ is the CD Drive this will return E:
HTH
Santhosh
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|