本文整理汇总了C++中framework::CStream::Write16方法的典型用法代码示例。如果您正苦于以下问题:C++ CStream::Write16方法的具体用法?C++ CStream::Write16怎么用?C++ CStream::Write16使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类framework::CStream
的用法示例。
在下文中一共展示了CStream::Write16方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WriteString
void CDialog::WriteString(const std::wstring& str, Framework::CStream& stream)
{
for(wchar_t character : str)
{
stream.Write16(character);
}
stream.Write16(0);
}
示例2: WriteSzOrOrd
void CDialog::WriteSzOrOrd(const SZ_OR_ORD& szOrOrd, Framework::CStream& stream)
{
stream.Write16(szOrOrd.isString);
if(szOrOrd.isString == 0xFFFF)
{
stream.Write16(szOrOrd.ord);
}
else if(szOrOrd.isString != 0)
{
WriteString(szOrOrd.str, stream);
}
}
示例3: WriteDialogTemplate
void CDialog::WriteDialogTemplate(DIALOGTEMPLATE& dialog, Framework::CStream& stream)
{
stream.Write16(dialog.dlgVer);
stream.Write16(dialog.signature);
stream.Write32(dialog.helpID);
stream.Write32(dialog.exStyle);
stream.Write32(dialog.style);
stream.Write16(dialog.cDlgItems);
stream.Write16(dialog.x);
stream.Write16(dialog.y);
stream.Write16(dialog.cx);
stream.Write16(dialog.cy);
WriteSzOrOrd(dialog.menu, stream);
WriteSzOrOrd(dialog.windowClass, stream);
WriteString(dialog.title, stream);
stream.Write16(dialog.pointsize);
stream.Write16(dialog.weight);
stream.Write8(dialog.italic);
stream.Write8(dialog.charset);
WriteString(dialog.typeface, stream);
//Pad struct for alignment to DWORD boundary
{
auto currentBytePos = stream.Tell() & 0x3;
if(currentBytePos != 0)
{
for(unsigned int i = 0; i < (4 - currentBytePos); i++)
{
stream.Write8(0);
}
}
assert((stream.Tell() & 0x03) == 0);
}
if(!dialog.dialogItemData.empty())
{
stream.Write(dialog.dialogItemData.data(), dialog.dialogItemData.size());
}
}