CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: MFC / C++

  1. #1
    Join Date
    May 1999
    Posts
    14

    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.


  2. #2
    Join Date
    May 1999
    Posts
    26

    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
  •  





Click Here to Expand Forum to Full Width

Featured