|
Hi,
How does the listbox part of combobox appear beyond the parent's client area without being clipped whereas a hand made listbox,when moved near the edge of the parent's client area get clipped?
I mean, suppose the parent's client area is 300x300. If I move a combobox to 100,250 with dropdown height as 100 and click on it, it opens up. Now suppose I move a listbox of size 100x200 to 100,250. It is clipped.
What's the trick ? I guessed the combo's listbox is sibling of the combo's parent and has higher Z order....
I need this to work. F1.
Koder.
|
|
|
|
|
I would guess the combo box's list window is a child of the desktop window.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: I would guess the combo box's list window is a child of the desktop window.
Well you can't actually get Spy++ on the drop down window ( at least I can't figure out how ) but putting on one that has the list displayed statically or on a rolled-up combobox does not show the desktop as an owner of the any of combobox windows.
led mike
|
|
|
|
|
I wouldn't expect or assume anything on a rolled-up combobox but what do you mean by
"the list displayed statically"?
Heck, now that I think about it more, it doesn't need to be a separate window...
The control code can just draw it on the screen (to a screen DC)
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: Heck, now that I think about it more, it doesn't need to be a separate window...
The control code can just draw it on the screen (to a screen DC)
Yeah that's what I was thinking, it's a common control so who knows what it's doing.
Mark Salsbery wrote: but what do you mean by
"the list displayed statically"?
Well you can see one in the Notepad Font Dialog or do one in your own MFC dialog by setting the "Type" property to "Simple"
led mike
|
|
|
|
|
led mike wrote: or do one in your own MFC dialog by setting the "Type" property to "Simple"
That doesn't draw outside the parent for me (on Vista/Common Controls V6).
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: That doesn't draw outside the parent for me
Did you lengthen it vertically in the designer after setting the property? And put data in it?
(XP Pro VS2005 ) What is the DLL so I can check the version?
Wow, what an idiot, "outside the parent", I was thinking the edit box part of the control not the parent window of the combobox.
Guess I picked a bad day to stop smoking crack. Have a great weekend Mark, i'm outa here! Last modified: 18mins after originally posted --
led mike
|
|
|
|
|
led mike wrote: Did you lengthen it vertically in the designer after setting the property? And put data in it?
Yes. And put it at the bottom of the dialog. If I resize the dialog by dragging the bottom edge down,
the items come into view.
led mike wrote: (XP Pro VS2005 ) What is the DLL so I can check the version?
Beats me - which dll has the combobox implementation?
I just meant I was using the <assemblyIdentity type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0'...
manifest entry
Is this the daily "how does it work" session? hehe If more people would do that, there wouldn't be many posts here LOL
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hehe just saw your modified post.
led mike wrote: Have a great weekend Mark, i'm outa here!
Thanks, man, you too!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
From MSDN:
"Due to its size, the list box component of a drop-down combo box may need to extend beyond the client area of the combo box's parent window. Windows creates the list box as a child of the desktop window"
|
|
|
|
|
son of a gun!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
So, Desktop it is..will try.
Thanks.
|
|
|
|
|
That must be it...most of them said that.
Thanks. Will try.
|
|
|
|
|
Assuming MFC...
Attempt #1: You can CreateEx() with WS_POPUP style but that will deactivate your app while the popup is up and your popup window will show up in the taskbar.
Attempt #2: You can give it an extended style of WS_EX_TOOLWINDOW to prevent the taskbar entry but that doesn't solve the deactivated application problem.
The solution is to avoid WS_POPUP and use CreateEx() with an extended style of WS_EX_TOOLWINDOW, style of WS_CHILD, and make the parent the desktop window.
There are other issues to contend with but that will get you a window that can extend beyond the window of your application.
Hope that helps.
|
|
|
|
|
I do not quite understand your issue.
Indeed, drop list for combo box is a child of the desktop window. It also has mouse capture, to detect when it should be dismissed.
The point is that all you need is a handler for a command message with ID_HELP ID and command message handler.
Drop list generates WM_HELP message and the rest is done by a framework, resulting in delivering WM_HELP to a combo box and further as a command to an application.
JohnCz
|
|
|
|
|
Thanks for your reply.
By ID_HELP, if you are referring to "I need this to work. F1.", please forgive my bad humour...I meand "I need this to work. Help"
|
|
|
|
|
Well, I took it literarily.
Koder wrote: I need this to work. Help
Well, I took it literarily.
So, what is exactly that you "need this to work" then?
JohnCz
MS C++ MVP
|
|
|
|
|
I am looking for a software licensing system. This is one of those systems where you register the product, and you get a key back, enter the key in a registration screen, and the product is enabled.
In our case, we're interested in this primarily for controlling access to different "modules" of a large application.
I have done some browsing, and it looks like there are a number of tools to do this kind of thing, including Protection Plus, Software Passport, and Encryptor.
Anyone have any experience with these or similar products? Recommendations? Things to look out for?
Thanks,
Don
|
|
|
|
|
note that resorting to an existing protector can be bad, since most of them can be detourned using crack tools,hence so for your application security.
|
|
|
|
|
I am at the moment dealing with issues like that and have decided not to go down the road like that at all. I do not know how big or small your target market is, but mine is relatively small. If All small suppliers go to a big licencing house, it saves them money, and have the security of a Big House. Also, the Big House becomes a target, because it becomes worthwile for licence breakers in that one big efford will break thousands of licencing schemes. If everybody designs their own scheme, (and there is very good Public Domain (PGP etc) Software about that can be customised ), it will take thousands of individual effords to break the codes, and becomes economically not viable for the code breakers.
The rules are:
-Pick a Scheme, PGP, Blowfish, whatever.
-Learn How it works. (Vitally Important)
-Inspect for Backdoors
-Customise
-Inspect for Backdoors (again)
-Implement Licence Tampering Detection
-Inspect for Backdoors (again)
-Hope for the best.
-Sue.
regards, and I know what You're going through.
Bram van Kampen
|
|
|
|
|
We're a very small company. I have considered rolling our own, but unless there's better information on how to do everything than I've found, I don't have time to do it.
Not only do you have to learn about an encryption scheme, you also have to learn about how to tie things to the hardware (drive serial number, or whatever), how to block debuggers and decompilers from running, etc. And you have to write the UI components -- the registration dialogs, the app that you use to issue registration numbers, etc.
Thanks for your thoughts.
Don
|
|
|
|
|
Well,
You Cannot block Decompilers, because they attack the Raw Excecutable. Decompiling is not an easy task however, and it would not be the case in general that an afternoon spent with your exe and a decompiler would reveal your code. It is typically ManMonths of painstaking research before decompiling anything gives results. The question is one of economics. How many Licences, how much each. how desirable is your target market, etc. vs the cost of many manhours decompiling your code. It may well be easier for potential competitors to write their own (after having bought yours) than to try and de-compile.
Debuggers are blocked by ensuring that your final EXE is stripped from all debugging info.
Unfortunately you will need some UI Components to let the user know that they need to register, and a method to allow him(her) to enter salient details.
If you bounce an e-mail to bramvankampen@aol.com, I'll forward you software I found somewhere to deal with DiskId's etc.
Bottom Line.: If you think it's going to be big, and that you could become a Worldwide Target for Licence Decrytptors, your potential sales will be large, and invest in professionals to do this in a bespoke way.
Regards
Bram van Kampen
|
|
|
|
|
If anyone else is interested, Bram sent me some public sources that he didn't remember where they came from. But a quick google turned them up at http://www.winsim.com/diskid32/diskid32.html[^]. This is "DiskId32 (freeware): A Win32 Application and Source Code for Reading Hard Drive Manufacturing Information".
Thanks, Bram.
Don
|
|
|
|
|
Hi Don
Thanks for recovering the link where I found it. I found it quite usefull. The only thing one wonders is, will it survive the various Vista udates and upgrades in the future. It appears to me that it depends on a lot of undocumented features. By the way, one wonders why there is no Kernel API to do something like that.
Regards,
Bram van Kampen
|
|
|
|
|
I am using MFC in an application with a lot of lengthy operations.
Any body can help me on a good and easy tool for code profiling ? (I only need to profile regions of code, not a whole application.
|
|
|
|