摘要:
http://bigpower.blog.51cto.com/209892/89512来自Delphi Help 关键字String to PChar conversions长字符串转换到PChar不是自动的。他们之间的不同点导致他们的转换存在问题。1,长字符串是引用计数的,而PChar不是2,赋值给长字符串是数据的拷贝,而PChar是指向数据的指针。3,长字符串是空止符结尾,并包含有字符串的长度。而PChar是简单的空止符结尾。( 空止符结尾指以#0结尾)把pchar转换为string可用strpas(pchar),把string转换为pchar可用pchar(string)1. strin 阅读全文
2011年8月10日
2011年3月16日
摘要:
VC 中需要用ATL 调用 delph 写的com。IFinanceReport : 为接口GetFinaceReport : 接口方法在 文件头 :#import "dll path" no_namespace类型转换问题折腾了好久。在delphi 中的 pchar, vc 封装后为 LPSTR*STDMETHODIMP CmyATL::GetFinaceReport(BSTR year, BSTR month, BSTR* XMLReport){// TODO: 在此添加实现代码 LPSTR * year2 ; LPSTR * month2 ;year2=new LPS 阅读全文
2010年10月27日
摘要:
6.3.4 过程类型 Object Pascal允许把过程和函数作为一个整体赋给变量和作为参数传递。实现这一功能的途径是使用Object Pascal的过程类型。 声明一个过程类型的语法与声明过程或函数的首部的语法相似,不同的是声明一个过程类型时不需要过程或函数保留字后面的标识符。声明过程类型时可以指定一种调用约定方式,缺省的调用方式是Register。下面是声明过程类型的举例: typeTProcedure = procedure; TStrProc = procedure(const S: string); TMathFunc = function(X: Double): Doubl 阅读全文
2010年9月16日
摘要:
参考 http://support.microsoft.com/kb/914277/zh-cn关键配置防火墙允许 sql Browse 阅读全文
2010年9月6日
摘要:
专门用于设置其控件的样式的函数为SetWindowLong 阅读全文
2010年9月3日
摘要:
消息定义t y p eTMsg = packed recordhwnd: HWND; / /窗口句柄message: UINT; / /消息常量标识符wParam: WPA R A M ; // 32位消息的特定附加信息lParam: LPA R A M ; // 32位消息的特定附加信息time: DWORD; / /消息创建时的时间pt: TPoint; / /消息创建时的鼠标位置e n d ... 阅读全文
摘要:
S e n d M es s a g e ( )直接把一个消息发送给窗口过程,等消息被处理后才返回。P o s t M e s s a g e ( )只是把消息发送到消息队列,然后立即返回。 阅读全文
2010年9月2日
摘要:
Canvas.Brush.Color := clYellow; {设置画刷颜色, 也就是填充色}Canvas.FillRect(ClientRect); {填充窗体客户区}TextOut、TextWidth、TextHeightTBitmap 阅读全文
2010年9月1日
摘要:
http://topic.csdn.net/t/20040405/13/2926715.htmlvar a : TForm2;// 一个随机值, 如果全局变量就是 nilbegin { m:=nil; if not Assigned(m) then ShowMessage('not Assigned') else ShowMessage('Assigned'); } if not Assigned... 阅读全文