Click here to Skip to main content
15,943,032 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: I am new to programming Pin
Red Lake16-Jul-07 9:48
Red Lake16-Jul-07 9:48 
GeneralRe: I am new to programming Pin
Wes Aday16-Jul-07 9:55
professionalWes Aday16-Jul-07 9:55 
AnswerRe: I am new to programming Pin
Paul Conrad16-Jul-07 10:07
professionalPaul Conrad16-Jul-07 10:07 
GeneralRe: I am new to programming Pin
Red Lake16-Jul-07 10:22
Red Lake16-Jul-07 10:22 
GeneralRe: I am new to programming Pin
Paul Conrad16-Jul-07 10:52
professionalPaul Conrad16-Jul-07 10:52 
QuestionRegistering Window Class Pin
john john mackey16-Jul-07 8:38
john john mackey16-Jul-07 8:38 
AnswerRe: Registering Window Class Pin
Mark Salsbery16-Jul-07 9:51
Mark Salsbery16-Jul-07 9:51 
GeneralRe: Registering Window Class Pin
john john mackey16-Jul-07 11:52
john john mackey16-Jul-07 11:52 
I am still lost and now frustrated (with MSDN documentation on the matter.)

What I have is a dialog based app and inside my OnInitDialog(), I have put what is the beginnings of registering my window class..

When I do this, i get the runtime "warning" that "A required resource was unavailable." (i trace this to the second call to ::GetClassInfo() as I don't know how to properly supply the 2nd parameter.)

<code>BOOL CMyDlg::OnInitDialog()
{
	CDialog::OnInitDialog();
//yadda yadda yadda

	// register MyOwnApp window class if not already registered

	WNDCLASS	wndcls;
	HINSTANCE hInst = AfxGetInstanceHandle();

	if( !(::GetClassInfo(hInst, MYOWNAPP_CLASSNAME, &wndcls)) )
	{
		if( ::GetClassInfo( hInst, NULL, &wndcls ))
		{
			wndcls.lpszClassName = MYOWNAPP_CLASSNAME;
//			wndcls.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDR_MAINFRAME));
			if( !AfxRegisterClass(&wndcls) )
			{
				AfxThrowResourceException();
				return FALSE;
			}
		}
		else
		{
			AfxThrowResourceException();
			return FALSE;
		}
	}

	return TRUE;  // return TRUE  unless you set the focus to a control
}
</code>

GeneralRe: Registering Window Class Pin
Mark Salsbery16-Jul-07 12:28
Mark Salsbery16-Jul-07 12:28 
QuestionEmbedded null characters in record Pin
BuckBrown16-Jul-07 8:36
BuckBrown16-Jul-07 8:36 
AnswerRe: Embedded null characters in record Pin
Paul Conrad21-Jul-07 18:53
professionalPaul Conrad21-Jul-07 18:53 
GeneralRe: Embedded null characters in record Pin
BuckBrown23-Jul-07 12:09
BuckBrown23-Jul-07 12:09 
GeneralRe: Embedded null characters in record Pin
Paul Conrad23-Jul-07 12:13
professionalPaul Conrad23-Jul-07 12:13 
Questionglobale vairable for two diffrente methode Pin
abbd16-Jul-07 5:54
abbd16-Jul-07 5:54 
AnswerRe: globale vairable for two diffrente methode Pin
Mark Salsbery16-Jul-07 7:02
Mark Salsbery16-Jul-07 7:02 
QuestionHow to overload "=" operator in a class? Pin
ShadowBoi15-Jul-07 17:59
ShadowBoi15-Jul-07 17:59 
AnswerRe: How to overload &quot;=&quot; operator in a class? Pin
Mark Salsbery16-Jul-07 7:16
Mark Salsbery16-Jul-07 7:16 
QuestionlistView c++ cli Pin
abbd15-Jul-07 8:42
abbd15-Jul-07 8:42 
AnswerRe: listView c++ cli [modified] Pin
Mark Salsbery15-Jul-07 10:01
Mark Salsbery15-Jul-07 10:01 
AnswerRe: listView c++ cli Pin
George L. Jackson15-Jul-07 15:46
George L. Jackson15-Jul-07 15:46 
GeneralRe: listView c++ cli Pin
Mark Salsbery16-Jul-07 7:18
Mark Salsbery16-Jul-07 7:18 
GeneralRe: listView c++ cli Pin
George L. Jackson17-Jul-07 11:44
George L. Jackson17-Jul-07 11:44 
GeneralRe: listView c++ cli Pin
Mark Salsbery17-Jul-07 13:12
Mark Salsbery17-Jul-07 13:12 
QuestionDeclaration of global variables Pin
abbd14-Jul-07 14:02
abbd14-Jul-07 14:02 
AnswerRe: Declaration of global variables Pin
Mark Salsbery14-Jul-07 16:52
Mark Salsbery14-Jul-07 16:52 

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.