- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
- Etiquetas:
- Intel® Fortran Compiler
Enlace copiado
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
If you are using Win32 api, you should catch WM_MENUSELECT message in your window procedure. Get menu item info from this message it (load resource text for menu item) and then update status bar text.
This is part of my code called on WM_MENUSELECT message
recursive subroutine ShowMenuHelpInStatusBar(hWnd,wParam,lParam)
! called from mainwndproc when WM_MENUSELECT is called
! displays menu help on statusbar
use dfwina
integer*4 hWnd
integer*4 wParam,lParam
character*256 text
Item=INT4(LOWORD(wParam))
iFlags=INT4(HIWORD(wParam))
if ((iFlags == -1) .AND. (lParam == 0)) then ! menu has been closed
nStringID = 0
else
if (IAND(iFlags,MF_POPUP) /= 0) then ! Popup menu
nStringID = 0
else
if (IAND(iFlags,MF_SYSMENU) /=0) then ! System menu
nStringID = IDS_SYSMENU
else
if (Item /= 0) then
nStringID = Item ! String ID == Command ID
else
! menu item separator
nStringID = 0
endif
endif
endif
endif
! Load the string if we have an ID
if (nStringID/=0) then
iret=LoadString(GetWindowLong(hWnd,GWL_HINSTANCE),Item, text,len(text))
if (iret > 0) then
Text=Text(:iret)//""C
iret=SendMessage(hWndStatusBar,SB_SETTEXT,IOR(0,SBT_NOBORDERS),LOC(Text))
endif
endif
return
end
I put text to be shown in statusbar in to the "prompt" control when editing menu in resource editor, to be available through LoadString
I do not use QuickWin.
Jakub
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
- Suscribirse a un feed RSS
- Marcar tema como nuevo
- Marcar tema como leído
- Flotar este Tema para el usuario actual
- Favorito
- Suscribir
- Página de impresión sencilla