Click here to Skip to main content
16,005,473 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to send email from C++ code Pin
Shay Harel10-Feb-03 7:25
Shay Harel10-Feb-03 7:25 
AnswerRe: How to send email from C++ code Pin
Chris Meech10-Feb-03 7:38
Chris Meech10-Feb-03 7:38 
GeneralRe: How to send email from C++ code Pin
Shay Harel10-Feb-03 7:47
Shay Harel10-Feb-03 7:47 
GeneralMaximising SDI window Pin
Justin2310-Feb-03 5:56
Justin2310-Feb-03 5:56 
GeneralRe: Maximising SDI window Pin
AlexO10-Feb-03 6:41
AlexO10-Feb-03 6:41 
GeneralRe: Maximising SDI window Pin
Rage10-Feb-03 6:45
professionalRage10-Feb-03 6:45 
Generalautomatically refreshing drive views Pin
will138310-Feb-03 5:45
will138310-Feb-03 5:45 
GeneralRe: automatically refreshing drive views Pin
olivier10-Feb-03 6:04
olivier10-Feb-03 6:04 
in your mainframe window do :
/////////////////////////////////////////////////////////////////
// OnDeviceChange
/////////////////////////////////////////////////////////////////
#include <dbt.h>

BOOL CMainFrame::OnDeviceChange (UINT nEventType, DWORD dwData)
{
if (nEventType == DBT_DEVICEARRIVAL)
{
DEV_BROADCAST_HDR * pDevBroadcastHdr = (DEV_BROADCAST_HDR*)dwData;
if (pDevBroadcastHdr->dbch_devicetype == DBT_DEVTYP_VOLUME) // Logical Volume
{
DEV_BROADCAST_VOLUME* pDevBroadcastVolume = (DEV_BROADCAST_VOLUME*)pDevBroadcastHdr;

// on cherche la lettre du nouveau disque
if (pDevBroadcastVolume->dbcv_flags & DBTF_MEDIA)
{
char cVolume;
ULONG unitmask = pDevBroadcastVolume->dbcv_unitmask;
for (int i = 0; i < 26; ++i)
{
if (unitmask & 0x1)
break;
unitmask = unitmask >> 1;
}
cVolume = (i + 'A');
}
}
}
if (nEventType == DBT_DEVICEREMOVECOMPLETE)
{
}
return TRUE;
}
=============================
in your mainfrm.h
afx_msg BOOL OnDeviceChange (UINT nEventType, DWORD dwData);
GeneralRe: automatically refreshing drive views Pin
olivier10-Feb-03 6:28
olivier10-Feb-03 6:28 
GeneralRe: automatically refreshing drive views Pin
will138310-Feb-03 7:21
will138310-Feb-03 7:21 
QuestionHow to detect that a drive is a DVD ? Pin
olivier10-Feb-03 5:43
olivier10-Feb-03 5:43 
AnswerRe: How to detect that a drive is a DVD ? Pin
Abbas_Riazi10-Feb-03 9:02
professionalAbbas_Riazi10-Feb-03 9:02 
AnswerRe: How to detect that a drive is a DVD ? Pin
Mike Nordell10-Feb-03 11:29
Mike Nordell10-Feb-03 11:29 
GeneralRe: How to detect that a drive is a DVD ? Pin
olivier10-Feb-03 23:07
olivier10-Feb-03 23:07 
AnswerThis is the solution Pin
olivier10-Feb-03 23:06
olivier10-Feb-03 23:06 
GeneralMath question.. strings and int's.. Pin
RobJones10-Feb-03 4:24
RobJones10-Feb-03 4:24 
GeneralRe: Math question.. strings and int's.. Pin
Chris Losinger10-Feb-03 4:27
professionalChris Losinger10-Feb-03 4:27 
GeneralRe: Math question.. strings and int's.. Pin
RobJones10-Feb-03 4:55
RobJones10-Feb-03 4:55 
GeneralView large text files. Pin
Mathias S.10-Feb-03 4:13
Mathias S.10-Feb-03 4:13 
GeneralRe: View large text files. Pin
Navin10-Feb-03 4:38
Navin10-Feb-03 4:38 
GeneralRe: View large text files. Pin
Ted Ferenc10-Feb-03 6:33
Ted Ferenc10-Feb-03 6:33 
GeneralRe: View large text files. Pin
David Chamberlain10-Feb-03 6:47
David Chamberlain10-Feb-03 6:47 
GeneralRe: View large text files. Yes MMF. Pin
Neville Franks10-Feb-03 9:07
Neville Franks10-Feb-03 9:07 
GeneralSetWindowPos and GetWindowRec Pin
jeremysay10-Feb-03 3:54
jeremysay10-Feb-03 3:54 
GeneralRe: SetWindowPos and GetWindowRec Pin
HENDRIK R10-Feb-03 4:00
HENDRIK R10-Feb-03 4:00 

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.