The MASM Forum

General => The Campus => Topic started by: xandaz on August 13, 2020, 05:49:35 AM

Title: Toolbar tooltips
Post by: xandaz on August 13, 2020, 05:49:35 AM
   Hey guys. Anyone have an example of toolbar tooltips. Cant get the tooltip to show.
   Thanks in advance
Title: Re: Toolbar tooltips
Post by: jj2007 on August 13, 2020, 08:16:17 AM
In case you have the latest MasmBasic version (http://masm32.com/board/index.php?topic=94.0): \Masm32\MasmBasic\Res\SimpleEditor.asc

In multiple languages :cool:
Title: Re: Toolbar tooltips
Post by: mineiro on August 13, 2020, 09:56:56 AM
hello sir xandaz;
I remember of playing with this in old board; you can find a lot of examples.
Not sure if helps:
http://www.masmforum.com/board/index.php?topic=16671.0
Title: Re: Toolbar tooltips
Post by: xandaz on August 13, 2020, 07:59:58 PM
   thanks guys. JJ the attachment is invalid.
Title: Re: Toolbar tooltips
Post by: jj2007 on August 13, 2020, 08:21:52 PM
Quote from: xandaz on August 13, 2020, 07:59:58 PM
   thanks guys. JJ the attachment is invalid.

It's a fake zip to attach an image. With a MasmBasic installation, the source is at \Masm32\MasmBasic\Res\SimpleEditor.asc, as indicated above.

Attached the exe and the source. Use the menu entry Language to test it. To build the editor, you need some extra resources (attached); copy them to the folders indicated in the Rsrc section at the end of SimpleEditor.asc (this is kind of silly, it should be included in the MasmBasic package, but I am at the 512kB limit, so I had to sacrifice some files...)
Title: Re: Toolbar tooltips
Post by: xandaz on August 13, 2020, 09:40:07 PM
  ty JJ. you guys are the best.
Title: Re: Toolbar tooltips
Post by: TouEnMasm on August 13, 2020, 10:41:44 PM
Hello,
When you can't view the tooltip , suspect one thing : the structures.
Get the size of the structure,you can also ,with debug ,view wich size the program wait for the structure.
Most often,a normal structure with a correct alignment,made the job.
It is true for all the common controls and particulary for the tooltip.

Quote
;sdk
TTTOOLINFOA   STRUCT DEFALIGNMASM
   cbSize DWORD ?
   uFlags DWORD ?
   hwnd HWND ?
   uId XMASM ?
   rect RECT <>
   hinst HINSTANCE ?
   lpszText XMASM ?
   lParam LPARAM ?
IF ( NTDDI_VERSION GE  NTDDI_WINXP)
   lpReserved XMASM ?
ENDIF
TTTOOLINFOA      ENDS

;windows.inc actual
TOOLINFOA STRUCT
  cbSize             DWORD      ?
  uFlags             DWORD      ?
  hWnd               DWORD      ?
  uId                DWORD      ?
  rect               RECT      <>
  hInst              DWORD      ?
  lpszText           DWORD      ?
  lParam             LPARAM     ?
TOOLINFOA ENDS

If you have WinXp,you are not concerned by the problem