Results 1 to 12 of 12

Thread: Microsoft does it.........why can't i?

  1. #1

    Thread Starter
    Hyperactive Member noble's Avatar
    Join Date
    Nov 2000
    Location
    Philly
    Posts
    471
    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

  2. #2
    Member
    Join Date
    Jan 2001
    Location
    I thought you knew!!
    Posts
    38

    Microsoft does it.........why can't i?

    Well,,considering the fact that its, MICROSOFT!...and,,,they MADE IT!

  3. #3
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    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

  4. #4

    Thread Starter
    Hyperactive Member noble's Avatar
    Join Date
    Nov 2000
    Location
    Philly
    Posts
    471
    "Punk"...pointless post.

    If you're not part of the solution,
    you're part of the problem.
    :P



    Bababooey
    Tatatoothy
    Mamamonkey

  5. #5

    Thread Starter
    Hyperactive Member noble's Avatar
    Join Date
    Nov 2000
    Location
    Philly
    Posts
    471
    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

  6. #6
    Member
    Join Date
    Jan 2001
    Location
    I thought you knew!!
    Posts
    38

    Angry Correction

    You mean PunK!

  7. #7

    Thread Starter
    Hyperactive Member noble's Avatar
    Join Date
    Nov 2000
    Location
    Philly
    Posts
    471
    rofl!
    Bababooey
    Tatatoothy
    Mamamonkey

  8. #8
    Guest
    I agree with JoshT; they probably use a different class for the menu.

  9. #9
    Member
    Join Date
    Oct 2000
    Posts
    34
    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.

  10. #10
    Fanatic Member gwdash's Avatar
    Join Date
    Aug 2000
    Location
    Minnesota
    Posts
    666
    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]

  11. #11

    Thread Starter
    Hyperactive Member noble's Avatar
    Join Date
    Nov 2000
    Location
    Philly
    Posts
    471
    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

  12. #12
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754
    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
  •  



Click Here to Expand Forum to Full Width