Roger,
under windows 11 DC_GuiAchoice() does not work (picture 1)
and DC_achoice() does not work well (picture 2)
It's a good program. What needs to be fixed?
( Alaska Xbase++ 2.0.1503 , eXpress++ 2.0.268 )
aMenuItems := {"title1","title2","title3","title4"}
cTitle := "LIST (Esc=Exit)"
lCenter := .T.
cFontName := "11.Consolas"
* (picture 1)
nn := DC_GuiAchoice( 5,10,20,30,;
aMenuItems,;
;//aSelItems,;
;//"achoice_func";
;//nInitialitem,;
;//nWindowrow,;
cTitle,;
;//aHelpCodes,;
;//aMenu,;
cFontName,;
;//@oList,;
;//lDestroy,;
;//aMessage,;
;//cHeader,;
lCenter)
* (picture 2)
nn := DC_Achoice( 5,10,20,30, aMenuItems )
DC_Achoice() and DC_GuiAchoice() and Win11
- slobodan1949
- Posts: 96
- Joined: Mon Apr 25, 2011 8:57 am
- Location: SERBIA
- Contact:
DC_Achoice() and DC_GuiAchoice() and Win11
- Attachments
-
- Picture1and2_DC_Achoice.png (18.33 KiB) Viewed 4402 times
- slobodan1949
- Posts: 96
- Joined: Mon Apr 25, 2011 8:57 am
- Location: SERBIA
- Contact:
Re: DC_Achoice() and DC_GuiAchoice() and Win11
28.04.2025
I really like Roger's function DC_GuiAchoice()
so I tried to adapt it to windows 11
The entire example is given in the file DC_GUIACHOICE.ZIP
I really like Roger's function DC_GuiAchoice()
so I tried to adapt it to windows 11
The entire example is given in the file DC_GUIACHOICE.ZIP
- Attachments
-
- DC_GUIACHOICE.zip
- (223.04 KiB) Downloaded 57 times
-
- dc_guiachoice.png (106.94 KiB) Viewed 1451 times
Re: DC_Achoice() and DC_GuiAchoice() and Win11
Some of these functions were written as GUI replacements for my old Clipper product, dCLIP.
They were Clipper code that was converted to Xbase++ back when I first started iwth Xbase++ in 1999.
The code doesn't use any of the eXpress++ DC* commands which is very much better.
I don't use Windows 11, so I have no way of testing my changes, but I will write you a version that uses the DCBROWSE system.
They were Clipper code that was converted to Xbase++ back when I first started iwth Xbase++ in 1999.
The code doesn't use any of the eXpress++ DC* commands which is very much better.
I don't use Windows 11, so I have no way of testing my changes, but I will write you a version that uses the DCBROWSE system.
The eXpress train is coming - and it has more cars.
Re: DC_Achoice() and DC_GuiAchoice() and Win11
Try this:
Code: Select all
#INCLUDE "dcdialog.CH"
FUNCTION Main()
LOCAL aMenuItems, cTitle, lCenter, cFontName, nn
aMenuItems := {"title1","title2","title3","title4"}
cTitle := "LIST"
lCenter := .T.
cFontName := "11.Consolas"
nn := My_GuiAchoice( 5,10,20,30,aMenuItems,cTitle,cFontName,lCenter)
WTF nn pause
RETURN nil
* -----------
PROC appsys ; RETURN
* -----------
FUNCTION My_GuiAChoice( nTop, nLeft, nBottom, nRight, aItems, ;
cTitle, cFontName, lCenter )
LOCAL aItems2[0], i, oBrowse, nPointer := 1, lStatus, GetList[0]
FOR i := 1 TO Len(aItems)
AAdd(aItems2,{aItems[i]})
NEXT
@ nTop, nLeft ;
DCBROWSE oBrowse ;
DATA aItems2 ;
SIZE nRight-nLeft, nBottom-nTop ;
FONT cFontName ;
POINTER nPointer ;
NOHSCROLL ;
ITEMSELECTED {||DC_ReadGuiEvent(DCGUI_EXIT_OK,GetList)}
DCBROWSECOL ELEMENT 1 PARENT oBrowse WIDTH nRight-nLeft
DCREAD GUI FIT ADDBUTTONS TITLE cTitle TO lStatus ;
SETFOCUS @oBrowse
IF lStatus
RETURN nPointer
ENDIF
RETURN 0
The eXpress train is coming - and it has more cars.
- slobodan1949
- Posts: 96
- Joined: Mon Apr 25, 2011 8:57 am
- Location: SERBIA
- Contact:
Re: DC_Achoice() and DC_GuiAchoice() and Win11
Elegant, simple, masterful,
THANK YOU
THANK YOU