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

C / C++ / MFC

 
AnswerRe: Urgent message to Author...... Pin
KaЯl28-Feb-07 5:12
KaЯl28-Feb-07 5:12 
GeneralRe: Urgent message to Author...... Pin
Software_Specialist28-Feb-07 23:19
Software_Specialist28-Feb-07 23:19 
GeneralRe: Urgent message to Author...... Pin
KaЯl1-Mar-07 2:58
KaЯl1-Mar-07 2:58 
GeneralRe: Urgent message to Author...... Pin
toxcct1-Mar-07 5:19
toxcct1-Mar-07 5:19 
GeneralRe: Urgent message to Author...... Pin
Software_Specialist1-Mar-07 7:03
Software_Specialist1-Mar-07 7:03 
GeneralRe: Urgent message to Author...... Pin
Programm3r1-Mar-07 20:07
Programm3r1-Mar-07 20:07 
GeneralRe: Urgent message to Author...... Pin
toxcct1-Mar-07 21:38
toxcct1-Mar-07 21:38 
QuestionCDialog in View [modified] Pin
baerten28-Feb-07 4:15
baerten28-Feb-07 4:15 
Hi everybody,

i use a Frame within a View, which is created via this->CreateView(CreateContext*)
if i open a CDialog in modal-state, i have an error if this dialog closes:

CWnd* CWnd::GetTopLevelParent() const
{
if (GetSafeHwnd() == NULL) // no Window attached
return NULL;

ASSERT_VALID(this); <<< Asserts here because ASSERT(::IsWindow(m_hWnd)); fails


In other Views it works fine in other not D'Oh! | :doh:

Does anyone has an idea?

Big thanks Smile | :)


-- modified at 10:26 Wednesday 28th February, 2007

// in case of modeless dialogs, last chance route through main
// window's accelerator table
if (pMainWnd != NULL)
{
CWnd* pWnd = CWnd::FromHandle(pMsg->hwnd);
if (pWnd->GetTopLevelParent() != pMainWnd)
return pMainWnd->PreTranslateMessage(pMsg);
}

the message is a 100h ( WM_KEYDOWN ) which should be redirected


-- modified at 10:49 Wednesday 28th February, 2007

With a ShowWindow(SW_SHOW) i don't have this kind of error
AnswerRe: CDialog in View Pin
KaЯl28-Feb-07 6:31
KaЯl28-Feb-07 6:31 
GeneralRe: CDialog in View Pin
baerten28-Feb-07 23:08
baerten28-Feb-07 23:08 
GeneralRe: CDialog in View Pin
KaЯl1-Mar-07 0:51
KaЯl1-Mar-07 0:51 
GeneralRe: CDialog in View Pin
baerten1-Mar-07 1:09
baerten1-Mar-07 1:09 
GeneralRe: CDialog in View Pin
KaЯl1-Mar-07 2:45
KaЯl1-Mar-07 2:45 
GeneralRe: CDialog in View [modified] Pin
baerten1-Mar-07 2:50
baerten1-Mar-07 2:50 
QuestionHow to modify the munu item status Pin
ilgale28-Feb-07 3:12
ilgale28-Feb-07 3:12 
QuestionRe: How to modify the munu item status Pin
prasad_som28-Feb-07 3:56
prasad_som28-Feb-07 3:56 
AnswerRe: How to modify the munu item status Pin
Ravi Bhavnani28-Feb-07 4:22
professionalRavi Bhavnani28-Feb-07 4:22 
QuestionHow to display the Bitmap that created by CreateBitmap function? Pin
vasu_sri28-Feb-07 1:43
vasu_sri28-Feb-07 1:43 
AnswerRe: How to display the Bitmap that created by CreateBitmap function? Pin
Naveen28-Feb-07 2:01
Naveen28-Feb-07 2:01 
GeneralRe: How to display the Bitmap that created by CreateBitmap function? Pin
CPallini28-Feb-07 2:06
mveCPallini28-Feb-07 2:06 
GeneralRe: How to display the Bitmap that created by CreateBitmap function? Pin
Naveen28-Feb-07 2:14
Naveen28-Feb-07 2:14 
GeneralAnd why? Pin
CPallini28-Feb-07 2:40
mveCPallini28-Feb-07 2:40 
GeneralRe: And why? Pin
Naveen28-Feb-07 16:48
Naveen28-Feb-07 16:48 
GeneralRe: And why? Pin
CPallini1-Mar-07 0:06
mveCPallini1-Mar-07 0:06 
AnswerRe: How to display the Bitmap that created by CreateBitmap function? Pin
Naveen28-Feb-07 2:05
Naveen28-Feb-07 2:05 

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.