诸位高手好, 前几天我在一个贴子中看到可以用SetBkMode将TDBGrid的背景设为透明再配上背景图画, 可以使表格更加美观.这确实很诱人, 我试着自己作, 可是运行后却没有任何反映. 以下是代码:showmessage(inttostr(SetBkMode(DBGrid1.Handle, TRANSPARENT)));
函数调用总是返回0 (不成功)Delphi的Help中关于SetBkMode的说明如下:int SetBkMode(
    HDC hdc,   // handle of device context
    int iBkMode   // flag specifying background mode
   ); Parametershdc
Identifies the device context. iBkMode
Specifies the background mode. This parameter can be either of the following values: OPAQUE:
  Background is filled with the current background color before the text, hatched brush, or pen is drawn.TRANSPARENT:
  Background remains untouched.不知我应该做何修改. 我估计是DBGrid1.Handle部分出的问题, 函数要求的是HDC类型, 而DBGrid1.Handle返回的是HWND类型, 类型不匹配.我很早就有这个疑问: WindowsAPI中像HDC, HWND这样的句柄都有哪些, 它们都有什么区别, 相互之间又应该如何转化? Delphi中用THandle把它们都包括进去了, 可使用起来还是显得不太兼容呀, 例如本例. 请高手能借这个问题展开, 讲讲API中的句柄... 谢谢了! 发言就有分! 分不够再补!