Click here to Skip to main content
15,891,833 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Firewalls & VC++ FTP application Pin
Steve S25-Feb-04 22:42
Steve S25-Feb-04 22:42 
GeneralRe: Firewalls & VC++ FTP application Pin
rasha200328-Feb-04 4:42
rasha200328-Feb-04 4:42 
QuestionWhere can I find source code for CPRM (content protection for recordable media)? Pin
George225-Feb-04 18:15
George225-Feb-04 18:15 
GeneralPDF control Pin
Mahesh Varma25-Feb-04 18:07
Mahesh Varma25-Feb-04 18:07 
GeneralHandling Dialog with menu item Pin
swarnamanoo25-Feb-04 17:53
swarnamanoo25-Feb-04 17:53 
Generalcursor question Pin
ls.wang25-Feb-04 16:35
ls.wang25-Feb-04 16:35 
GeneralAMD64 and MFC Pin
Robert Buldoc25-Feb-04 15:12
Robert Buldoc25-Feb-04 15:12 
GeneralRe: AMD64 and MFC Pin
Michael Dunn25-Feb-04 15:15
sitebuilderMichael Dunn25-Feb-04 15:15 
GeneralRe: AMD64 and MFC Pin
Robert Buldoc25-Feb-04 15:16
Robert Buldoc25-Feb-04 15:16 
GeneralAccess CFormView vars from CMainFrame Pin
Daniel132425-Feb-04 12:02
Daniel132425-Feb-04 12:02 
GeneralRe: Access CFormView vars from CMainFrame Pin
ian mariano25-Feb-04 12:18
ian mariano25-Feb-04 12:18 
GeneralRe: Access CFormView vars from CMainFrame Pin
Daniel132425-Feb-04 13:10
Daniel132425-Feb-04 13:10 
GeneralRe: Access CFormView vars from CMainFrame Pin
Steve S25-Feb-04 22:47
Steve S25-Feb-04 22:47 
GeneralRe: Access CFormView vars from CMainFrame Pin
ian mariano26-Feb-04 1:02
ian mariano26-Feb-04 1:02 
Steve S is right, Daniel. It actually makes things easier than handling WM_CLOSE in the Main Frame, although that's perfectly OK as well...

Just inject the check on your CFormView derived View's CanCloseView() (or whatever you call it) into your override of CanCloseFrame():

BOOL  CMyDocument::CanCloseFrame(CFrameWnd* pFrame)
{
   //  check your view first
   CMyFormView  pView = (CMyFormView)pFrame->GetActiveView();

   if (FALSE == pView->CanCloseView())   return FALSE;

   //  ok, since it's OK to close after that check, call the base implementation
   return CDocument::CanCloseFrame(pFrame);
}


Ian Mariano - http://www.ian-space.com/


"We are all wave equations in the information matrix of the universe" - me

GeneralString Question Pin
USMCmaggot25-Feb-04 11:29
USMCmaggot25-Feb-04 11:29 
GeneralRe: String Question Pin
Daniel132425-Feb-04 11:46
Daniel132425-Feb-04 11:46 
GeneralRe: String Question Pin
Wes Aday25-Feb-04 11:53
professionalWes Aday25-Feb-04 11:53 
GeneralHeapAlloc bombing Pin
TimWallace25-Feb-04 11:26
TimWallace25-Feb-04 11:26 
GeneralRe: HeapAlloc bombing Pin
Ravi Bhavnani25-Feb-04 12:15
professionalRavi Bhavnani25-Feb-04 12:15 
GeneralRe: HeapAlloc bombing SOLVED Pin
TimWallace26-Feb-04 5:16
TimWallace26-Feb-04 5:16 
GeneralCalling MFC from managed C++ Pin
jbmeeh25-Feb-04 10:41
jbmeeh25-Feb-04 10:41 
GeneralMSDN Pin
v0id_dev25-Feb-04 10:30
v0id_dev25-Feb-04 10:30 
GeneralRe: MSDN Pin
ian mariano25-Feb-04 12:23
ian mariano25-Feb-04 12:23 
QuestionRandom number? Pin
LudaLuda25-Feb-04 9:56
LudaLuda25-Feb-04 9:56 
AnswerRe: Random number? Pin
Christian Graus25-Feb-04 10:12
protectorChristian Graus25-Feb-04 10:12 

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.