투명한 윈도우

목적 : 투명한 윈도우 만들기.
환경 : Windows7 32bit, Visual Studio 2010 sp1, Dialog Based, Multibyte Charset.
아래는 정상적인 Dialog. 배경은 사진(태국의 한 공원)이고,  Dialog  안에 흰색의 상자.

1. 준비작업. 윈도우 속성에 GWL_EXSTYLE  추가.
LayeredWindow 를 만들기 위해서는 먼저 윈도우의 속성을 추가 시켜 주어야 한다.
DialogBased 프로젝트를 하나 만들고, OnInitDialog() 함수안에서 윈도우의 속성을 바꾸자.
BOOL bResult = FALSE;
LONG lResult = SetWindowLong(this->GetSafeHwnd()
, GWL_EXSTYLE
, GetWindowLong(this->GetSafeHwnd(), GWL_EXSTYLE) | WS_EX_LAYERED);
if (!lResult) {
AfxMessageBox(“Fail to SetWindowLong…”);
return FALSE;
}
속성을 추가해서 실행 시키면 아래와 같이 나온다. Alpha속성 이외의  다른 방법으로 투명해진 윈도우는 메세지 처리를 제대로 하지 못한다.
흠.. 쓸모 없을려나.

2. 다이얼로그에서 특정 색만 투명화 시키기.
특정 색만 투명화 시켜 보자. 아래 코드는 흰색(RGB(255,255,255) 만 투명화 시킨다.
이때도 마찬가지로 마우스 메세지를 제대로 처리하지 못한다.
bResult = SetLayeredWindowAttributes(RGB(255, 255, 255), 0, LWA_COLORKEY);
if (!bResult) {
AfxMessageBox(“Fail to SetLayeredWindowAttributes…”);
return FALSE;
}

3. 다이얼 로그 전체 투명화 시키기.
알파 속성을 추가 시켜보자. 아래 코드는 윈도우를 반정도 (127) 투명화 시켜 준다.
bResult = SetLayeredWindowAttributes( 0, 127, LWA_ALPHA);
if (!bResult) {
AfxMessageBox(“Fail to SetLayeredWindowAttributes…”);
return FALSE;
}

4. 두가지 동시 적용 – 윈도우를 반정도 투명화 시키고, 흰색의 색상은 투명화 시키기.
두가지를 합칠 수 있다.
윈도우는 알파 속성으로 반정도 투명화 시키고, 다이얼로그의 색상 중, 투명화 할 색생을 흰색 ( RGB(255,255,255) ) 으로 해보자.
bResult = SetLayeredWindowAttributes(RGB(255, 255, 255), 127, LWA_COLORKEY | LWA_ALPHA);
if (!bResult) {
AfxMessageBox(“Fail to SetLayeredWindowAttributes…”);
return FALSE;
}

“투명한 윈도우”의 77개의 댓글

  1. great submit, very informative. I’m wondering why the other experts of
    this sector do not notice this. You should proceed your writing.
    I am sure, you’ve a great readers’ base already!

  2. I simply want to mention I’m all new to blogs and honestly loved this blog. Almost certainly I’m going to bookmark your site . You definitely have amazing well written articles. Regards for sharing with us your web site.

  3. This internet site is really a walk-through for all of the info you wanted about this and also didn?t know who to ask. Glance here, as well as you?ll absolutely discover it.

  4. Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates. I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

  5. I definitely wanted to compose a quick message to be able to appreciate you for those amazing advice you are giving out on this website. My time intensive internet investigation has finally been honored with good quality facts and strategies to go over with my great friends. I would state that that most of us site visitors actually are quite fortunate to be in a notable website with so many outstanding people with insightful strategies. I feel really privileged to have discovered your entire web page and look forward to plenty of more amazing times reading here. Thanks again for everything.

  6. Aw, this was a really great article. In suggestion I want to place in writing like this additionally? taking time as well as actual initiative to make a great article? yet what can I claim? I postpone alot and also never seem to get something done.

  7. I was really happy to find this web-site. I wished to thanks for your time for this terrific read!! I most definitely enjoying every little bit of it as well as I have you bookmarked to take a look at brand-new stuff you blog post.

  8. An interesting discussion is worth remark. I think that you need to compose more on this subject, it might not be a forbidden subject however normally people are not enough to speak on such subjects. To the next. Cheers

  9. I discovered your blog website on google as well as check a few of your early posts. Continue to keep up the excellent operate. I simply extra up your RSS feed to my MSN Information Viewers. Seeking onward to reading more from you in the future!?

  10. The next time I check out a blog, I really hope that it doesn’t dissatisfy me as long as this one. I imply, I understand it was my option to review, but I really thought youd have something intriguing to state. All I listen to is a lot of whining about something that you might repair if you werent as well active seeking attention.

  11. Aw, this was a truly good article. In concept I want to put in composing similar to this furthermore? taking time and also actual initiative to make a great article? however what can I state? I postpone alot and also by no means appear to get something done.

  12. Yesterday, while I was at work, my cousin stole my
    iphone and tested to see if it can survive a 25 foot drop,
    just so she can be a youtube sensation. My iPad is now broken and
    she has 83 views. I know this is entirely off topic but I had to share it with someone!

  13. I was extremely pleased to discover this web-site. I intended to many thanks for your time for this remarkable read!! I absolutely appreciating every bit of it and also I have you bookmarked to take a look at brand-new things you post.

  14. May I simply just say what a comfort to find someone that actually knows what they are talking about on the net. You actually know how to bring an issue to light and make it important. A lot more people ought to look at this and understand this side of your story. I was surprised you are not more popular given that you surely possess the gift.

  15. We still cannot quite believe that I really could often be some checking important points on your webblog. His dad and i also are sincerely thankful for generosity for giving me possibility pursue our chosen profession path. Basically material I managed to get out of your web-site.

  16. Search engine marketing wants a superb search engine optimizer plan. Just certainly one of these strategies can make a big distinction in your sites position and firm your website brings you.

  17. The next time I review a blog site, I hope that it does not dissatisfy me as much as this set. I mean, I recognize it was my option to review, yet I really thought youd have something fascinating to say. All I hear is a lot of whimpering about something that you could repair if you werent as well busy seeking interest.

  18. I am just writing to let you be aware of what a incredible encounter my cousin’s princess encountered viewing your webblog. She even learned some details, which included what it is like to have a marvelous helping mood to make the rest completely know precisely specified complicated issues. You actually surpassed my expected results. Thank you for showing such powerful, healthy, explanatory not to mention fun thoughts on that topic to Jane.

  19. My wife and i got now satisfied when John could finish up his web research from your ideas he had from your weblog. It is now and again perplexing just to happen to be releasing guides which usually men and women could have been making money from. Therefore we know we have got the writer to appreciate for this. These explanations you made, the simple web site navigation, the relationships you will make it easier to foster – it is all terrific, and it’s letting our son in addition to us know that the matter is exciting, and that is truly fundamental. Thank you for everything!

  20. I must convey my appreciation for your kindness for individuals who really want help on this important theme. Your real commitment to getting the solution across ended up being pretty invaluable and has specifically empowered ladies just like me to reach their dreams. Your new informative help means a lot to me and even more to my fellow workers. Regards; from everyone of us.

  21. I truly wanted to construct a small comment in order to appreciate you for those fantastic pointers you are showing at this website. My prolonged internet research has now been rewarded with reliable suggestions to go over with my companions. I would claim that many of us website visitors actually are unequivocally lucky to exist in a very good place with very many brilliant people with good solutions. I feel rather fortunate to have seen the web site and look forward to many more cool moments reading here. Thanks a lot once more for a lot of things.

  22. A lot of thanks for your own work on this web site. Kate delights in managing investigations and it is easy to understand why. A lot of people know all regarding the lively manner you deliver precious solutions via your website and even strongly encourage response from some others on the area of interest so our princess is studying so much. Enjoy the rest of the year. You are always carrying out a good job.

  23. I would like to express some appreciation to the writer just for rescuing me from this condition. As a result of surfing throughout the internet and seeing concepts that were not pleasant, I assumed my life was over. Living devoid of the answers to the issues you have resolved by means of your entire posting is a critical case, and the ones that could have adversely affected my career if I hadn’t noticed your web site. That talents and kindness in touching all the things was important. I’m not sure what I would’ve done if I had not encountered such a step like this. I can also now look forward to my future. Thanks a lot so much for the professional and effective help. I will not be reluctant to recommend your web page to any individual who needs assistance about this subject matter.

  24. I simply wanted to say thanks yet again. I am not sure the things I might have gone through in the absence of the creative ideas provided by you on such a situation. Certainly was a very frightful situation in my circumstances, nevertheless spending time with the well-written fashion you resolved the issue forced me to weep for fulfillment. I am thankful for your work and in addition sincerely hope you really know what an amazing job you are carrying out teaching men and women with the aid of your webblog. Most probably you have never met any of us.

  25. I want to point out my respect for your generosity supporting individuals who absolutely need help with that topic. Your personal commitment to getting the solution throughout was especially powerful and have continually helped professionals just like me to arrive at their pursuits. Your own invaluable help and advice implies so much to me and still more to my office workers. Warm regards; from each one of us.

  26. I precisely wanted to thank you very much yet again. I’m not certain what I might have worked on in the absence of the entire secrets discussed by you about my area. It has been the intimidating condition in my view, nevertheless taking a look at a specialised technique you managed that made me to leap over happiness. I am thankful for this support and thus sincerely hope you know what a great job you were accomplishing teaching many others using your web blog. Most probably you haven’t met any of us.

  27. Thanks for all your efforts on this site. My mother really loves carrying out investigations and it’s easy to understand why. We all learn all concerning the powerful means you produce both interesting and useful solutions on the web site and in addition improve response from website visitors about this idea while our girl is in fact becoming educated a lot of things. Take pleasure in the remaining portion of the year. You have been doing a brilliant job.

  28. An interesting conversation is worth comment. I assume that you need to write extra on this topic, it could not be a taboo subject yet typically individuals are inadequate to speak on such subjects. To the next. Thanks

  29. Thank you so much for providing individuals with a very wonderful chance to read in detail from here. It’s usually very beneficial plus full of a good time for me personally and my office co-workers to search your web site no less than 3 times in 7 days to find out the fresh secrets you have. And definitely, I am usually fulfilled with your spectacular tactics you give. Some two ideas in this article are rather the most beneficial I have ever had.

  30. A lot of thanks for your whole hard work on this web site. Debby enjoys going through investigations and it is obvious why. I notice all about the compelling form you make helpful tips and hints via this website and even welcome response from other individuals about this subject plus my daughter is undoubtedly starting to learn a lot of things. Take advantage of the remaining portion of the new year. Your carrying out a first class job.

  31. A lot of thanks for all your hard work on this blog. My mother delights in working on research and it is obvious why. We all know all relating to the powerful method you render good techniques on this blog and as well boost participation from other individuals on this concern so my girl is actually being taught a great deal. Take pleasure in the rest of the year. You are carrying out a terrific job.

  32. Needed to draft you one very small observation just to thank you over again with your extraordinary secrets you’ve documented on this website. It was really strangely open-handed with you to make openly all that a number of people would have advertised as an e book to help make some money for their own end, notably since you could possibly have done it in the event you decided. The inspiring ideas as well acted to become easy way to understand that other people have a similar zeal similar to mine to learn significantly more around this condition. I believe there are numerous more enjoyable sessions up front for folks who take a look at your blog.

  33. I precisely desired to say thanks once more. I am not sure what I would’ve created in the absence of the actual tips revealed by you on that topic. Completely was an absolute intimidating problem for me, nevertheless coming across this expert form you treated it forced me to jump over delight. I’m just grateful for this help and hope you really know what a powerful job that you’re providing teaching the others all through your web blog. I’m certain you’ve never met any of us.

  34. My wife and i have been relieved when Jordan could complete his basic research from the precious recommendations he was given through the weblog. It is now and again perplexing just to happen to be offering guidelines that some other people might have been selling. Therefore we already know we have got you to thank for that. Those illustrations you have made, the straightforward site navigation, the relationships you help engender – it is everything sensational, and it is facilitating our son and our family feel that that subject is fun, which is unbelievably pressing. Thanks for the whole lot!

  35. I must express my love for your kindness in support of visitors who really need guidance on this one idea. Your personal dedication to getting the solution all over had become especially productive and has all the time enabled guys and women just like me to get to their aims. The insightful help and advice signifies a lot to me and still more to my fellow workers. Thanks a ton; from each one of us.

  36. I actually wanted to develop a brief message so as to thank you for all of the great tips and tricks you are sharing here. My incredibly long internet research has at the end been recognized with high-quality strategies to exchange with my great friends. I would declare that many of us website visitors are quite blessed to be in a decent place with very many perfect professionals with helpful opinions. I feel rather blessed to have encountered the web pages and look forward to many more amazing minutes reading here. Thank you once again for all the details.

  37. I have to point out my passion for your generosity for folks that actually need guidance on your question. Your personal dedication to passing the solution all over ended up being amazingly good and has continuously allowed others just like me to reach their dreams. Your personal warm and friendly information means a whole lot to me and even more to my mates. Warm regards; from each one of us.

  38. I wanted to write you the bit of note so as to give thanks again for your gorgeous thoughts you’ve contributed on this website. This is really incredibly open-handed with you in giving publicly what exactly a lot of folks would’ve offered for an electronic book to generate some money for their own end, specifically seeing that you might have tried it in case you decided. These guidelines likewise worked to become a easy way to be aware that other people have the identical desire really like my own to know the truth a great deal more with reference to this issue. I know there are some more fun times ahead for individuals that discover your blog post.

  39. I wish to show some thanks to this writer for rescuing me from this type of circumstance. After surfing throughout the search engines and meeting thoughts which were not powerful, I believed my life was done. Living without the presence of answers to the issues you have resolved through your good short article is a serious case, as well as ones which might have badly affected my career if I had not discovered your web blog. Your own skills and kindness in playing with all things was useful. I don’t know what I would have done if I had not come upon such a thing like this. I can at this time relish my future. Thank you very much for this impressive and effective help. I won’t be reluctant to endorse your blog post to anyone who needs to have support on this topic.

  40. I in addition to my friends happened to be studying the best guidelines found on your website and quickly I got a horrible suspicion I never thanked the site owner for those secrets. Those men are already so stimulated to read through them and have now quite simply been having fun with those things. We appreciate you truly being very thoughtful and also for deciding on such terrific subjects most people are really needing to be informed on. Our honest regret for not expressing gratitude to you sooner.

  41. I would like to convey my appreciation for your kindness supporting individuals that absolutely need guidance on this important concept. Your personal dedication to getting the message all over had become unbelievably valuable and have without exception encouraged girls much like me to attain their desired goals. Your amazing helpful recommendations implies so much a person like me and even further to my mates. With thanks; from all of us.

  42. Thanks a lot for giving everyone an extraordinarily splendid opportunity to read articles and blog posts from this blog. It’s usually very excellent and as well , packed with a lot of fun for me personally and my office co-workers to visit your blog at least three times per week to study the newest guidance you have. And indeed, I am also usually impressed considering the terrific pointers served by you. Some 4 ideas in this posting are surely the most beneficial we’ve had.

  43. Thanks so much for providing individuals with such a brilliant opportunity to read from this site. It really is so ideal and stuffed with fun for me and my office fellow workers to visit your website more than thrice in a week to read through the newest guides you have got. Of course, I am also actually amazed with the astounding advice you serve. Selected 1 tips in this posting are honestly the most effective I’ve had.

  44. I wanted to send you a little bit of remark just to give thanks over again for your nice tips you have provided in this article. It is tremendously open-handed of you to provide freely precisely what many people could have advertised as an e book to generate some dough on their own, precisely given that you might well have tried it if you ever desired. These techniques as well served to become a easy way to fully grasp that other people have the identical dream really like my own to know whole lot more pertaining to this issue. I am certain there are thousands of more pleasurable periods ahead for people who look over your blog post.

  45. I in addition to my guys came examining the excellent information and facts located on your website and then at once I had an awful suspicion I never expressed respect to the web site owner for those secrets. All of the young men appeared to be as a consequence thrilled to read through them and have in effect surely been using these things. We appreciate you simply being considerably helpful as well as for opting for variety of brilliant subject matter millions of individuals are really wanting to learn about. My personal sincere apologies for not expressing appreciation to earlier.

  46. I truly wanted to type a simple remark to be able to appreciate you for all the superb concepts you are writing here. My time consuming internet lookup has finally been compensated with incredibly good knowledge to share with my companions. I would admit that we site visitors actually are really fortunate to exist in a superb site with many perfect professionals with insightful tips. I feel somewhat happy to have discovered your entire web site and look forward to some more pleasurable times reading here. Thanks a lot again for a lot of things.

  47. I intended to send you that little bit of note to thank you as before with your breathtaking tactics you have documented on this page. This is quite incredibly open-handed with you to offer unhampered just what a few individuals could possibly have sold for an electronic book to generate some profit for their own end, particularly given that you could possibly have done it if you ever considered necessary. Those good tips additionally worked to be a fantastic way to be certain that the rest have similar interest like my very own to find out very much more with regards to this condition. Certainly there are thousands of more fun sessions in the future for many who view your blog post.

  48. I enjoy you because of all of the labor on this blog. My aunt delights in engaging in internet research and it’s obvious why. We learn all regarding the powerful ways you create advantageous suggestions by means of your web blog and improve response from other ones about this theme while our simple princess is in fact discovering so much. Take pleasure in the remaining portion of the year. You have been doing a superb job.

  49. I needed to compose you one very little remark so as to say thanks a lot over again regarding the striking tips you have featured at this time. It is so particularly generous of you to grant extensively precisely what some people would have made available as an electronic book to generate some profit on their own, primarily considering the fact that you might have tried it in the event you considered necessary. These good tips also worked to become great way to realize that someone else have the same interest just like mine to see very much more on the topic of this problem. I believe there are lots of more enjoyable periods ahead for people who take a look at your blog.

  50. Thanks a lot for providing individuals with a very pleasant possiblity to discover important secrets from this blog. It’s always so brilliant plus packed with a good time for me and my office friends to visit your web site minimum thrice a week to find out the newest secrets you will have. And of course, I am certainly satisfied with all the breathtaking tricks you serve. Selected 1 ideas in this post are really the most effective I have ever had.

  51. I am also commenting to let you be aware of of the excellent discovery my wife’s girl undergone browsing your web site. She came to understand a good number of things, most notably what it is like to have an incredible helping mindset to get certain people without hassle master selected multifaceted subject matter. You truly exceeded visitors’ expected results. I appreciate you for churning out the essential, trustworthy, explanatory and cool tips on this topic to Kate.

  52. I am commenting to make you understand what a fantastic encounter my daughter had viewing your webblog. She realized several pieces, which include what it’s like to possess a great coaching mindset to make many more quite simply have an understanding of specified tricky issues. You really surpassed people’s desires. Thank you for displaying these insightful, dependable, informative and in addition easy tips about that topic to Kate.

댓글 남기기