zoukankan      html  css  js  c++  java
  • 第七章 Dialog 分类: VC++ 20080129 10:18 187人阅读 评论(0) 收藏

    いち ://08.01.28

             改变颜色问题.

        1. 响应OnCtlColor 消息.

        2. 选择控件类型: 消息ID  
      CTLCOLOR_BTN                        
    按钮控件产生的消息  
      CTLCOLOR_DLG                        
    对话框产生的消息  
      CTLCOLOR_EDIT                      
    编辑控件产生的消息  
      CTLCOLOR_LISTBOX                
    列表框...  
      CTLCOLOR_MSGBOX                  
    消息框...  
      CTLCOLOR_SCROLLBAR            
    滚动栏控件...  
      CTLCOLOR_STATIC                  
    静态控件...  

        3. 设置:

        pDC->SetBkColor(RGB(255, 0, 0))//red

        //RGB(r,g,b);

        r 红色

        g 绿色

        b 蓝色

        r+g = 黄色

        g+b =

        r+b = 洋紅色

        r+g+b = 白色.

        RGB(0, 0, 0)= 黑色.

        4.code

               HBRUSH m_hYellowBrush = CreateSolidBrush(RGB(0, 255, 0));

           // 改变edit 的文字处理

           pDC->SetBkColor(RGB(125,120,30));//yellow

           pDC->SetTextColor(RGB(0, 255, 0));//green

           // 改变edit 的背景;

           return m_hYellowBrush;

    に:

             动态生成控件和删除.

             资源类型CButton, CEdit, CListBox, and CComboBox, 添加响应的变量.

             m_MyEdit.CreateEx

             GetDlgItem(ID_MYEDIT)->DestroyWindow();// 销毁.

    さん:

    公共类 :

    CColorDialog

    Allows the user to select or create a color

    CFileDialog

    Allows the user to open or save a file

    CFindReplaceDialog

    Allows the user to substitute one string for another

    CFontDialog

    Allows the user to select a font from a list of available fonts

    COleDialog

    Useful for inserting OLE objects

    CPageSetupDialog

    Allows the user to input page measurement parameters

    CPrintDialog

    Allows the user to set up the printer and print a document

    CPrintDialogEx

    Printing and Print Preview for Windows 2000

     

    版权声明:本文为博主原创文章,未经博主允许不得转载。

  • 相关阅读:
    配置双jdk
    检测一个页面所用的时间的js
    java发送短信开发,第三方接口方法
    jq的常用事件及其案例
    ajax无法返回视图
    SpringMVC IO 文件上传
    及上一篇linux安装mysql的说明
    centos6.10下安装mysql8.0.16root密码修改的坑
    线程池学习
    数组的分隔
  • 原文地址:https://www.cnblogs.com/deman/p/4716620.html
Copyright © 2011-2022 走看看