Click here to Skip to main content
15,886,199 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CSpinButtonCtrl and WM_VSCROLL Pin
David Crow17-Sep-07 8:14
David Crow17-Sep-07 8:14 
GeneralRe: CSpinButtonCtrl and WM_VSCROLL Pin
Californian217-Sep-07 8:41
Californian217-Sep-07 8:41 
GeneralRe: CSpinButtonCtrl and WM_VSCROLL Pin
David Crow17-Sep-07 10:03
David Crow17-Sep-07 10:03 
GeneralRe: CSpinButtonCtrl and WM_VSCROLL Pin
Californian217-Sep-07 13:04
Californian217-Sep-07 13:04 
AnswerRe: CSpinButtonCtrl and WM_VSCROLL Pin
Mark Salsbery17-Sep-07 8:38
Mark Salsbery17-Sep-07 8:38 
GeneralRe: CSpinButtonCtrl and WM_VSCROLL Pin
Californian217-Sep-07 8:55
Californian217-Sep-07 8:55 
GeneralRe: CSpinButtonCtrl and WM_VSCROLL Pin
Mark Salsbery17-Sep-07 9:10
Mark Salsbery17-Sep-07 9:10 
QuestionVS2005 assertion when DoModal called from DLL Pin
Russell Gantman17-Sep-07 5:57
Russell Gantman17-Sep-07 5:57 
I just upgraded my compiler from VS2003 to VS2005 SP1 and when I attempt to display
a modal dialog which is contained in a DLL, I get an assertion (in DEBUG only).

I have traced the problem to the following line of code :
#ifdef _DEBUG
	if ( AfxGetApp()->IsKindOf( RUNTIME_CLASS( COleControlModule ) ) )
	{
		TRACE(traceAppMsg, 0, "Warning: Creating dialog from within a COleControlModule application is not a supported scenario.\n");
	}
#endif


What I found is AfxGetApp() is returning NULL when I call it from my DLL, which causes the assertion in IsKindOf(...)
I also found that is is a "bug" with VS SP1.
Has anyone figured out how to make this call work.

BTW, I do make a call to "AFX_MANAGE_STATE(AfxGetStaticModuleState());" immediately after entering my DLL function.

Few other notes which might be of interest:
I am building MFC as a static lib (company requirement)
I am statically linking (not calling LoadLibrary) for the DLL





I skate to where the puck is going to be, not where it is. --Wayne Gretzky

AnswerRe: VS2005 assertion when DoModal called from DLL Pin
Mark Salsbery17-Sep-07 8:48
Mark Salsbery17-Sep-07 8:48 
GeneralRe: VS2005 assertion when DoModal called from DLL Pin
Russell Gantman17-Sep-07 10:57
Russell Gantman17-Sep-07 10:57 
GeneralRe: VS2005 assertion when DoModal called from DLL Pin
Mark Salsbery17-Sep-07 13:07
Mark Salsbery17-Sep-07 13:07 
GeneralRe: VS2005 assertion when DoModal called from DLL Pin
Russell Gantman18-Sep-07 9:00
Russell Gantman18-Sep-07 9:00 
GeneralRe: VS2005 assertion when DoModal called from DLL Pin
Mark Salsbery18-Sep-07 9:34
Mark Salsbery18-Sep-07 9:34 
GeneralRe: VS2005 assertion when DoModal called from DLL Pin
Russell Gantman20-Sep-07 7:33
Russell Gantman20-Sep-07 7:33 
QuestionMigration of a VCPP program to Windows Vista Pin
kchatterjee17-Sep-07 5:04
kchatterjee17-Sep-07 5:04 
AnswerRe: Migration of a VCPP program to Windows Vista Pin
David Crow17-Sep-07 5:50
David Crow17-Sep-07 5:50 
GeneralRe: Migration of a VCPP program to Windows Vista Pin
jhwurmbach17-Sep-07 6:12
jhwurmbach17-Sep-07 6:12 
Questionchoosing Threads Pin
Gofur Halmurat17-Sep-07 4:35
Gofur Halmurat17-Sep-07 4:35 
AnswerRe: choosing Threads Pin
DevMentor.org17-Sep-07 4:38
DevMentor.org17-Sep-07 4:38 
GeneralRe: choosing Threads Pin
Gofur Halmurat17-Sep-07 6:02
Gofur Halmurat17-Sep-07 6:02 
GeneralRe: choosing Threads Pin
DevMentor.org17-Sep-07 6:33
DevMentor.org17-Sep-07 6:33 
AnswerRe: choosing Threads Pin
jhwurmbach17-Sep-07 4:39
jhwurmbach17-Sep-07 4:39 
AnswerRe: choosing Threads Pin
Nemanja Trifunovic17-Sep-07 4:45
Nemanja Trifunovic17-Sep-07 4:45 
AnswerRe: choosing Threads Pin
El Corazon17-Sep-07 6:30
El Corazon17-Sep-07 6:30 
QuestionWindows / Container like application Pin
Programm3r17-Sep-07 4:19
Programm3r17-Sep-07 4:19 

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.