特殊窗口

以前我们有时候会创建一个隐藏的窗口, 然后让他们和其他窗口进行通信. 确实有这种需求啊. 今天在看某软件的时候发现一个办法. 当然这个办法在MSDN里面
就有的. 只是以前没有用过. 也没听人说起过.

CreateWindowExW(0, L”WndClass”, L”WndName”, 0, 0, 0, 0, 0, HWND_MESSAGE, 0, 0, 0);

父窗体指定为HWND_MESSAGE常量,它可以收发消息,没z-order,,不可遍历且不无能接收到广播消息仅做简单的消息分发.我们可以在创建窗体时指定其父窗体为HWND_MESSAGE常量也可以将现有窗体通过SetParent将父窗体设为HWND_MESSAGE常量从而达到变成消息窗体的目的.

结论: 消息窗体窗体是不可见,在SPY++窗体中可以找到, 但同步不到也就是说没有被遍历到.发出广播消息(RegisterWindowMessage注册的消息)后没有收到.WM_COPYDATA 消息必须由SendMessage 函数发送(同步方式,系统为了确保数据有效)

以后创建背后通信的窗口就使用这个了!

网友评论:

  1. hiu 说:

    不可以发线程消息吗

  2. 特殊窗口 | 小陈's blog 说:

    […] [原文地址] 标签: 编程 关于本文 […]

  3. 小色 说:

    原来有专用的呀,以后就用这个啦,之前一直觉得后台有个窗口不舒服。

  4. pandora spacers charms 说:

    I’m not sure where you are getting your info, but great topic.

    I needs to spend some time learning more or understanding more.
    Thanks for wonderful info I was looking for this information for my mission.

    my page – pandora spacers charms

  5. minecraft 说:

    Hi there! I know this is kinda off topic but I was wondering which blog
    platform are you using for this website? I’m getting sick and tired of WordPress because
    I’ve had problems with hackers and I’m looking at options for another platform.
    I would be fantastic if you could point me in the direction of a good platform.

  6. minecraft 说:

    Fine way of describing, and good piece of writing
    to obtain data concerning my presentation subject matter, which
    i am going to convey in academy.

  7. minecraft 说:

    Very soon this web page will be famous amid all blog visitors, due to it’s fastidious
    articles

  8. minecraft free download 2018 说:

    Thank you for some other fantastic post. The place else may anyone get that
    kind of information in such a perfect way of writing?
    I have a presentation next week, and I am on the search
    for such info.

  9. pandora sales outlet 说:

    The Juno B1 Cabin Suitcase glides on four precision-made Hinomoto
    wheels (a company which, according to obsessive fliers,
    is a standard-bearer of qualiry caster-making). Thee thing is extraordinarily light at 5.3 pounds (the Rimowa analogue
    tips the scales at 7.1), but feels shockingly sturdy; its speckled polypropylene shell iis built to combat and conceal obvious (but inevitable) scratches.
    The suitcase also has a handy built-in lock, and indestructible hard casing.
    But what I really love about it iis how mjch I can fit.
    Despite its tiny dimensions, which always fit into an overhead, I’ve been able to cram in a week’s worth of clothes for a winter trip in Assia (thanks to clever folding), or enough for ten summery
    days in L.A. It’s really tthe clown car of carry-on luggage.

  10. Coconut Oil 说:

    I am regular visitor, how are you everybody? This article posted
    at this website is in fact fastidious.

  11. Health Benefits of Coconut Oil 说:

    Hi! Someone in my Myspace group shared this website with us so I came
    to look it over. I’m definitely enjoying the information.
    I’m book-marking and will be tweeting this to my followers!
    Terrific blog and brilliant design.

  12. Health Benefits of Coconut Oil 说:

    Hi, yup this piece of writing is genuinely nice and I have
    learned lot of things from it on the topic of blogging. thanks.

  13. Health Benefits of Coconut Oil 说:

    Does your blog have a contact page? I’m having a tough time locating it but, I’d like to shoot you an e-mail.
    I’ve got some creative ideas for your blog you might be interested in hearing.

    Either way, great blog and I look forward to seeing it expand over
    time.

  14. Quest Bars 说:

    Hey! I just wanted to ask if you ever have any
    problems with hackers? My last blog (wordpress) was hacked
    and I ended up losing months of hard work due to no back up.

    Do you have any methods to prevent hackers?

  15. What Equipment is Needed for Sling TV 说:

    After looking into a handful of the blog posts
    on your blog, I honestly appreciate your technique of writing a blog.

    I saved as a favorite it to my bookmark site list and will be
    checking back in the near future. Please visit my website as well
    and let me know your opinion.

  16. Sling TV 说:

    Hi there are using WordPress for your site platform?
    I’m new to the blog world but I’m trying to get started and create my own. Do you need any html coding knowledge to
    make your own blog? Any help would be greatly appreciated!

  17. What Equipment is Needed for Sling TV 说:

    Thanks for your personal marvelous posting! I really
    enjoyed reading it, you happen to be a great author.I will ensure
    that I bookmark your blog and will often come back very soon. I want to encourage continue your great job, have a nice evening!

发表评论

发表评论前,请选对水果: 苹果