TVistaMenu problem

TVistaMenu problem

Postby richard-service » Sat Sep 01, 2012 1:39 pm

Hi
I try to use it within Resource. but not work. Someone know it? Thank you.
Code: Select all  Expand view

oVMenu := TVistaMenu():Redefine( 1000, oDlg, , )
oVMenu:nColumns := 1
oVMenu:nType := 2

oItem := oVMenu:AddItem( "Sistema y mantenimiento " )
 

    Error description: Error BASE/1123 Argument error: AADD
    Args:
    [ 1] = U
    [ 2] = O TVISTAMENUITEM

    Stack Calls
    ===========
    Called from: => AADD( 0 )
    Called from: .\source\classes\VISTAMNU.PRG => TVISTAMENU:ADDITEM( 135 )
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: TVistaMenu problem

Postby carlos vargas » Sat Sep 01, 2012 5:17 pm

Is you call this code in on init of dialog?

this type of controls is call only in the on init clasule


example:
Code: Select all  Expand view

PRIVATE oDlg
...
DEFINE DIALOG oDlg....
...
REDEFINE GETS ...
...
ACTIVATE DIALOG oDlg ON INIT CallBuild_TVIstaMenu()

procedure CallBuild_TVistamenu()
...
/*build the tvistamenu here.*/
...
return

 


salu2
carlos vargas
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
carlos vargas
 
Posts: 1720
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: TVistaMenu problem

Postby richard-service » Sat Sep 01, 2012 5:34 pm

Hi Carlos,

I got error below:
Error FiveWin/3 Cannot create Dialog Box

Code: Select all  Expand view

ACTIVATE DIALOG oDlg CENTER              ;
               ON INIT ( NoCloseButton(oDlg), CallBuild_TVistamenu(oDlg) ) ;

STATIC FUNCTION CallBuild_TVistamenu(oD)

LOCAL oVMenu, oItem

      oVMenu := TVistaMenu():Redefine( 1000, oD )
             oVMenu:nColumns := 1
             oVMenu:nType := 2

             oItem := oVMenu:AddItem( "Sistema y mantenimiento " )
             oItem:AddItem( "Empezar a trabajar con windows",,;
                            { || MsgInfo( "Sistema y mantenimiento" ) } )
             oItem:AddItem( "Hacer una copia de seguridad del equipo" )
             oItem:AddItem( "Item 1 Item 1" )
             oItem:AddItem( "ItemItem2 ItemItem2" )
             oItem:AddItem( "ItemItemItem3 ItemItemItem3" )

RETURN NIL
 
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: TVistaMenu problem

Postby Daniel Garcia-Gil » Sat Sep 01, 2012 5:35 pm

Hello

the resource name is "TVISTAMENU"
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: TVistaMenu problem

Postby richard-service » Sat Sep 01, 2012 5:46 pm

Hi Daniel,

Yes, I have it.
Code: Select all  Expand view

D_DR_WIN_Login DIALOG 46, 18, 304, 279
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "使用者登入"
FONT 12, "細明體"
{
 CONTROL "登入帳號", 701, "TDr3dText", 0 | WS_CHILD | WS_VISIBLE, 7, 52, 47, 12
 COMBOBOX 103, 58, 52, 94, 66, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_SORT | CBS_DISABLENOSCROLL | WS_VSCROLL | WS_TABSTOP
 CONTROL "登入密碼", 702, "TDr3dText", 0 | WS_CHILD | WS_VISIBLE, 7, 71, 47, 12
 EDITTEXT 102, 58, 71, 94, 12, ES_PASSWORD | WS_BORDER | WS_TABSTOP
 PUSHBUTTON "", 301, 110, 170, 60, 30
 PUSHBUTTON "", 302, 173, 170, 60, 30
 PUSHBUTTON "", 303, 236, 170, 60, 30
 CONTROL "", 600, "TImage", 0 | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 73, 84
 CONTROL "部門名稱", 703, "TDr3dText", 0 | WS_CHILD | WS_VISIBLE, 7, 90, 47, 12
 CONTROL "", 2000, "TDr3dText", 0 | WS_CHILD | WS_VISIBLE, 58, 90, 94, 12
 CONTROL "", 1000, "TVistaMenu", 0 | WS_CHILD | WS_VISIBLE, 19, 210, 279, 66
}
 
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: TVistaMenu problem

Postby ukoenig » Sun Sep 02, 2012 4:18 pm

Hello,

I tested from Resource ( on Dialog Init ), but doesn't work at all.
Is there a complete working sample ?

I used only a empty Dialog with :
CONTROL "", 1000, "TVistaMenu", 0 | WS_CHILD | WS_VISIBLE, 19, 210, 279, 66

Error-Message :
Cannot create Dialog

Best Regards
Uwe :?:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: TVistaMenu problem

Postby karinha » Tue Jan 04, 2022 6:14 pm

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7808
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: TVistaMenu problem

Postby richard-service » Wed Jan 05, 2022 7:29 am

Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 91 guests