Click here to Skip to main content
15,913,115 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDisable pasting in EditBox Pin
JensB6-May-03 23:28
JensB6-May-03 23:28 
GeneralRe: Disable pasting in EditBox Pin
Rage7-May-03 0:51
professionalRage7-May-03 0:51 
GeneralRe: Disable pasting in EditBox Pin
JensB7-May-03 1:06
JensB7-May-03 1:06 
GeneralRe: Disable pasting in EditBox Pin
Neville Franks7-May-03 1:54
Neville Franks7-May-03 1:54 
Generalcreating controls at runtime Pin
r i s h a b h s6-May-03 23:27
r i s h a b h s6-May-03 23:27 
GeneralRe: creating controls at runtime Pin
jmkhael7-May-03 0:13
jmkhael7-May-03 0:13 
GeneralVC++ 6.0 with C# dll Pin
NHM6-May-03 22:58
NHM6-May-03 22:58 
GeneralRe: VC++ 6.0 with C# dll Pin
VizOne7-May-03 7:22
VizOne7-May-03 7:22 
Generalget null when use GetFont in CView Pin
novachen6-May-03 22:08
novachen6-May-03 22:08 
GeneralRe: get null when use GetFont in CView Pin
Neville Franks7-May-03 1:57
Neville Franks7-May-03 1:57 
GeneralDll memroy allocation problem Pin
Cedric Moonen6-May-03 21:43
Cedric Moonen6-May-03 21:43 
GeneralRe: Dll memroy allocation problem Pin
Joaquín M López Muñoz6-May-03 22:08
Joaquín M López Muñoz6-May-03 22:08 
GeneralRe: Dll memroy allocation problem Pin
Cedric Moonen6-May-03 22:15
Cedric Moonen6-May-03 22:15 
GeneralI want to hide command line window Pin
Cheickna6-May-03 21:07
Cheickna6-May-03 21:07 
GeneralRe: I want to hide command line window Pin
imsniper6-May-03 21:25
imsniper6-May-03 21:25 
QuestionHow to get the size of a physical disk? Pin
Maxwell Chen6-May-03 20:06
Maxwell Chen6-May-03 20:06 
AnswerRe: How to get the size of a physical disk? Pin
Xander807-May-03 1:03
Xander807-May-03 1:03 
GeneralRe: How to get the size of a physical disk? Pin
Maxwell Chen8-May-03 15:56
Maxwell Chen8-May-03 15:56 
AnswerRe: How to get the size of a physical disk? Pin
Rage7-May-03 1:06
professionalRage7-May-03 1:06 
GeneralRe: How to get the size of a physical disk? Pin
Maxwell Chen8-May-03 16:00
Maxwell Chen8-May-03 16:00 
AnswerRe: How to get the size of a physical disk? Pin
David Crow7-May-03 4:17
David Crow7-May-03 4:17 
This correctly reports that I have a (roughly) 13GB disk:

HANDLE disk;
DWORD dwNeeded;
DISK_GEOMETRY *geometry;

disk=CreateFile("\\\\.\\PHYSICALDRIVE0",
     GENERIC_READ,
     0,
     NULL,
     OPEN_EXISTING,
     0,
     NULL);
if (INVALID_HANDLE_VALUE != disk)
{
    geometry = new DISK_GEOMETRY;

    DeviceIoControl(disk,
         IOCTL_DISK_GET_DRIVE_GEOMETRY,
         NULL,
         0,
         geometry,
         sizeof(DISK_GEOMETRY),
         &dwNeeded,
         NULL);

    TRACE("      Cylinders: %I64u\n", geometry->Cylinders);
    TRACE("     Media Type: %d\n",    geometry->MediaType);
    TRACE("Tracks/Cylinder: %lu\n",   geometry->TracksPerCylinder);
    TRACE("  Sectors/Track: %lu\n",   geometry->SectorsPerTrack);
    TRACE("   Bytes/Sector: %lu\n",   geometry->BytesPerSector);

    delete [] geometry;

    CloseHandle(disk);
}

GeneralRe: How to get the size of a physical disk? Pin
Maxwell Chen8-May-03 16:10
Maxwell Chen8-May-03 16:10 
GeneralPrinting a graph Pin
summo6-May-03 20:02
summo6-May-03 20:02 
QuestionReclaim memory...? Pin
Ph@ntom6-May-03 19:40
Ph@ntom6-May-03 19:40 
AnswerRe: Reclaim memory...? Pin
David Crow7-May-03 4:19
David Crow7-May-03 4:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.