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

C / C++ / MFC

 
GeneralRe: Ensure Correct Size Pin
Programm3r29-Mar-07 3:21
Programm3r29-Mar-07 3:21 
QuestionTransparent Brush Pin
Md. Mazharul Islam Khan29-Mar-07 0:11
Md. Mazharul Islam Khan29-Mar-07 0:11 
AnswerRe: Transparent Brush Pin
Cedric Moonen29-Mar-07 1:03
Cedric Moonen29-Mar-07 1:03 
GeneralRe: Transparent Brush Pin
Md. Mazharul Islam Khan29-Mar-07 1:45
Md. Mazharul Islam Khan29-Mar-07 1:45 
GeneralRe: Transparent Brush Pin
Cedric Moonen29-Mar-07 1:48
Cedric Moonen29-Mar-07 1:48 
GeneralRe: Transparent Brush Pin
Md. Mazharul Islam Khan29-Mar-07 3:07
Md. Mazharul Islam Khan29-Mar-07 3:07 
QuestionRe: Transparent Brush Pin
prasad_som29-Mar-07 3:15
prasad_som29-Mar-07 3:15 
GeneralUsing MFC dialogs in a dll [VS2005] Pin
benjymous28-Mar-07 23:26
benjymous28-Mar-07 23:26 
Has the way MFC in dialogs works changed between VC7 and VC8? (or specifically in the latest service pack?)

We've got quite a few DLLs that contain dialogs, that worked fine in VC7 (and we think it was on in the vanilla install of VC8), but now assert then crash inside the dialog's DoModal call:
objcore.cpp line 40
BOOL CObject::IsKindOf(const CRuntimeClass* pClass) const
{
	ENSURE(this != NULL); --- Dies here


Here's the code that opens the dialog
AFX_MANAGE_STATE(AfxGetStaticModuleState()); //needed to display the dialog across the dll

COptionsDlg dlg( CWnd::FromHandle( hwndParent ) );
if( dlg.DoModal() == IDOK )
{
        ...


It seems to work fine in release, but it appears to want to use AfxGetApp() in debug (which returns NULL, and this crashes inside IsKindOf)

We've tried making the DLLs derive from CWinApp, but that seems to fail in the CWinApp constructor when the dll is initialised ( ASSERT(AfxGetThread() == NULL); - I'm guessing the Calling application's thread is being detected here. )

Can anyone help out?



GeneralRe: Using MFC dialogs in a dll [VS2005] Pin
KarstenK29-Mar-07 1:10
mveKarstenK29-Mar-07 1:10 
GeneralRe: Using MFC dialogs in a dll [VS2005] Pin
benjymous29-Mar-07 2:58
benjymous29-Mar-07 2:58 
GeneralRe: Using MFC dialogs in a dll [VS2005] Pin
KarstenK29-Mar-07 3:11
mveKarstenK29-Mar-07 3:11 
GeneralRe: Using MFC dialogs in a dll [VS2005] Pin
benjymous29-Mar-07 3:25
benjymous29-Mar-07 3:25 
QuestionWhy? Pin
_808628-Mar-07 23:16
_808628-Mar-07 23:16 
AnswerRe: Why? Pin
Rohde28-Mar-07 23:26
Rohde28-Mar-07 23:26 
AnswerRe: Why? Pin
benjymous28-Mar-07 23:28
benjymous28-Mar-07 23:28 
GeneralRe: Why? Pin
_808629-Mar-07 0:51
_808629-Mar-07 0:51 
AnswerRe: Why? Pin
prasad_som28-Mar-07 23:29
prasad_som28-Mar-07 23:29 
AnswerRe: Why? Pin
toxcct28-Mar-07 23:30
toxcct28-Mar-07 23:30 
GeneralRe: Why? Pin
Eytukan29-Mar-07 1:34
Eytukan29-Mar-07 1:34 
GeneralRe: Why? Pin
toxcct29-Mar-07 2:13
toxcct29-Mar-07 2:13 
AnswerBecause... Pin
CPallini29-Mar-07 0:16
mveCPallini29-Mar-07 0:16 
Questionconnectivity of c++ with sql only Pin
p_28-Mar-07 22:29
p_28-Mar-07 22:29 
AnswerRe: connectivity of c++ with sql only Pin
prasad_som28-Mar-07 23:25
prasad_som28-Mar-07 23:25 
AnswerRe: connectivity of c++ with sql only Pin
Mark Salsbery29-Mar-07 7:05
Mark Salsbery29-Mar-07 7:05 
Questionget LAN speed using VC++/MFC Pin
sanjaylk28-Mar-07 22:25
sanjaylk28-Mar-07 22:25 

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.