I am trying to compile NeHe code for win32 app in visual studio 2010. but this error appear:

cannot convert parameter 2 from 'const char [29]' to 'LPCWSTR'
1>          Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

to these instructions

if (!wglMakeCurrent(NULL,NULL))					// Are We Able To Release The DC And RC Contexts?
		{
			MessageBox(NULL,"Release Of DC And RC Failed.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION);
		}

can you help me plz.

this error:

cannot convert parameter 2 from 'const char [29]' to 'LPCWSTR'

means you use Unicode in project proberties not ansi so you can change it to ansi or just Put L before string

MessageBox(NULL,L"Release Of DC And RC Failed.",L"SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION);

Thank you very much.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.