Click here to Skip to main content
15,921,203 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionExponents Pin
karnal3-Oct-05 19:42
karnal3-Oct-05 19:42 
AnswerRe: Exponents Pin
Jose Lamas Rios3-Oct-05 21:02
Jose Lamas Rios3-Oct-05 21:02 
AnswerRe: Exponents Pin
dima_kdl4-Oct-05 1:45
dima_kdl4-Oct-05 1:45 
Questionhow do i typecast a CString to TCHAR type? Pin
Anonymous3-Oct-05 19:30
Anonymous3-Oct-05 19:30 
AnswerRe: how do i typecast a CString to TCHAR type? Pin
ThatsAlok3-Oct-05 19:39
ThatsAlok3-Oct-05 19:39 
GeneralRe: how do i typecast a CString to TCHAR type? Pin
Anonymous3-Oct-05 20:04
Anonymous3-Oct-05 20:04 
GeneralRe: how do i typecast a CString to TCHAR type? Pin
Anonymous3-Oct-05 20:19
Anonymous3-Oct-05 20:19 
GeneralRe: how do i typecast a CString to TCHAR type? Pin
Jose Lamas Rios3-Oct-05 20:40
Jose Lamas Rios3-Oct-05 20:40 
GeneralRe: how do i typecast a CString to TCHAR type? Pin
Anonymous3-Oct-05 22:17
Anonymous3-Oct-05 22:17 
GeneralRe: how do i typecast a CString to TCHAR type? Pin
Lane Yu4-Oct-05 3:59
Lane Yu4-Oct-05 3:59 
AnswerRe: how do i typecast a CString to TCHAR type? Pin
Jose Lamas Rios3-Oct-05 20:29
Jose Lamas Rios3-Oct-05 20:29 
Questionhow to clear browse info Pin
Anonymous3-Oct-05 18:30
Anonymous3-Oct-05 18:30 
AnswerRe: how to clear browse info Pin
ThatsAlok3-Oct-05 19:18
ThatsAlok3-Oct-05 19:18 
AnswerRe: how to clear browse info Pin
Prakash Nadar3-Oct-05 22:15
Prakash Nadar3-Oct-05 22:15 
QuestionUsing GDI+ in View Pin
The NULL Developer3-Oct-05 18:23
professionalThe NULL Developer3-Oct-05 18:23 
i'm using the following code in my SDI application:
void CMyView::OnDraw(CDC* /*pDC*/)
{
	CMyDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	if (!pDoc)
		return;

	// TODO: add draw code for native data here
	Graphics    graphics(m_hWnd);
	SolidBrush  brush(Color(255, 0, 0, 0));
	FontFamily  fontFamily(L"Times New Roman");
	Font        font(&fontFamily, 20, FontStyleRegular, UnitPixel);
	RectF		rectF(0.0f, 5.0f, 140.0f, 40.0f);
	StringFormat stringFormat;

	stringFormat.SetAlignment(StringAlignmentCenter);
	graphics.SetSmoothingMode(SmoothingModeAntiAlias);
	
	graphics.DrawString(L"Text", -1, &font, rectF, &stringFormat, &brush);
}

but when i run the application, the following message is displayed and application does not contiues furter:

Unhandled exception at 0x7c918fea in Dxf.exe: 0xC0000005: Access violation writing location 0x00000010.

the above code works fine for dialog classes. what might possibly be wrong?

Do first things first, and second things not at all. —Peter Drucker.
AnswerRe: Using GDI+ in View Pin
The NULL Developer3-Oct-05 20:59
professionalThe NULL Developer3-Oct-05 20:59 
GeneralRe: Using GDI+ in View Pin
Prakash Nadar3-Oct-05 22:55
Prakash Nadar3-Oct-05 22:55 
GeneralRe: Using GDI+ in View Pin
The NULL Developer3-Oct-05 23:20
professionalThe NULL Developer3-Oct-05 23:20 
QuestionAccessing the Store procedure in c++ Pin
Anonymous3-Oct-05 17:15
Anonymous3-Oct-05 17:15 
QuestionPocket PC emulator Pin
fjlv20053-Oct-05 15:58
fjlv20053-Oct-05 15:58 
AnswerRe: Pocket PC emulator Pin
Ghasrfakhri3-Oct-05 21:12
Ghasrfakhri3-Oct-05 21:12 
GeneralRe: Pocket PC emulator Pin
fjlv20054-Oct-05 15:29
fjlv20054-Oct-05 15:29 
QuestionSimplifying debug traces in the Output window Pin
srev3-Oct-05 14:07
srev3-Oct-05 14:07 
AnswerRe: Simplifying debug traces in the Output window Pin
David Crow4-Oct-05 3:18
David Crow4-Oct-05 3:18 
QuestionActiveX and NM_CUSTOMDRAW Pin
levaey3-Oct-05 12:50
levaey3-Oct-05 12:50 

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.