bcb我服你了,调用一个API竟这末复杂

lsamsony 2004-11-22 02:44:18
vc的
EnumChildWindows(handle, EnumChildProc,
(LPARAM) handle);
bcb的
EnumChildWindows(handle, reinterpret_cast<WNDENUMPROC>(EnumChildProc), (LPARAM)handle);
...全文
431 17 打赏 收藏 转发到动态 举报
写回复
用AI写文章
17 条回复
切换为时间正序
请发表友善的回复…
发表回复
peter2108 2004-11-24
  • 打赏
  • 举报
回复
不知道,就别乱说,VC和CB的调用一样的
yjy1001 2004-11-24
  • 打赏
  • 举报
回复
应该说微软的行政比borland好,你看delphi2、4、6、8有多烂,而3,5,7得到多少好评就知道borland的行政人员都是猪了
3xcom 2004-11-23
  • 打赏
  • 举报
回复
UP.
freemanxy 2004-11-22
  • 打赏
  • 举报
回复
vc用好了,还学bcb干吗?
borland公司不会生产操作系统,当然受制于人了!
lsamsony 2004-11-22
  • 打赏
  • 举报
回复
彻底明白了,STRICT 惹得祸
robbyzi 2004-11-22
  • 打赏
  • 举报
回复
按季老大所说——EnumChildWindows(handle, (FARPROC)EnumChildProc, (LPARAM)handle);

那样,也只不过多了个FARPROC而已嘛。。。

这样也叫麻烦的话,那我只能说,楼主,我服了你。(呵呵,引用你的原话)
wu_07 2004-11-22
  • 打赏
  • 举报
回复
看看这个也许有帮助


#define STRICT /* This is required so that our callback is properly prototyped. */


//---------------------------------------------------------------------
int CALLBACK EnumFontFamiliesProc(const LOGFONT *lpelf,const TEXTMETRIC *lpntm, unsigned long FontType,LPARAM lParam)
{
/* The parameter lParam is defined as the address of the font combo box
used in the program to store the list of font names. */
TComboBox *ExtFontComboBox = reinterpret_cast(lParam);
/* Read the Win32 documentation for a description of the other parameters
but all we need here is the name of the font. */
ExtFontComboBox->Items->Add(AnsiString(lpelf->lfFaceName));
return true;
}
//---------------------------------------------------------------------------


/* fill combo box with the fonts. */
EnumFontFamilies(Canvas->Handle,NULL,EnumFontFamiliesProc,reinterpret_cast(FontComboBox));
北京的雾霾天 2004-11-22
  • 打赏
  • 举报
回复
楼主是个细心的人,想想为什么总是好的.
lsamsony 2004-11-22
  • 打赏
  • 举报
回复
季世平出手了,难得
jishiping 2004-11-22
  • 打赏
  • 举报
回复
没有楼主说的那么复杂。
EnumChildWindows(handle, (FARPROC)EnumChildProc, (LPARAM)handle);
lsamsony 2004-11-22
  • 打赏
  • 举报
回复
大家是在讨论问题,不是在吵架,关键他为什末这样作
liuhaimo 2004-11-22
  • 打赏
  • 举报
回复
楼主纯属找骂,SB!
constantine 2004-11-22
  • 打赏
  • 举报
回复
既然你用vc,那么关bcb什么事情,不喜欢就不要用啊,现在bcb也没有多少公司用
lsamsony 2004-11-22
  • 打赏
  • 举报
回复
关键我是用vc
ccrun.com 2004-11-22
  • 打赏
  • 举报
回复
转换一下就行了,没什么吧.如果你要用VB,还得声明一大堆,那才叫麻烦.
Maconel 2004-11-22
  • 打赏
  • 举报
回复
不就多了个reinterpret_cast<WNDENUMPROC>而已.
北京的雾霾天 2004-11-22
  • 打赏
  • 举报
回复
语法的差别.

13,824

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧