Click here to Skip to main content
15,918,178 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: error in a very simple VC++ program Pin
Sarath C22-May-07 19:41
Sarath C22-May-07 19:41 
AnswerRe: error in a very simple VC++ program Pin
tyagineha22-May-07 23:32
tyagineha22-May-07 23:32 
GeneralRe: error in a very simple VC++ program Pin
Sarath C22-May-07 23:54
Sarath C22-May-07 23:54 
AnswerRe: error in a very simple VC++ program Pin
tyagineha23-May-07 0:24
tyagineha23-May-07 0:24 
GeneralRe: error in a very simple VC++ program Pin
Sarath C23-May-07 0:26
Sarath C23-May-07 0:26 
AnswerRe: error in a very simple VC++ program [modified] Pin
tyagineha23-May-07 0:37
tyagineha23-May-07 0:37 
AnswerRe: error in a very simple VC++ program [modified] Pin
tyagineha23-May-07 1:18
tyagineha23-May-07 1:18 
GeneralRe: error in a very simple VC++ program [modified] Pin
Sarath C23-May-07 2:22
Sarath C23-May-07 2:22 
Sorry Neha,
I could not see any bug in your code unless some spelling mistakes

#include <afxwin.h><br />
<br />
class CMainWin :public CFrameWnd<br />
{<br />
public:<br />
	CMainWin();<br />
	DECLARE_MESSAGE_MAP()<br />
};<br />
<br />
<br />
CMainWin ::CMainWin()<br />
{<br />
	Create(NULL,"Hello");<br />
}<br />
<br />
<br />
class CApp:public CWinApp<br />
{<br />
public:<br />
	BOOL InitInstance();<br />
};<br />
<br />
BOOL CApp :: InitInstance()<br />
{<br />
	m_pMainWnd= new CMainWin;<br />
	m_pMainWnd ->ShowWindow(m_nCmdShow);<br />
	m_pMainWnd ->UpdateWindow();<br />
	return TRUE;<br />
}<br />
<br />
BEGIN_MESSAGE_MAP(CMainWin,CFrameWnd)<br />
END_MESSAGE_MAP()<br />
<br />
CApp App; 


The above code worked fine for me.


-- modified at 8:31 Wednesday 23rd May, 2007

-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin


GeneralRe: error in a very simple VC++ program Pin
David Crow23-May-07 4:24
David Crow23-May-07 4:24 
QuestionOTL Connectivity Pin
jannathali22-May-07 19:03
jannathali22-May-07 19:03 
AnswerRe: OTL Connectivity Pin
Hamid_RT22-May-07 19:31
Hamid_RT22-May-07 19:31 
QuestionUSB: Write data to a USB device via USB channel? Pin
Maxwell Chen22-May-07 16:50
Maxwell Chen22-May-07 16:50 
AnswerRe: USB: Write data to a USB device via USB channel? Pin
Cedric Moonen22-May-07 20:00
Cedric Moonen22-May-07 20:00 
GeneralRe: USB: Write data to a USB device via USB channel? Pin
Maxwell Chen22-May-07 20:34
Maxwell Chen22-May-07 20:34 
GeneralRe: USB: Write data to a USB device via USB channel? Pin
Cedric Moonen22-May-07 20:40
Cedric Moonen22-May-07 20:40 
GeneralRe: USB: Write data to a USB device via USB channel? Pin
Maxwell Chen22-May-07 20:44
Maxwell Chen22-May-07 20:44 
QuestionHow to temporarily pause all threads except one Pin
GameProfessor22-May-07 16:43
GameProfessor22-May-07 16:43 
AnswerRe: How to temporarily pause all threads except one Pin
User 58385222-May-07 17:33
User 58385222-May-07 17:33 
AnswerRe: How to temporarily pause all threads except one Pin
Stephen Hewitt22-May-07 17:37
Stephen Hewitt22-May-07 17:37 
GeneralRe: How to temporarily pause all threads except one Pin
GameProfessor22-May-07 17:44
GameProfessor22-May-07 17:44 
QuestionPush button or keyboard arrows? Pin
*Roxanna*22-May-07 15:33
*Roxanna*22-May-07 15:33 
AnswerRe: Push button or keyboard arrows? Pin
Nishad S22-May-07 19:00
Nishad S22-May-07 19:00 
QuestionAbout Windows Registry Pin
Akin Ocal22-May-07 14:16
Akin Ocal22-May-07 14:16 
AnswerRe: About Windows Registry Pin
User 58385222-May-07 19:37
User 58385222-May-07 19:37 
AnswerRe: About Windows Registry Pin
Hamid_RT22-May-07 19:47
Hamid_RT22-May-07 19:47 

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.