Click here to Skip to main content
15,924,679 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Trouble passing a class pointer to AfxBeingThread Pin
MailtoGops22-Aug-05 23:00
MailtoGops22-Aug-05 23:00 
GeneralQ about WINDBG Pin
valerie9922-Aug-05 12:41
valerie9922-Aug-05 12:41 
GeneralRe: Q about WINDBG Pin
Blake Miller23-Aug-05 4:28
Blake Miller23-Aug-05 4:28 
QuestionHow to use the WIN32API in MFC Application?? Pin
shanzy22-Aug-05 12:03
shanzy22-Aug-05 12:03 
AnswerRe: How to use the WIN32API in MFC Application?? Pin
Christian Graus22-Aug-05 12:40
protectorChristian Graus22-Aug-05 12:40 
GeneralRe: How to use the WIN32API in MFC Application?? Pin
shanzy22-Aug-05 12:50
shanzy22-Aug-05 12:50 
GeneralRe: How to use the WIN32API in MFC Application?? Pin
Christian Graus22-Aug-05 13:03
protectorChristian Graus22-Aug-05 13:03 
GeneralRe: How to use the WIN32API in MFC Application?? Pin
shanzy22-Aug-05 14:01
shanzy22-Aug-05 14:01 
I'm a beginer,and now I read the book《Programming Windows with MF,second Edition》,this is the source code:

//myfirst.h

class CMyApp:public CWinApp
{
public:
virtual BOOL InitInstance();
};

class CMyFrameWnd:public CFrameWnd
{
public:
CMyFrameWnd();
protected:
afx_msg void OnPaint();
DECLARE_MESSAGE_MAP()
};

////////////////////////////////////////////////

#include <afxwin.h>
#include "myfirst.h"

CMyApp theApp;

BOOL CMyApp::InitInstance()
{
m_pMainWnd = new CMyFrameWnd;
::ShowWindow(*this,SW_SHOWNORMAL);
::UpdateWindow(*this);

return TRUE;
}

BEGIN_MESSAGE_MAP(CMyFrameWnd, CFrameWnd)
ON_WM_PAINT()
END_MESSAGE_MAP()

CMyFrameWnd::CMyFrameWnd()
{
Create(NULL, _T("myfirstMFC"));
}

void CMyFrameWnd::OnPaint()
{

CPaintDC mydc(this);

CRect rect;

GetClientRect(&rect);

mydc.DrawText(_T("MFC"),-1,&rect,DT_SINGLELINE|DT_CENTER|DT_VCENTER);
}

It also don't work, If you can explain with circumstances why it doesn't work

Thanks!


shanzy
GeneralRe: How to use the WIN32API in MFC Application?? Pin
Christian Graus22-Aug-05 14:03
protectorChristian Graus22-Aug-05 14:03 
GeneralRe: How to use the WIN32API in MFC Application?? Pin
shanzy22-Aug-05 14:08
shanzy22-Aug-05 14:08 
GeneralRe: How to use the WIN32API in MFC Application?? Pin
Christian Graus22-Aug-05 14:10
protectorChristian Graus22-Aug-05 14:10 
GeneralRe: How to use the WIN32API in MFC Application?? Pin
shanzy22-Aug-05 14:26
shanzy22-Aug-05 14:26 
AnswerRe: How to use the WIN32API in MFC Application?? Pin
Jose Lamas Rios22-Aug-05 17:25
Jose Lamas Rios22-Aug-05 17:25 
AnswerRe: How to use the WIN32API in MFC Application?? Pin
ThatsAlok22-Aug-05 20:13
ThatsAlok22-Aug-05 20:13 
GeneralRe: How to use the WIN32API in MFC Application?? Pin
shanzy22-Aug-05 21:49
shanzy22-Aug-05 21:49 
GeneralWMI Pin
YusufK22-Aug-05 10:52
YusufK22-Aug-05 10:52 
GeneralRe: WMI Pin
Christian Graus22-Aug-05 12:02
protectorChristian Graus22-Aug-05 12:02 
GeneralRe: WMI Pin
YusufK23-Aug-05 7:59
YusufK23-Aug-05 7:59 
GeneralRe: WMI Pin
Christian Graus23-Aug-05 13:27
protectorChristian Graus23-Aug-05 13:27 
GeneralRe: WMI Pin
MailtoGops23-Aug-05 0:14
MailtoGops23-Aug-05 0:14 
GeneralRe: WMI Pin
YusufK23-Aug-05 8:02
YusufK23-Aug-05 8:02 
GeneralUsing MAC address Pin
Shay Harel22-Aug-05 8:28
Shay Harel22-Aug-05 8:28 
GeneralRe: Using MAC address Pin
Johnny ²22-Aug-05 10:25
Johnny ²22-Aug-05 10:25 
GeneralRe: Using MAC address Pin
Shay Harel22-Aug-05 10:39
Shay Harel22-Aug-05 10:39 
GeneralRe: Using MAC address Pin
geo_m22-Aug-05 20:29
geo_m22-Aug-05 20:29 

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.