|
-
Dec 12th, 2000, 08:34 AM
#1
Thread Starter
Hyperactive Member
Microsoft puts a textbox in a popup menu. Why can't I?
Does anyone know how this is done in MS Access? I would
like to imitate this same behavior w/o using a form to mimic the popup menu. There has got to be a way to do it
using the API!!!
Any and All help is greatly appreciated!!!!
Bababooey
Tatatoothy
Mamamonkey
-
Jan 9th, 2001, 07:15 PM
#2
Member
Microsoft does it.........why can't i?
Well,,considering the fact that its, MICROSOFT!...and,,,they MADE IT!
-
Jan 10th, 2001, 08:05 AM
#3
Black Cat
Access doesn't seem to use the standard Windows menu. I think they're using something like the CoolBar control. I've never really used it, but I think you can put a textbox on it.
Josh
-
Jan 10th, 2001, 10:09 AM
#4
Thread Starter
Hyperactive Member
"Punk"...pointless post.
If you're not part of the solution,
you're part of the problem.
:P
Bababooey
Tatatoothy
Mamamonkey
-
Jan 10th, 2001, 10:13 AM
#5
Thread Starter
Hyperactive Member
Josh,
I used spy++ to watch Access do it's thing when I called the
menu. I don't remember exactly what it told me (because I
gave up on it) but I know it was something to the fact that
it was part of the appendMenu api or one of the similar API's.
I also emailed the maker of the "Genius" utility and he said
that's he's using delphi and the libraries he uses aren't
available to me as a vb programmer. I code in C++ also, so
I'm looking to maybe do this in C++.
Bababooey
Tatatoothy
Mamamonkey
-
Jan 10th, 2001, 04:05 PM
#6
Member
Correction
-
Jan 11th, 2001, 01:06 PM
#7
Thread Starter
Hyperactive Member
Bababooey
Tatatoothy
Mamamonkey
-
Jan 11th, 2001, 03:40 PM
#8
I agree with JoshT; they probably use a different class for the menu.
-
Jan 12th, 2001, 05:55 PM
#9
Member
Well, I can almost promise you that the AppendMenu function has nothing to do with it. I too believe that Microsoft is not playing fair here and using a popup window (of some sort) to simulate a menu, and thus can add just about anything they want to the "menu".
However, there is a API function GetWindowFromDC that, when used in conjunction with an owner-drawn menu (which most microsoft menus are), can give you a hwnd in exchange for a hdc. I have tested this and was able to add a textbox to a menu (by calling SetParent using the hwnd returned from GetWindowFromDC as the textbox's new parent), but the results were less than desirable. In order to do this though, you have to modify the menu item(s) to owner draw by using SetMenuItemInfo and the MF_OWNERDRAW flag, and then subclass the form for the WM_MEASUREITEM and WM_DRAWITEM window messages.
-
Jan 12th, 2001, 09:03 PM
#10
Fanatic Member
rippin, do you have some code to do this, or maybe you have made a DLL? If so, that would be great, i want to do this, but don't want to take the time to write this all out!
GWDASH
[b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]
-
Jan 16th, 2001, 07:21 AM
#11
Thread Starter
Hyperactive Member
rippin,
thx a lot for the info. I figured that you gotta be able
to do it in some form. Go download a program called
Genius and check out some of the menus that it uses.....
You can find it on zdnet or any of those shareware sites.
The programmer told me he wrote it in delphi tho
later
Bababooey
Tatatoothy
Mamamonkey
-
Jan 16th, 2001, 09:49 AM
#12
Fanatic Member
Guys
I was trying to do this, and got cheesed off so I spoke to Karl E Petersen and Bryan Stafford (Microsoft MVP's) about this, and they are pretty sure that MS (like Megatron said) have written a different class that behaves like a menu. Thats good enough for me...
Crispin
VB6 ENT SP5
VB.NET
W2K ADV SVR SP3
WWW.BLOCKSOFT.CO.UK
[Microsoft Basic: 1976-2001, RIP]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|