I try to create a sample test :
I want create a dialog with folder
on each folder I must insert some information ( says, gets, combo,...)
I must create folder small because I must insert also the keyboard of Smartphone
to save or for not to save the information of this dialog I want use btnbmp on the bottom of keyboard ( menu)
sample : Ok cancel
I saw your sample menubmp.prg Can I use this on/ for a dialog ?
Can I use it only using thr source code and not the resource ?
Then I open a Resource file :
there are many information different from a siply fwh program resources adn I want understand How create one for my fwppc application test
Can I have a lesson ?
THanks
I not Understand : can Have a lesson from the gurus ?
- Antonio Linares
- Site Admin
- Posts: 42521
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 75 times
- Contact:
Re: I not Understand : can Have a lesson from the gurus ?
Silvio,
> I saw your sample menubmp.prg Can I use this on/ for a dialog ?
It seems as the Windows Mobile API only allows to have a menu on a window, not on a dialog.
> Can I use it only using thr source code and not the resource ?
The Windows Mobile API only allows to create a pulldown menu from resources.
http://msdn.microsoft.com/en-us/library/aa453678.aspx
> I saw your sample menubmp.prg Can I use this on/ for a dialog ?
It seems as the Windows Mobile API only allows to have a menu on a window, not on a dialog.
> Can I use it only using thr source code and not the resource ?
The Windows Mobile API only allows to create a pulldown menu from resources.
http://msdn.microsoft.com/en-us/library/aa453678.aspx
- Antonio Linares
- Site Admin
- Posts: 42521
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 75 times
- Contact:
Re: I not Understand : can Have a lesson from the gurus ?
Silvio,
We already explained the structure of a Windows Mobile menu resource in these forums:
viewtopic.php?p=41081#p41081
We already explained the structure of a Windows Mobile menu resource in these forums:
viewtopic.php?p=41081#p41081
- Antonio Linares
- Site Admin
- Posts: 42521
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 75 times
- Contact:
Re: I not Understand : can Have a lesson from the gurus ?
Silvio,
If a call to SHInitDialog() is performed, then it seems as a dialog may support a menu:
http://msdn.microsoft.com/en-us/library/ms911975.aspx
but we have tested it on Windows Mobile and it does not work. Maybe it is only supported on smartphones.
If a call to SHInitDialog() is performed, then it seems as a dialog may support a menu:
http://msdn.microsoft.com/en-us/library/ms911975.aspx
but we have tested it on Windows Mobile and it does not work. Maybe it is only supported on smartphones.
Code: Select all | Expand
#pragma BEGINDUMP
#include <hbapi.h>
#include <windows.h>
#include <aygshell.h>
HB_FUNC( DLGFULLSCREEN )
{
SHINITDLGINFO shidi;
memset( &shidi, 0, sizeof( SHINITDLGINFO ) );
shidi.dwMask = SHIDIM_FLAGS;
shidi.hDlg = ( HWND ) hb_parnl( 1 );
shidi.dwFlags = SHIDIF_SIZEDLGFULLSCREEN;
SHInitDialog( &shidi );
}
#pragma ENDDUMP
- Antonio Linares
- Site Admin
- Posts: 42521
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 75 times
- Contact:
Re: I not Understand : can Have a lesson from the gurus ?
Silvio,
It properly works![Smile :-)](./images/smilies/icon_smile.gif)
We simply missed to create menudlg.rc (copied from menubmp.rc):
menudlg.prg
menudlg.rc
![Image](http://img398.imageshack.us/img398/7715/capturee.png)
It properly works
![Smile :-)](./images/smilies/icon_smile.gif)
We simply missed to create menudlg.rc (copied from menubmp.rc):
menudlg.prg
Code: Select all | Expand
// FiveWin for Pocket PC - Testing menus with bitmaps
#include "FWCE.ch"
//----------------------------------------------------------------------------//
function Main()
local oDlg
DEFINE DIALOG oDlg TITLE "Menus & bmps"
ACTIVATE DIALOG oDlg ;
ON INIT ( DlgFullScreen( oDlg:hWnd ), oDlg:SetMenu( BuildMenu() ) )
return nil
//----------------------------------------------------------------------------//
function BuildMenu()
local oMenu
DEFINE MENU oMenu RESOURCE 102 ;
BITMAPS 10 ; // bitmap resources ID
IMAGES 2 // number of images in the bitmap
REDEFINE MENUITEM ID 110 OF oMenu ACTION MsgInfo( "OK" )
REDEFINE MENUITEM ID 120 OF oMenu ACTION MsgInfo( "Cancel" )
return oMenu
//----------------------------------------------------------------------------//
#pragma BEGINDUMP
#include <hbapi.h>
#include <windows.h>
#include <aygshell.h>
HB_FUNC( DLGFULLSCREEN )
{
SHINITDLGINFO shidi;
memset( &shidi, 0, sizeof( SHINITDLGINFO ) );
shidi.dwMask = SHIDIM_FLAGS;
shidi.hDlg = ( HWND ) hb_parnl( 1 );
shidi.dwFlags = SHIDIF_SIZEDLGFULLSCREEN;
SHInitDialog( &shidi );
}
#pragma ENDDUMP
menudlg.rc
Code: Select all | Expand
#ifdef _CE
#include "c:\vce\include\arm\windows.h"
#include "c:\vce\include\arm\commctrl.h"
#endif
#define I_IMAGENONE (-2)
#define IDS_HELP 104
#ifdef _CE
102 RCDATA
BEGIN
102, 3,
0, 110, TBSTATE_ENABLED, TBSTYLE_BUTTON, 201, 0, 0,
0, 105, TBSTATE_ENABLED, TBSTYLE_SEP, -1, 0, 0,
1, 120, TBSTATE_ENABLED, TBSTYLE_BUTTON, 202, 0, 0
END
#endif
STRINGTABLE DISCARDABLE
BEGIN
201 "OK"
202 "Cancel"
END
102 MENU DISCARDABLE
BEGIN
MENUITEM "", 110
MENUITEM "", 120
END
10 BITMAP "../bitmaps/pocket/okcancel.bmp"
![Image](http://img398.imageshack.us/img398/7715/capturee.png)
Re: I not Understand : can Have a lesson from the gurus ?
Antonio,
thanks Now I must read and try all !!!
thanks Now I must read and try all !!!
Best Regards, Saludos
Falconi Silvio
Falconi Silvio
Re: I not Understand : can Have a lesson from the gurus ?
Antonio, CAN I insert a panel on folder ?
BecauseI must insert many informations
#include "FWCE.ch"
//----------------------------------------------------------------------------//
function Main()
local oDlg
Local oFld, oPanel
DEFINE DIALOG oDlg TITLE "Inserimento"
@ 0.0, 0 FOLDER oFld PROMPTS "Generale", "Dettagli", "Note" ;
SIZE 119, 95
@ 10, 10 PANEL oPanel OF oFld:aDialogs[ 1 ];
SIZE 100,80
@ 0.5, 1 SAY "First:" OF oPanel SIZE 30, 15
ACTIVATE DIALOG oDlg ;
ON INIT ( DlgFullScreen( oDlg:hWnd ), oDlg:SetMenu( BuildMenu() ) )
return nil
//----------------------------------------------------------------------------//
function BuildMenu()
local oMenu
DEFINE MENU oMenu RESOURCE 102 ;
BITMAPS 10 ; // bitmap resources ID
IMAGES 2 // number of images in the bitmap
REDEFINE MENUITEM ID 110 OF oMenu ACTION MsgInfo( "OK" )
REDEFINE MENUITEM ID 120 OF oMenu ACTION MsgInfo( "Cancel" )
return oMenu
//----------------------------------------------------------------------------//
#pragma BEGINDUMP
#include <hbapi.h>
#include <windows.h>
#include <aygshell.h>
HB_FUNC( DLGFULLSCREEN )
{
SHINITDLGINFO shidi;
memset( &shidi, 0, sizeof( SHINITDLGINFO ) );
shidi.dwMask = SHIDIM_FLAGS;
shidi.hDlg = ( HWND ) hb_parnl( 1 );
shidi.dwFlags = SHIDIF_SIZEDLGFULLSCREEN;
SHInitDialog( &shidi );
}
#pragma ENDDUMP
BecauseI must insert many informations
#include "FWCE.ch"
//----------------------------------------------------------------------------//
function Main()
local oDlg
Local oFld, oPanel
DEFINE DIALOG oDlg TITLE "Inserimento"
@ 0.0, 0 FOLDER oFld PROMPTS "Generale", "Dettagli", "Note" ;
SIZE 119, 95
@ 10, 10 PANEL oPanel OF oFld:aDialogs[ 1 ];
SIZE 100,80
@ 0.5, 1 SAY "First:" OF oPanel SIZE 30, 15
ACTIVATE DIALOG oDlg ;
ON INIT ( DlgFullScreen( oDlg:hWnd ), oDlg:SetMenu( BuildMenu() ) )
return nil
//----------------------------------------------------------------------------//
function BuildMenu()
local oMenu
DEFINE MENU oMenu RESOURCE 102 ;
BITMAPS 10 ; // bitmap resources ID
IMAGES 2 // number of images in the bitmap
REDEFINE MENUITEM ID 110 OF oMenu ACTION MsgInfo( "OK" )
REDEFINE MENUITEM ID 120 OF oMenu ACTION MsgInfo( "Cancel" )
return oMenu
//----------------------------------------------------------------------------//
#pragma BEGINDUMP
#include <hbapi.h>
#include <windows.h>
#include <aygshell.h>
HB_FUNC( DLGFULLSCREEN )
{
SHINITDLGINFO shidi;
memset( &shidi, 0, sizeof( SHINITDLGINFO ) );
shidi.dwMask = SHIDIM_FLAGS;
shidi.hDlg = ( HWND ) hb_parnl( 1 );
shidi.dwFlags = SHIDIF_SIZEDLGFULLSCREEN;
SHInitDialog( &shidi );
}
#pragma ENDDUMP
Best Regards, Saludos
Falconi Silvio
Falconi Silvio