新手问一下:在vc中用什么函数把字符数字转化为int型。 好象用强制转化不行啊。用什么函数? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 CString Str;int Y;Str="12345";Y=atoi(Str); int i=12345;CString Str;Str.Format("%d",i);AfxMessageBox(Str); void CiEDM_MonthReportForms::OnPaint() { CPaintDC dc(this); // device context for painting CRect rect; //设置背景 GetClientRect(rect); dc.FillRect(rect,&m_Background); // Do not call CFormView::OnPaint() for painting messages} 那么加jpg等格式的 行不行呢?好像直接拖一个图片框然后加载图片都是ico或bmp的,而且设不了为背景. 问一下csdnxx:我只是用vc生成基于对话框的程序框架.用您那个行吗CiEDM_MonthReportForms是什么类? csdnxx:放心,我的分全部给你. CiEDM_MonthReportForms::CiEDM_MonthReportForms() : CFormView(CiEDM_MonthReportForms::IDD){ //{{AFX_DATA_INIT(CiEDM_MonthReportForms) //}}AFX_DATA_INIT CBitmap bmp; //载入位图 bmp.LoadBitmap(IDB_UserBackImage); m_Background.CreatePatternBrush(&bmp);}void CiEDM_MonthReportForms::OnPaint() { CPaintDC dc(this); // device context for painting CRect rect; //设置背景 GetClientRect(rect); dc.FillRect(rect,&m_Background); // Do not call CFormView::OnPaint() for painting messages}CiEDM_MonthReportForms是自已的窗体基类 CString Str;int Y;Str="12345";Y=atoi(Str); 60分求用createprocess注入dll的方法 [求助]MFC中printf、cout这些命令是不可以使用的吗? 请教下个问题 flex 与vc6.0交互时,为什么flex写代码调用vc接口一次,而vc接到多次? 求关键帧提取算法 实现程序 请教SetScrollSizes是否可以随便使用 GDI+ 绘制png文件问题 关于handle类和NULL值的问题 数据库编程中改变数据源的问题,急! 求助,在编译release版的时候出错,提示“不允许 dllimport 静态数据成员” 如何把CString类型转变成char *类型 send 函数有些不明白的地方
int Y;
Str="12345";
Y=atoi(Str);
CString Str;
Str.Format("%d",i);
AfxMessageBox(Str);
{
CPaintDC dc(this); // device context for painting
CRect rect; //设置背景
GetClientRect(rect);
dc.FillRect(rect,&m_Background);
// Do not call CFormView::OnPaint() for painting messages
}
好像直接拖一个图片框然后加载图片都是ico或bmp的,而且设不了为背景.
我只是用vc生成基于对话框的程序框架.
用您那个行吗CiEDM_MonthReportForms是什么类?
放心,我的分全部给你.
: CFormView(CiEDM_MonthReportForms::IDD)
{
//{{AFX_DATA_INIT(CiEDM_MonthReportForms)
//}}AFX_DATA_INIT
CBitmap bmp; //载入位图
bmp.LoadBitmap(IDB_UserBackImage);
m_Background.CreatePatternBrush(&bmp);
}void CiEDM_MonthReportForms::OnPaint()
{
CPaintDC dc(this); // device context for painting
CRect rect; //设置背景
GetClientRect(rect);
dc.FillRect(rect,&m_Background);
// Do not call CFormView::OnPaint() for painting messages
}CiEDM_MonthReportForms是自已的窗体基类
int Y;
Str="12345";
Y=atoi(Str);