Click here to Skip to main content
15,898,743 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Sound output/wavetables etc. Pin
Ryan Binns23-May-05 3:54
Ryan Binns23-May-05 3:54 
GeneralCFile nad struct Pin
ALTF422-May-05 1:01
ALTF422-May-05 1:01 
GeneralRe: CFile nad struct Pin
Blake V. Miller22-May-05 2:29
Blake V. Miller22-May-05 2:29 
GeneralRe: CFile nad struct Pin
Ravi Bhavnani22-May-05 5:56
professionalRavi Bhavnani22-May-05 5:56 
GeneralRe: CFile nad struct Pin
David Crow23-May-05 2:39
David Crow23-May-05 2:39 
GeneralProcesses Pin
Dennis L22-May-05 0:56
Dennis L22-May-05 0:56 
GeneralWM_PRINT Issue Pin
Axonn Echysttas22-May-05 0:44
Axonn Echysttas22-May-05 0:44 
GeneralInvalidating client area of a window Pin
laiju21-May-05 23:40
laiju21-May-05 23:40 
I am using MDI Architecture for my application.
I have the MainFrame Window within which I can create mulitple child windows.
My issue is that I am selecting a color from a dialog box.
When I click the apply button I want to invalidate all the child windows behind the dialog box so that the selected color is applied to the child windows even when the dialog box is visible in the foreground.
I used the following code but it throws a memory exception.

void CMyPropertySheet::OnApply()
{

CDC *pDC;
try
{
GetActivePage()->UpdateData(TRUE);
pDC = this->GetDC();
((CMyApplnView*)AfxGetApp())->OnDraw(pDC);
// ((CMyApplnView*)AfxGetApp())->Invalidate(FALSE);

}
catch(...)
{
AfxMessageBox(" Exception during OnApply");
}
}

I tried calling the Invalidate function of the View class as in the code above but the memory exception is still comming.Can anyone let me know what is the problem here.

laiju
GeneralRe: Invalidating client area of a window Pin
laiju22-May-05 2:02
laiju22-May-05 2:02 
GeneralRe: Invalidating client area of a window Pin
doublebug24-May-05 10:05
doublebug24-May-05 10:05 
GeneralMultiple Reader - Single Writer - Lock for Win32 Pin
peterchen21-May-05 22:15
peterchen21-May-05 22:15 
GeneralRe: Multiple Reader - Single Writer - Lock for Win32 Pin
Ryan Binns22-May-05 18:18
Ryan Binns22-May-05 18:18 
GeneralRe: Multiple Reader - Single Writer - Lock for Win32 Pin
peterchen23-May-05 12:01
peterchen23-May-05 12:01 
GeneralPrint the program's source code Pin
ddmcr21-May-05 21:03
ddmcr21-May-05 21:03 
GeneralRe: Print the program's source code Pin
Blake V. Miller22-May-05 2:33
Blake V. Miller22-May-05 2:33 
GeneralRe: Print the program's source code Pin
donaldGuy22-May-05 10:58
donaldGuy22-May-05 10:58 
GeneralRe: Print the program's source code Pin
Christian Graus22-May-05 15:02
protectorChristian Graus22-May-05 15:02 
GeneralRe: Print the program's source code Pin
David Crow23-May-05 2:44
David Crow23-May-05 2:44 
GeneralRunning at set times Pin
Member 66746821-May-05 19:54
Member 66746821-May-05 19:54 
GeneralRe: Running at set times Pin
Trollslayer21-May-05 21:48
mentorTrollslayer21-May-05 21:48 
GeneralRe: Running at set times Pin
Blake V. Miller22-May-05 2:21
Blake V. Miller22-May-05 2:21 
GeneralRe: Running at set times Pin
David Crow23-May-05 2:46
David Crow23-May-05 2:46 
GeneralInvalid handle issue for a Service application while using GenerateConsoleCtrlEvent Pin
jiju_m_jiju21-May-05 19:39
sussjiju_m_jiju21-May-05 19:39 
GeneralPrint preview Pin
Anonymous21-May-05 15:54
Anonymous21-May-05 15:54 
GeneralDevice contexts Pin
Anonymous21-May-05 15:43
Anonymous21-May-05 15:43 

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.