Click here to Skip to main content
16,008,075 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questioncube class Pin
gentleguy15-Jun-07 21:39
gentleguy15-Jun-07 21:39 
AnswerRe: cube class Pin
Christian Graus15-Jun-07 22:00
protectorChristian Graus15-Jun-07 22:00 
JokeRe: cube class Pin
Cedric Moonen16-Jun-07 0:10
Cedric Moonen16-Jun-07 0:10 
GeneralRe: cube class Pin
Kevin McFarlane16-Jun-07 0:59
Kevin McFarlane16-Jun-07 0:59 
JokeRe: cube class Pin
Hamid_RT16-Jun-07 9:18
Hamid_RT16-Jun-07 9:18 
AnswerRe: cube class Pin
Hamid_RT16-Jun-07 9:19
Hamid_RT16-Jun-07 9:19 
QuestionDestroy the memory Pin
Anu_Bala15-Jun-07 20:18
Anu_Bala15-Jun-07 20:18 
AnswerRe: Destroy the memory Pin
Mark Salsbery16-Jun-07 6:55
Mark Salsbery16-Jun-07 6:55 
OMG | :OMG:

Why, oh WHY, are you using PreTranslateMesssage() to read keystrokes?

You haven't even checked the MSG to see if is a keyboard message!

Maybe something like this...
// Add to CGraphView's message map
ON_WM_KEYDOWN()
 
...
 
void CGraphView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
   if(nChar == VK_PRIOR || nChar == VK_NEXT)
   {
      short iTempPgNo = giSchPNo;
      if(nChar == VK_PRIOR)
      {
         iTempPgNo--;
         if(iTempPgNo < 0)
            iTempPgNo = giSchPNo;
      }
      else
      {
         iTempPgNo++;
         if(iTempPgNo >= iNoPages)
            iTempPgNo = iTempPgNo - 1;
      }
      if(iTempPgNo != giSchPNo)
      {
         if(glg_animation[giSchPNo].GetSafeHwnd())
         {
            glg_animation[giSchPNo].ShowWindow(SW_HIDE);
 
            giSchPNo = iTempPgNo;
            ((CMainFrame *)AfxGetMainWnd())->AddHistory(GRAPHIC,iTempPgNo);
         }
      }
   }
   else
   {
      CView::OnKeyDown(nChar, nRepCnt, nFlags);
   }
}

This may not fix your memory problems but it will make it easier to track for sure!

Mark


"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

Questiondelete this within the class function causing problems Pin
Cyrilix15-Jun-07 18:17
Cyrilix15-Jun-07 18:17 
GeneralRe: delete this within the class function causing problems Pin
Matthew Faithfull16-Jun-07 0:18
Matthew Faithfull16-Jun-07 0:18 
GeneralRe: delete this within the class function causing problems Pin
Cyrilix16-Jun-07 5:08
Cyrilix16-Jun-07 5:08 
AnswerRe: delete this within the class function causing problems Pin
Matthew Faithfull16-Jun-07 5:24
Matthew Faithfull16-Jun-07 5:24 
GeneralRe: delete this within the class function causing problems Pin
Cyrilix16-Jun-07 6:06
Cyrilix16-Jun-07 6:06 
AnswerRe: delete this within the class function causing problems Pin
Stephen Hewitt17-Jun-07 12:55
Stephen Hewitt17-Jun-07 12:55 
GeneralRe: delete this within the class function causing problems Pin
Cyrilix17-Jun-07 17:18
Cyrilix17-Jun-07 17:18 
QuestionCreate Standart Animation With V C++ Pin
san_sui15-Jun-07 17:08
san_sui15-Jun-07 17:08 
AnswerRe: Create Standart Animation With V C++ Pin
Hamid_RT15-Jun-07 19:02
Hamid_RT15-Jun-07 19:02 
Questionerror c3409 [modified] Pin
moonraker92815-Jun-07 12:53
moonraker92815-Jun-07 12:53 
AnswerRe: error c3409 Pin
David Crow15-Jun-07 15:58
David Crow15-Jun-07 15:58 
GeneralRe: error c3409 [modified] Pin
moonraker92815-Jun-07 17:09
moonraker92815-Jun-07 17:09 
GeneralRe: error c3409 Pin
David Crow16-Jun-07 15:42
David Crow16-Jun-07 15:42 
QuestionHelp with conversion to VC* - Linker error Pin
b644715-Jun-07 12:31
b644715-Jun-07 12:31 
AnswerRe: Help with conversion to VC* - Linker error Pin
kvrnkiran19-Jun-07 0:02
kvrnkiran19-Jun-07 0:02 
GeneralRe: Help with conversion to VC* - Linker error Pin
b644719-Jun-07 13:51
b644719-Jun-07 13:51 
Questionhaving a class be a member of itself Pin
moonraker92815-Jun-07 12:27
moonraker92815-Jun-07 12:27 

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.