`
qpb681wk
  • 浏览: 18182 次
最近访客 更多访客>>
社区版块
存档分类
最新评论

2011-10-10program

阅读更多

2011-10-10program
2011年10月10日
  1.使用ModifyStyleEx改变了控件风格无效
  答:修改之后,重绘一次,如果还不行的话,再试试看调用SetWindowPos(0,0,0,0,0,SWP_NOMOVE | SWP_NOSIZE | SWP_DRAWFRAME);
  2.动态设置编辑框的ES_PASSWORD无效
  答:修改之后,需要调用一次SetPasswordChar('*');
  3.如何获取任务栏小图标?
  答:有网友提出,能不能在程序界面上显示当前的托盘图标,这样更直观一些。这一点我也曾想到过,也知道奥秘就在TBBUTTON这个结构体的dwData域里面,可惜这个域的结构在MSDN中没有描述。我也曾试着发送TB_GETIMAGELIST消息获取image list的句柄,然后用CImageList::FromHandle加载到CImageList中,但却都失败了。
  在csdn网友的帮助下,我弄清了dwData的结构,其实dwData有一个这样的机构,我们命名为TRAYDATA:
  struct TRAYDATA
  {
  HWND hwnd;
  UINT uID;
  UINT uCallbackMessage;
  DWORD Reserved[2];
  HICON hIcon; //托盘图标的句柄
  };
  要获取到这个hIcon,其实很简单:
  //分配虚拟内存
  lngAddress = VirtualAllocEx(hProcess, NULL, sizeof(TBBUTTON), MEM_COMMIT, PAGE_READWRITE);
  //将hProcess进程内,地址为lngAddress中的内容(大小为sizeof(TBBUTTON))获取到tb中
  ret = ::ReadProcessMemory(hProcess, LPVOID(long(lngAddress)), &tb, sizeof(TBBUTTON), 0);
  //将hProcess进程内,地址为tb.dwData中的内容(大小为sizeof(TRAYDATA))获取到tray中
  ret = ::ReadProcessMemory(hProcess, LPVOID(tb.dwData), &tray, sizeof(TRAYDATA), 0);
  然后就可以用tray.hIcon索引到这个图标句柄了
  //释放内存代码略
  4.BeginWaitCursor和EndWaitCursor无效
  答:SetCapture();BeginWaitCursor();....EndWaitCursor();ReleaseCapture();
  5.打印源码中文件名和行号常用的宏名是什么?
  答:文件名:__FILE__ 行号:__LINE__
  6.如何具体判断一个字符串中哪个是英文字母
  答:函数isalpha
  7.在注册表中如何得到所有安装了的应用程序程序的信息
  答:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall下面的子
分享到:
评论

相关推荐

    C++ How to program 8/e 2011 - PDF(英文), Part-2

    本書特色  1.時事習題。我們鼓勵讀者使用電腦和網際網路來研究並解決真實世界裡的問題。我們希望這些新的習題能夠提醒學生注意全世界發生的重大議題。  2....C++提供二種型式的字串:string類別物件 (在第3章開始...

    grub4dos-V0.4.6a-2017-02-04更新

    行数=图像垂直像素/(字符高+行间距) 字符高=10; --box x=[x] y=[y] w=[w] h=[h] l=[l] 项目标题起始列,起始行,每行最大字符数,最大菜单项数,菜单框线条宽度(像素); 注:w=0 表示水平居中。此时 w 应当在 ...

    CSerialPort串口类更新版2014-01-10

    ** program is not blocked. ** ** CREATION DATE 15-09-1997 ** LAST MODIFICATION 12-11-1997 ** ** AUTHOR Remon Spekreijse ** ** *****************************************************************...

    MyBase Desktop 6.0.2 破解正式版(官方更新至10/10/2011)

    mybase6.0.2 破解正式版,官方发布日期2011-10-10 解除所有限制 winXP、win7下亲测均可用 Update Notes. 1.Fixed: a bug in bookmark locating. 2.Fixed: a bug in the rtf-to-text parser, which applies to ...

    JAVA How to Program 9th ed 英文版

    JAVA How to Program 9th ed 英文版 2011 Prentice Hall 有复原记录

    Erdas 2011 破解文件

    6、然后装ERDAS_Extensions2011_ArcGIS10及其erdas Extensions 2011 for arcgis 10 – SP1 Update升级补丁 7、将"ERDAS Extensions 2011" 拷贝到Extensions的安装目录并覆盖之。【破解2】 其它可选部件:安装并为...

    ora10g客户端

    (DESCRIPTION=(ADDRESS=(PROTOCOL=BEQ)(PROGRAM=oracle)(ARGV0=oracleORCL)(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))'))(CONNECT_DATA=(SID=ORCL)(CID=(PROGRAM=D:\oracle\ora10g\sqlplus.exe)...

    erdas2011版破解文件和方法

    6、然后装ERDAS_Extensions2011_ArcGIS10及其erdas Extensions 2011 for arcgis 10 – SP1 Update升级补丁 7、将"ERDAS Extensions 2011" 拷贝到Extensions的安装目录并覆盖之。【破解2】 其它可选部件:安装并为...

    Nero完全插件包应用于 Nero6、7、8、8、9、10任何版本 2011年

    2011.08年 本Nero完全插件包应用于 Nero6、7、8、8、9、10任何版本 直接把整个 AudioPlugins Nero完全插件包放到 C:\Program Files\Common Files\Nero 下替换掉里边的AudioPlugins 然后重新启动 Nero8 就可以啦。 ...

    华为安卓手机驱动程序

    Fixed the bug that Driver is installed to click the install program pop-up, driver is installed unloading boxes, multiple clicks can eject a plurality of prompt box, no conflict checking version 1.01...

    zencart 1.5.1 中文版

    zencart 1.5.1 中文版 en Cart(R) - The Art of E-Commerce ...Document Revision: $Id: install.txt 19798 2011-10-12 05:52:54Z drbyte $) ((c)Copyright 2003-2011, Zen Cart(R). All rights reserved.)

    EMS Advanced Data Import Component Suite 3.5.0.3 for XE2

    Advanced Data Export 和 Advanced Data Import 这是EMS 公司出品的数据导入、导出控件,几乎可以导入...10-10-2011 Version 3.40 1. Support of RAD Studio XE2 is added. 2. Some other improvements and bugfixes.

    c++大学教程 第八版 英文完美版pdf

    8 edition (March 25, 2011) Language: English ISBN-10: 0132662361 ISBN-13: 978-0132662369 For Introduction to Programming (CS1) and other more intermediate courses covering programming in C++. ...

    Programming in Objective-C Fourth Edition (2011)

    5 Program Looping  6 Making Decisions  7 More on Classes  8 Inheritance  9 Polymorphism, Dynamic Typing, and Dynamic Binding  10 More on Variables and Data Types  11 Categories and ...

    星外提权工具

    比如D:\Program Files\360\360Safe\deepscan\Section\mutex.db,可D:\Program Files\360\360Safe\deepscan\Section目录没有访问权限,用BIN牛的aspx大马访问D:\Program Files\360\360Safe\deepscan\Sectio显示拒绝...

    程序传输软件V13.0

    - Windows 10 Pro (32/64bit OS) - Windows 8 Pro (32/64bit OS) - Windows 7 Professional SP1 (32/64bit OS) - Windows Vista Business SP2 (32bit OS) - Windows XP Professional SP3 (32bit OS) Display ...

    C++ 标准 ISO 14882-2011

    1.9 Program execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.10 Multi-threaded executions and data races . . . . . . . . . . . . . . . . . . . . . . . . ...

    Programming Arduino Getting Started With Sketches

    and upload your first sketch Learn C language basics Write functions in ...Program LCD displays Use an Ethernet shield to enable Arduino to function as a web server Write your own Arduino libraries In ...

    ERDAS IMAGINE 2011汉化包

    ERDAS IMAGINE 2011汉化包,Win7,Win10的64位机器上已经验证,请放心汉化。其它操作系统没有验证,请慎用。 汉化流程: 把汉化包中的文件夹直接复制到安装目录中(如:把bin、ect、help、scripts、translations、...

    Marketing Analytics: Data-Driven Techniques with Microsoft® Excel®

    in hand, I wrote up course notes that I used in classes for 10 years. The course has been wildly successful with nearly 65 percent of all MBA’s at the Kelley School taking the class. In May 2013, I ...

Global site tag (gtag.js) - Google Analytics