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

Managed C++/CLI

 
QuestionI am new to programming Pin
Red Lake16-Jul-07 8:54
Red Lake16-Jul-07 8:54 
AnswerRe: I am new to programming Pin
Wes Aday16-Jul-07 9:33
professionalWes Aday16-Jul-07 9:33 
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 
I need some help...
I have a dialog based app and I want to register the (window) class. So many question have I.

1) where do I put my code for registering the class?
2) do I use RegisterClass, RegisterClassEX, AfxRegisterClass, AfxRegisterClassEx?
3) REASON: interprocess communication using Windows Messaging

I have some legacy code that i'm looking at for an example, but it is a Doc-View type and it appears easier as it has the registeration inside the PreCreateWindow( ) function - see below

Thanks,
Johnny

<br />
#define MYAPPWINDOW_CLASSNAME	_T("MyOwnWindow")	//window class name<br />
<br />
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)<br />
<br />
	//register MYAPPWindow class if not already registered<br />
	WNDCLASS  wndcls;<br />
	HINSTANCE hInst = AfxGetInstanceHandle();<br />
<br />
	if( !(::GetClassInfo(hInst, MYAPPWINDOW_CLASSNAME, &wndcls)) )<br />
	{<br />
	   if( ::GetClassInfo( hInst, cs.lpszClass, &wndcls ))<br />
	   {<br />
	      wndcls.lpszClassName = MYAPPWINDOW_CLASSNAME;<br />
	      wndcls.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDR_MAINFRAME));<br />
	      if( !AfxRegisterClass(&wndcls) )<br />
	      {<br />
	         AfxThrowResourceException();<br />
	         return FALSE;<br />
	      }<br />
	   }<br />
	   else<br />
	   {<br />
	      AfxThrowResourceException();<br />
	      return FALSE;<br />
	   }<br />
	}<br />
<br />
	cs.lpszClass = MYAPPWINDOW_CLASSNAME;<br />

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 
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 

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.