- 博客(23)
- 收藏
- 关注
原创 Run time error assertion failed afxwin1.inl Line24
<br /> <br />Run time error <br /> <br />dubg assertion failed<br />f:/dd/vctools/vc7libs/ship/atlmfc/include/afxwin1.inl Line24<br /> <br />AFX_MANAGE_STATE(AfxGetStaticModuleState());<br /> <br />Pasted from <http://social.msdn.microsoft.com/Forums/en-US
2011-04-19 10:45:00
1657
原创 error LNK2019: unresolved external symbol ATL:CStringT
<br />check charactor set, use Unicode.
2011-04-19 10:40:00
537
原创 combo box item highlight event
<br />could use DrawItem event, to make it work, need set DrawMode property to OwnerDrawFixed.<br /> private void comboBox1_DrawItem(object sender, DrawItemEventArgs e) { if ((e.State & DrawItemState.Selected) == DrawItemState.Selecte
2011-02-25 14:59:00
445
原创 Serearlize class : List
<br />Serearlize class like <br />public class ListDataModel: List<TestDatamodel><br />{<br /> public double D{get;set;}<br />}<br /> <br />to XML will not generate property D. this is the behaviour, we need to write xml reader/writer function by ou
2011-02-18 17:31:00
352
原创 How to import xml data into excel
Excel.Application oXL;Excel._Workbook oWB;Excel._Worksheet osheet;Excel.Range oRng;object opt = Type.Missing;try{ oXL = new Microsoft.Office.Interop.Excel.Application(); oWB =
2009-06-11 17:54:00
612
原创 SerializeDicitionary, better xml Node
public class SerializeDictionary : IXmlSerializable { Dictionary serializeDictionary=new Dictionary(); #region IXmlSerializable Members public System.Xml.Schema.Xml
2009-04-14 15:02:00
126
原创 How to Get Hardware Information using C#
1. First using System.Management 2.Create a ManagementObjectSearcher Object ManagementObjectSearcher searcher = new ManagementObjectSearcher( "select * from " + Key); List of Key: Win32_1394Contro
2009-04-09 19:18:00
946
原创 Example of Seriazable List
如果class中包含List abc property,xml不会自动seriaze 这个item。 只能得到根据上一篇的启发,实现了类似功能的List class, 代码如下:public class SeriazableList:List, IXmlSerializable { #region IXmlSerializable Members
2008-12-24 16:17:00
607
原创 Seriazable Dictionary
using System; using System.Collections.Generic; using System.Text; using System.Xml.Serialization; [XmlRoot("dictionary")] public class SerializableDictionary : Di
2008-12-24 14:11:00
557
原创 Debug C++ dll in C# project
1. C# project properites, Debug->check Enable unmaged code debugging 2. C++ project, properites, Debugging: Debugger Type: Mixed
2008-11-11 19:11:00
330
原创 Not Include "stdafx.h"
c++ 代码中.cpp文件如果不包含"stdafx.h"会报错,如果不希望使用该文件, 做如下设置。 Project properties->C/C++->Precompiled Headers->Create/Use Precompiled Header->set Not Using Precompiled Headers
2008-11-11 19:04:00
468
原创 Convert From BSTR to String
#include #include #pragma comment(lib, "comsuppw.lib") int main() { BSTR bstrText = ::SysAllocString(L"Text"); wprintf(L"BATR text: %s/n",bstrText); char* lpszText2 = _
2008-11-11 05:24:00
480
原创 2个空瓶换一瓶
2元钱一瓶啤酒,2个空瓶换一瓶啤酒,现在有100元,最多可以喝多少瓶啤酒? 100元 买 50瓶, 有50个瓶子。-------------------------------------5050个瓶子换 25瓶啤酒, 有25个瓶子-------------------------------2525个瓶子环12瓶啤酒,剩13个瓶子,------------------------
2008-10-28 10:42:00
877
原创 背景闪烁问题
项目中应用程序用了张背景图片,使用tile方式。一直有闪烁问题。here is some comments in MSDN:You can increase performance for large images if you set BackgroundImageLayout to something other than Tile. So I changed background
2008-10-27 13:55:00
387
原创 初识MCPD
昨日突想,考个啥啥认证玩玩何如,经过一番搜索,目标定在微软 MCPD认证上。 Microsoft Certified Professional Developer: Windows Developer (MCPD: Windows Developer) 要参加3门考试可获得两个证书。 首先要获得 MCTS: .NET Framework 2.0 Windows Applications
2008-10-09 15:23:00
456
原创 open text file with notpad from c# code
记下来,方便下次使用:)System.Diagnostics.Process.Start("notePad.exe", fileName);
2008-07-15 18:02:00
352
转载 HOW TO:利用 Visual C# .NET 使 Word 自动新建文档
导读: 修订 : 3.2 本文分步介绍如何利用 Visual C# .NET 的自动化功能在 Word 中创建新文档。 代码示例本文中的代码示例将说明如何完成以下任务: 插入包含文本和格式的段落。 浏览和修改文档中的不同范围。 插入表格、设置表格格式并在表格中填充数据。 添加图表。 要利用 Visual C# .NET 的自动
2008-06-23 16:56:00
506
原创 code 判断design mode
// This call is required by the Windows.Forms Form Designer. if (GetService(typeof(IDesignerHost)) != null) designMode = true; if (System.ComponentModel.LicenseM
2008-02-27 16:20:00
606
原创 Call Unmanaged DLLs from C#
导读: Download the code for this article:CQA0208.exe (47 KB) QHow do I call a DLL or Win32 API function from my C# code if the function has a string (char*) output parameter? I can pass a string
2008-01-18 15:46:00
1666
原创 ListBox item 自定义颜色
DrawMode property = DrawMode.OwnerDrawFixed and implement private void listBox_selectedProperties_DrawItem(object sender, DrawItemEventArgs e) function
2008-01-15 15:35:00
466
原创 Manual steps to re-create the Show Desktop icon on the Quick Launch toolbar
The Show Desktop icon is not an ordinary program shortcut. If the icon is deleted, the procedure for re-creating the icon is not obvious. To manually re-create the Show Desktop icon, follow these st
2008-01-15 15:34:00
771
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人