找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 375|回复: 1

[ARX程序]:如何改变对话框的颜色?望高手赐教

[复制链接]
发表于 2004-6-5 23:40:03 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我用ARX 开发cad2000,做了几个对话框,感觉颜色都是一种,很单调的,谨想各位高手讨教
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
发表于 2004-6-7 20:38:06 | 显示全部楼层
Ref. below, please:


  1. [COLOR=Blue]SetClassLong   [/COLOR]
  2. The SetClassLong function replaces the specified 32-bit (long) value at
  3. the specified offset into the extra class memory or the WNDCLASS
  4. structure for the class to which the specified window belongs.

  5. DWORD SetClassLong( HWND hWnd,
  6. // handle of window

  7. int nIndex,
  8. // index of value to change

  9. LONG dwNewLong
  10. // new value

  11. );
  12.   


  13. Parameters
  14. hWnd

  15. Identifies the window and, indirectly, the class to which the window belongs.

  16. nIndex

  17. Specifies the 32-bit value to replace. To set a 32-bit value in the extra
  18. class memory, specify the positive, zero-based byte offset of the value to
  19. be set. Valid values are in the range zero through the number of bytes of
  20. extra class memory, minus four; for example, if you specified 12 or more
  21. bytes of extra class memory, a value of 8 would be an index to the third
  22. 32-bit integer. To set any other value from the WNDCLASS structure,
  23. specify one of the following values: Value
  24. Action

  25. GCL_CBCLSEXTRA
  26. Sets the size, in bytes, of the extra memory associated with the class.
  27. Setting this value does not change the number of extra bytes already allocated.

  28. GCL_CBWNDEXTRA
  29. Sets the size, in bytes, of the extra window memory associated with each
  30. window in the class. Setting this value does not change the number of
  31. extra bytes already allocated. For information on how to access this
  32. memory, see SetWindowLong and SetWindowWord.
  33. [COLOR=Red]
  34. GCL_HBRBACKGROUND
  35. Replaces the handle of the background brush associated with the class.   //use it!
  36. [/COLOR]
  37. GCL_HCURSOR
  38. Replaces the handle of the cursor associated with the class.

  39. GCL_HICON
  40. Replaces the handle of the icon associated with the class.

  41. GCL_HMODULE
  42. Replaces the handle of the module that registered the class.

  43. GCL_MENUNAME
  44. Replaces the address of the menu name string. The string identifies the
  45. menu resource associated with the class.

  46. GCL_STYLE
  47. Replaces the window-class style bits.

  48. GCL_WNDPROC
  49. Replaces the address of the window procedure associated with the class.



  50. dwNewLong

  51. Specifies the replacement value.

  52. Return Values
  53. If the function succeeds, the return value is the previous value of the specified 32-bit integer.

  54. If the function fails, the return value is zero. To get extended error information, call GetLastError.

  55. Remarks
  56. If you use the SetClassLong function and the GCL_WNDPROC index to
  57. replace the window procedure, the window procedure must conform to
  58. the guidelines specified in the description of the WindowProc callback function.

  59. Calling SetClassLong with the GCL_WNDPROC index creates a subclass
  60. of the window class that affects all windows subsequently created with
  61. the class. An application should not subclass a window created by another process.

  62. Reserve extra class memory by specifying a nonzero value in the
  63. cbClsExtra member of the WNDCLASS structure used with the
  64. RegisterClass function.

  65. Use the SetClassLong function with care. For example, it is possible to
  66. change the background color for a class by using SetClassLong, but this
  67. change does not immediately repaint all windows belonging to the class.


  1. [COLOR=Blue]CreateSolidBrush   [/COLOR]
  2. The CreateSolidBrush function creates a logical brush that has the specified solid color.

  3. HBRUSH CreateSolidBrush( COLORREF crColor
  4. // brush color value

  5. );
  6.   


  7. Parameters
  8. crColor

  9. Specifies the color of the brush.

  10. Return Values
  11. If the function succeeds, the return value identifies a logical brush.

  12. If the function fails, the return value is NULL.

  13. Remarks
  14. A solid brush is a bitmap that Windows uses to paint the interiors of filled shapes.

  15. After an application creates a brush by calling CreateSolidBrush, it can
  16. select that brush into any device context by calling the SelectObject function.
复制代码
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2024-9-21 20:43 , Processed in 0.184125 second(s), 33 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表