当前位置: 首页>>代码示例>>C++>>正文


C++ WideString::c_bstr方法代码示例

本文整理汇总了C++中WideString::c_bstr方法的典型用法代码示例。如果您正苦于以下问题:C++ WideString::c_bstr方法的具体用法?C++ WideString::c_bstr怎么用?C++ WideString::c_bstr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WideString的用法示例。


在下文中一共展示了WideString::c_bstr方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: DrawGrids

// 表格绘制.
void DataGrids::DrawGrids(HDC _hdc)
{
	// 绘制x/y的箭头.
	WideString xStr = "电压(V)";
	WideString yStr = "时间(S)";

	m_stGrp = new Gdiplus::Graphics(_hdc);
	m_stGrp->SetSmoothingMode(Gdiplus::SmoothingModeHighQuality);

	/*FontFamily fontFamily(L"楷体_GB2312");
	Font font(&fontFamily, 30, FontStyleRegular, UnitPixel);
	*/
	Gdiplus::SolidBrush solidBrush(Gdiplus::Color(255, 0, 0, 255));
	Gdiplus::Pen p(Gdiplus::Color(255, 0, 0, 0),1);
	Gdiplus::AdjustableArrowCap cap(8,4,true);
	Gdiplus::Font font(L"楷体",12);
	Gdiplus::SolidBrush s( Gdiplus::Color(255, 0, 0, 0));

#define X(_x) UserX((_x)+xAxisOffset)
#define Y(_y) UserY((_y)+yAxisOffset)
	// 刻度线.Y轴.
	p.SetColor(Gdiplus::Color(255, 0, 0, 255));
	for(int i = 0; i * yMarkSpace < m_iHeight-yMarkSpace-8;i++)
	{
		m_stGrp->DrawLine(&p,X(0),Y(0+i*yMarkSpace),X(yMarkHeight+(((i%5)==0)?yMarkHeight:0)),Y(0+i*yMarkSpace));
	}

	for(int i = 0; i * yMarkSpace < m_iWidth-xMarkSpace-8;i++)
	{
		m_stGrp->DrawLine(&p,X(i*xMarkSpace),Y(0),X(i*xMarkSpace),Y(xMarkHeight+((i%5)==0?xMarkHeight:0)));
	}
	p.SetColor(Gdiplus::Color(255, 0, 0, 0));
	// Draw X,Y axises.
	p.SetCustomEndCap(&cap);
	m_stGrp->DrawLine(&p,X(0),Y(0),X(0),Y(m_iHeight)); // Draw Y axis
	m_stGrp->DrawLine(&p,X(0),Y(0),X(m_iWidth),Y(0));  // Draw X axis

	m_stGrp->DrawString(xStr.c_bstr(),xStr.Length(),&font,Gdiplus::PointF(30,10),&s);
	m_stGrp->DrawString(yStr.c_bstr(),yStr.Length(),&font,Gdiplus::PointF(m_iWidth-80,m_iHeight-50),&s);

#undef X(_x)
#undef Y(_y)

	DrawCurve();

	delete m_stGrp;
}
开发者ID:handsoul,项目名称:xmotor,代码行数:48,代码来源:DrawGraphics.cpp

示例2: FormShow

//---------------------------------------------------------------------------
void __fastcall TMainForm::FormShow(TObject *Sender){
	// 读取本地的一些设置,或是上次的配置参数
	TIniFile *ini = new TIniFile(GetCurrentDir() + "\\app.ini");
	int userId = ini->ReadInteger("Center", "UserId", 0);
	AnsiString st = ini->ReadString("Center", "ST", "");
	DateTimePicker->Time = ini->ReadTime("Center", "ShutdownTime", StrToTime("23:45:00"));
	//是否跳过登录界面
	if (userId ==0 || st ==""){
		LoginForm->ShowModal();
	}else{
		controller->centerId =userId;
		controller->centerSt =st;
	}
    TimerTask->Enabled =true;
	// 创建一个ActionList用于动态保存各个标签页的Action
	actionList = new TActionList(MainForm);
	// 读取本地的一些设置,或是上次的配置参数
	MainForm->Width = ini->ReadInteger("FormSize", "Width", 1024);
	MainForm->Height = ini->ReadInteger("FormSize", "Height", 768);
	delete ini;
	//
	FrameMonitor =new TFrameMonitor(this); 		   //用这个Frame,主要是用来加竖滚动条的,并且支持鼠标滑轮滚动
	FrameMonitor->Parent =PanelMonitorGroup;
	//文件打印内容明细
	StringGridTxt->Cells[0][0] ="行数";
	StringGridTxt->Cells[1][0] ="游戏ID";
	StringGridTxt->Cells[2][0] ="玩法类型";
	StringGridTxt->Cells[3][0] ="投注方式";
	StringGridTxt->Cells[4][0] ="彩票号码";
	StringGridTxt->Cells[5][0] ="倍";
	StringGridTxt->Cells[6][0] ="金额分";
	for (int i =0; i <StringGridTxt->RowCount; i++)	StringGridTxt->Cells[0][i+1] =IntToStr(i +1);
	//后台管理浏览器加载,防止Document设置Cookie时为空
	WideString HomePage =LOGIN_URL;
	WebBrowser->Navigate(HomePage.c_bstr());
	//显示登录页并且最大化窗口
	PageControl->ActivePageIndex =1;
	//总控制器初始化
	controller->Init();
	//调整位置
	FormResize(this);
    ShowErrMessage();
}
开发者ID:limitee,项目名称:bot,代码行数:44,代码来源:TicketCenterNodeApp.cpp

示例3: PutW

void TFStream::PutW(WideString&s)
{
int l=s.Length();
Write(&l,sizeof(int));
Write(s.c_bstr(),l*sizeof(wchar_t));
}
开发者ID:MOROZIL-nic,项目名称:craft,代码行数:6,代码来源:myclasses.cpp


注:本文中的WideString::c_bstr方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。