Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
J

Jackson2010

@Jackson2010
About
Posts
6
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Class Information
    J Jackson2010

    spy++ can get class name, for more: http://msdn.microsoft.com/en-us/library/aa264396(VS.60).aspx[^]

    Working is a happy thing! Enjoy the free partition manager!

    C / C++ / MFC

  • Setting the text in an edit box of another application
    J Jackson2010

    WM_SETTEXT is used to set the text of a window.

    Working is a happy thing! Enjoy the free partition manager!

    C / C++ / MFC question

  • Is time for QT?
    J Jackson2010

    QT is more easy to use than MFC, i think.

    Working is a happy thing! Enjoy the free partition manager!

    C / C++ / MFC question

  • catching access violation
    J Jackson2010

    You can use the function: SetUnhandledExceptionFilter to catch. Then use MiniDumpWriteDump to dump exception to a file.

    Working is a happy thing! Enjoy the free partition manager!

    C / C++ / MFC tutorial

  • FILE* problem
    J Jackson2010

    Please check if the "handle" is NULL.

    fopen_s(&handle,cPathName,"wt");
    if (handle != NULL)
    {
    fprintf(handle,"<?xml version=\"1.0\"?>\n")
    }

    Working is a happy thing! Enjoy free partition manager!

    C / C++ / MFC c++ xml help question announcement

  • How to differentiate a floppy drive and a USB drive in VC++?
    J Jackson2010

    You can issue the IOCTL_STORAGE_GET_MEDIA_TYPES_EX to differentiate. Here is an example code:

    //////////////////////////////////////////

    DWORD dwOutBytes;
    HANDLE hDevice = CreateFile(_T("\\\\.\\A:"), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);

    if (hDevice != INVALID_HANDLE_VALUE)
    {
    DEVICE_MEDIA_INFO dmi;
    DeviceIoControl(hDevice,
    IOCTL_STORAGE_GET_MEDIA_TYPES_EX,
    NULL, 0,
    &dmi, sizeof(dmi),
    dwOutBytes,
    NULL);

    if ((MEDIA\_TYPE)dmi.RemovableDiskInfo.MediaType == RemovableMedia)
    {
        //USB disk
    }
    else
    {
        //Floppy
    }
    

    }

    CloseHandle(hDevice);

    //////////////////////////////////////////

    Hope it is useful to you.

    Working is a happy thing! Enjoy the free partition manager.

    C / C++ / MFC c++ tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups