随笔分类 -  c++ builder

摘要:void __fastcall TForm1::DBGrid1DrawColumnCell(TObject *Sender, const TRect &Rect, int DataCol, TColumn *Column, TGridDrawState State){ AnsiString name= Column->Field->DataSet->FieldByName("NAME")->AsString; if(name=="功能科室"&&DataCol==1) //只绘制name为功能科室行和第二列的 阅读全文
posted @ 2011-08-25 14:14 瓜蛋 阅读(957) 评论(0) 推荐(0)
摘要:VC默认为__stdcall, BCB默认为__cdecl, Delphi默认为__fastcall。 由于BCB使用Delphi的VCL库, 所以也必须使用__fastcall。 关键字 调用规则 参数传递方向 返回 参数寄存器 堆栈的清除 __cdecl C调用规则 从右向左 EAX 无 调用者 __fastcall 寄存器 从左向右 EAX EAX、EBX、ECX 被调用者 __stdcal... 阅读全文
posted @ 2011-08-20 22:10 瓜蛋 阅读(825) 评论(0) 推荐(0)
摘要:2008-09-16 14:54 1049人阅读 评论(1) 收藏 举报 __cdecl和__stdcall都是函数调用规范(还有一个__fastcall),规定了参数出入栈的顺序和方法,如果只用VC编程的话可以不用关心,但是要在C++和Pascal等其他语言通信的时候就要注意了,只有用相同的方法才能够调用成功.另外,像printf这样接受可变个数参数的函数只有用cdecl才能够实现. __dec... 阅读全文
posted @ 2011-08-20 21:55 瓜蛋 阅读(496) 评论(0) 推荐(0)
摘要:增加库文件 #pragma comment(lib, "odbccp32.lib ")包含头文件 #include <odbcinst.h>调用函数::SQLConfigDataSource(NULL,ODBC_ADD_DSN, "Oracle in OraDb10g_home1", "DSN=mT\0" "Description=DATASOURCE\0" "Server=his\0" ))示例:#include <vcl.h>#pragma hdrstop#inclu 阅读全文
posted @ 2011-08-18 08:27 瓜蛋 阅读(729) 评论(0) 推荐(0)
摘要:一. 编写 DLLFile/New/Dll 生成 Dll 的向导,然后可以添加导出函数和导出类导出函数:extern "C" __declspec(dllexport) ExportType FunctionName(Parameter)导出类:class __declspec(dllexport) ExportType ClassName{...}例子:(说明:只是生成了一个 DLL.dll )#include "DllForm.h"// TDllFrm 定义USERES("Dll.res");USEFORM("DllFo 阅读全文
posted @ 2011-07-31 18:25 瓜蛋 阅读(1230) 评论(0) 推荐(0)
摘要:关于DCLUSR60方法大概总结一下:(1) 打开 Project->Options,并且确定(2) 关闭,打开工程‘(3) 打开 EDITOPTION SOURCE ,删除dc lusr60,并保存(4) 关闭工程,要保存’(5) 打开编译,一般都能解决问题 阅读全文
posted @ 2011-07-25 11:44 瓜蛋 阅读(1337) 评论(0) 推荐(0)
摘要:首先声明。 这里所说的是要找的节点在xml中只有一个且,他是一个文本结点bool ReadSingleXmlElement(_di_IXMLNode parentNode,AnsiString const input,AnsiString& output){//读取单个文本节点 _di_IXMLNodeList nodelist=parentNode->ChildNodes; _di_IXMLNo... 阅读全文
posted @ 2011-07-19 12:46 瓜蛋 阅读(646) 评论(0) 推荐(0)
摘要://---------------------------------------------------------------------------#ifndef Unit1H#define Unit1H//---------------------------------------------------------------------------#include <Classes.hpp>#include <Controls.hpp>#include <StdCtrls.hpp>#include <Forms.hpp>#inclu 阅读全文
posted @ 2011-06-16 10:18 瓜蛋 阅读(671) 评论(0) 推荐(0)
摘要://---------------------------------------------------------------------------#ifndef Unit1H#define Unit1H//---------------------------------------------------------------------------#include <Classes.hpp>#include <Controls.hpp>#include <StdCtrls.hpp>#include <Forms.hpp>#inclu 阅读全文
posted @ 2011-06-16 09:54 瓜蛋 阅读(781) 评论(2) 推荐(0)
摘要://---------------------------------------------------------------------------#ifndef Unit1H#define Unit1H//---------------------------------------------------------------------------#include <Classes.hpp>#include <Controls.hpp>#include <StdCtrls.hpp>#include <Forms.hpp>#inclu 阅读全文
posted @ 2011-06-16 09:06 瓜蛋 阅读(638) 评论(0) 推荐(0)
摘要://---------------------------------------------------------------------------#ifndef Unit1H#define Unit1H//---------------------------------------------------------------------------#include <Classes.hpp>#include <Controls.hpp>#include <StdCtrls.hpp>#include <Forms.hpp>#inclu 阅读全文
posted @ 2011-06-13 21:34 瓜蛋 阅读(701) 评论(2) 推荐(0)
摘要://---------------------------------------------------------------------------#ifndef Unit1H#define Unit1H//---------------------------------------------------------------------------#include <Classes.hpp>#include <Controls.hpp>#include <StdCtrls.hpp>#include <Forms.hpp>#inclu 阅读全文
posted @ 2011-06-13 21:21 瓜蛋 阅读(1370) 评论(0) 推荐(0)
摘要://---------------------------------------------------------------------------#ifndef Unit1H#define Unit1H//---------------------------------------------------------------------------#include <Classes.hpp>#include <Controls.hpp>#include <StdCtrls.hpp>#include <Forms.hpp>#inclu 阅读全文
posted @ 2011-06-12 21:05 瓜蛋 阅读(3035) 评论(0) 推荐(0)
摘要://---------------------------------------------------------------------------#ifndef Unit1H#define Unit1H//---------------------------------------------------------------------------#include <Classes.hpp>#include <Controls.hpp>#include <StdCtrls.hpp>#include <Forms.hpp>#inclu 阅读全文
posted @ 2011-06-09 21:23 瓜蛋 阅读(897) 评论(0) 推荐(0)
摘要://---------------------------------------------------------------------------#ifndef Unit1H#define Unit1H//---------------------------------------------------------------------------#include <Classes.hpp>#include <Controls.hpp>#include <StdCtrls.hpp>#include <Forms.hpp>#inclu 阅读全文
posted @ 2011-06-09 20:44 瓜蛋 阅读(689) 评论(0) 推荐(0)
摘要://---------------------------------------------------------------------------#ifndef Unit1H#define Unit1H//---------------------------------------------------------------------------#include <Classes.hpp>#include <Controls.hpp>#include <StdCtrls.hpp>#include <Forms.hpp>#inclu 阅读全文
posted @ 2011-06-08 22:41 瓜蛋 阅读(992) 评论(0) 推荐(0)
摘要://---------------------------------------------------------------------------#ifndef Unit1H#define Unit1H//---------------------------------------------------------------------------#include <Classes.hpp>#include <Controls.hpp>#include <StdCtrls.hpp>#include <Forms.hpp>#inclu 阅读全文
posted @ 2011-06-08 22:40 瓜蛋 阅读(704) 评论(0) 推荐(0)
摘要://---------------------------------------------------------------------------#ifndef Unit1H#define Unit1H//---------------------------------------------------------------------------#include <Classes.hpp>#include <Controls.hpp>#include <StdCtrls.hpp>#include <Forms.hpp>#inclu 阅读全文
posted @ 2011-06-08 22:38 瓜蛋 阅读(818) 评论(0) 推荐(0)
摘要://---------------------------------------------------------------------------#ifndef Unit1H#define Unit1H//---------------------------------------------------------------------------#include <Classes.hpp>#include <Controls.hpp>#include <StdCtrls.hpp>#include <Forms.hpp>#inclu 阅读全文
posted @ 2011-06-08 22:36 瓜蛋 阅读(1095) 评论(0) 推荐(0)
摘要://---------------------------------------------------------------------------#ifndef Unit1H#define Unit1H//---------------------------------------------------------------------------#include <Classes.hpp>#include <Controls.hpp>#include <StdCtrls.hpp>#include <Forms.hpp>#inclu 阅读全文
posted @ 2011-06-08 22:34 瓜蛋 阅读(1307) 评论(0) 推荐(0)