What is wrong with my code?
Thanks in advance
Otto
Code: Select all | Expand
// This sample shows how to create a Combo Test. #include "FiveWin.ch" //----------------------------------------------------------------------------// function Main() local oDlg, oCbx, oSayItem, oSayAt local cItem := "Österreich A " local aItems:={} AAdd( aItems, "Österreich A " )AAdd( aItems, "Albanien AL " )AAdd( aItems, "Andorra AND " )AAdd( aItems, "Amerikanisch-Samoa ASM " )AAdd( aItems, "Belgien B " )AAdd( aItems, "Burgenland BGL " )AAdd( aItems, "Bermuda BMU " )AAdd( aItems, "Bahrain BRN " )AAdd( aItems, "Myanmar BUR " )AAdd( aItems, "Kuba C " )AAdd( aItems, "Coted'Ivoire CI " )AAdd( aItems, "SriLanka CL " )AAdd( aItems, "Komoren COM " )AAdd( aItems, "KapVerde CV " )AAdd( aItems, "Kaimaninseln CYM " )AAdd( aItems, "Tschechische Republik CZ " )AAdd( aItems, "Deutschland D " )AAdd( aItems, "Dschibuti DJI " )AAdd( aItems, "Dänemark DK " )AAdd( aItems, "Dominikanische Republik DOM" )AAdd( aItems, "Algerien DZ " )AAdd( aItems, "Spanien E " )AAdd( aItems, "Estland EST " )AAdd( aItems, "Fidschi FJI " )AAdd( aItems, "Französisch-Guayana GF " )AAdd( aItems, "Guadeloupe GLP " )AAdd( aItems, "Guinea GN " )AAdd( aItems, "Iran IR " )AAdd( aItems, "Irland IRL " )AAdd( aItems, "Island IS " )AAdd( aItems, "Japan J " )AAdd( aItems, "Kambodscha K " )AAdd( aItems, "Kärnten KTN " )AAdd( aItems, "Libyen LAR " )AAdd( aItems, "Liberia LB " )AAdd( aItems, "Aruba ABW " )AAdd( aItems, "Anguilla AIA " )AAdd( aItems, "Antigua und Barbuda ANT " )AAdd( aItems, "Armenien ARM " )AAdd( aItems, "Australien AUS " )AAdd( aItems, "Barbados BDS " )AAdd( aItems, "Bolivien BOL " )AAdd( aItems, "Bahamas BS " )AAdd( aItems, "Kokosinseln CCK " )AAdd( aItems, "Schweiz CH " )AAdd( aItems, "Kolumbien CO " )AAdd( aItems, "Cook-Inseln COK " )AAdd( aItems, "Costa Rica CR " )AAdd( aItems, "Zypern CY " )AAdd( aItems, "Kenia EAK " )AAdd( aItems, "Tansania EAT " )AAdd( aItems, "Ecuador EC " )AAdd( aItems, "Eritrea ER " )AAdd( aItems, "El Salvador ES " )AAdd( aItems, "Ägypten ET " )AAdd( aItems, "Äthiopien ETH " )AAdd( aItems, "Finnland FIN " )AAdd( aItems, "Falklandinseln FLK " )AAdd( aItems, "Man GBM " )AAdd( aItems, "Guatemala GCA " )AAdd( aItems, "Guam GUM " )AAdd( aItems, "Guyana GUY " )AAdd( aItems, "Honduras HD " )AAdd( aItems, "Jordanien HKJ " )AAdd( aItems, "Indien IND " )AAdd( aItems, "Britisches Territorium im I" )AAdd( aItems, "Irak IRQ " )AAdd( aItems, "Jamaika JA " )AAdd( aItems, "Johnston-Insel JNI " )AAdd( aItems, "St.Kitts und Nevis KN " )AAdd( aItems, "Laos LAO " )AAdd( aItems, "Lesotho LS " )AAdd( aItems, "Lettland LV " )AAdd( aItems, "Malta M " )AAdd( aItems, "Marokko MA " )AAdd( aItems, "Macao MAC " )AAdd( aItems, "Malaysia MAL " )AAdd( aItems, "Monaco MC " )AAdd( aItems, "Midway-Inseln MID " )AAdd( aItems, "Mazedonien,ehem.jugoslaw. M" )AAdd( aItems, "Mosambik MOC " )AAdd( aItems, "Mauritius MS " )AAdd( aItems, "Montserrat MSR " )AAdd( aItems, "Martinique MTQ " )AAdd( aItems, "Malediven MV " )AAdd( aItems, "Malawi MW " )AAdd( aItems, "NiederländischeAntillen NA " )AAdd( aItems, "Namibia NAM " )AAdd( aItems, "Neukaledonien NCL " )AAdd( aItems, "Nepal NEP " )AAdd( aItems, "Norfolkinsel NFK " )AAdd( aItems, "Nicaragua NIC " )AAdd( aItems, "Niue NIU " )AAdd( aItems, "Neuseeland NZ " )AAdd( aItems, "Oman O " )AAdd( aItems, "Portugal P " )AAdd( aItems, "Panama PA " )AAdd( aItems, "Palästina PAL " )AAdd( aItems, "Pitcairn PCN " )AAdd( aItems, "Französisch-Polynesien PF " )AAdd( aItems, "Philippinen PHL " )AAdd( aItems, "Pakistan PK " )AAdd( aItems, "Polen PL " )AAdd( aItems, "Papua-Neuguinea PNG " )AAdd( aItems, "Katar Q " )AAdd( aItems, "Argentinien RA " )AAdd( aItems, "Botsuana RB " )AAdd( aItems, "Chile RCH " )AAdd( aItems, "Indonesien RI " )AAdd( aItems, "Madagaskar RM " )AAdd( aItems, "Niger RN " )AAdd( aItems, "Rumänien RO " )AAdd( aItems, "Korea,Republik(Süd-) ROK " )AAdd( aItems, "Uruguay ROU " )AAdd( aItems, "Philippinen RP " )AAdd( aItems, "San Marino RSM " )AAdd( aItems, "Russische Föderation RUS " )AAdd( aItems, "Afghanistan AFG " )AAdd( aItems, "Angola ANG " )AAdd( aItems, "Aserbaidschan AZ " )AAdd( aItems, "Bangladesch BD " )AAdd( aItems, "Burkina Faso BF " )AAdd( aItems, "Bulgarien BG " )AAdd( aItems, "Belize BH " )AAdd( aItems, "Bosnien-Herzegowina BIH " )AAdd( aItems, "Brasilien BR " )AAdd( aItems, "Brunei BRU " )AAdd( aItems, "Bhutan BTN " )AAdd( aItems, "Belarus BY " )AAdd( aItems, "Kamerun CAM " )AAdd( aItems, "Kanada CDN " )AAdd( aItems, "Tschechoslowakei(historis C" )AAdd( aItems, "Weihnachtsinsel CXR " )AAdd( aItems, "Benin DY " )AAdd( aItems, "Uganda EAU " )AAdd( aItems, "Frankreich F " )AAdd( aItems, "Liechtenstein FL " )AAdd( aItems, "Färöer-Inseln FR " )AAdd( aItems, "Mikronesien(Föderierte St F" )AAdd( aItems, "Gabun GAB " )AAdd( aItems, "Vereinigtes Königreich GB " )AAdd( aItems, "Kanalinseln GBG " )AAdd( aItems, "Gibraltar GBZ " )AAdd( aItems, "Georgien GE " )AAdd( aItems, "Ghana GH " )AAdd( aItems, "Guinea-Bissau GNB " )AAdd( aItems, "Äquatorialguinea GQ " )AAdd( aItems, "Griechenland GR " )AAdd( aItems, "Grönland GRO " )AAdd( aItems, "Ungarn H " )AAdd( aItems, "Hongkong HK " )AAdd( aItems, "Kroatien HR " )AAdd( aItems, "Italien I " )AAdd( aItems, "Israel IL " )AAdd( aItems, "Kiribati KIR " )AAdd( aItems, "Kirgisistan KS " )AAdd( aItems, "Kuwait KWT " )AAdd( aItems, "Kasachstan KZ " )AAdd( aItems, "Luxemburg L " )AAdd( aItems, "Litauen LT " )AAdd( aItems, "Moldau MD " )AAdd( aItems, "Mexiko MEX " )AAdd( aItems, "Marshall-Inseln MH " )AAdd( aItems, "Mongolei MNG " )AAdd( aItems, "Nördliche Marianen MNP " )AAdd( aItems, "Mayotte MYT " )AAdd( aItems, "Norwegen N " )AAdd( aItems, "Niederlande NL " )AAdd( aItems, "Niederösterreich NÖ " )AAdd( aItems, "Oberösterreich OÖ " )AAdd( aItems, "Peru PE " )AAdd( aItems, "PuertoRico PRI " )AAdd( aItems, "Korea,Demokratische Volks P" )AAdd( aItems, "Palau PW " )AAdd( aItems, "Paraguay PY " )AAdd( aItems, "Zentralafrikanische Repub R" )AAdd( aItems, "Kongo RCB " )AAdd( aItems, "Reunion REU " )AAdd( aItems, "Haiti RH " )AAdd( aItems, "Mauretanien RIM " )AAdd( aItems, "Libanon RL " )AAdd( aItems, "Mali RMM " )AAdd( aItems, "Burundi RU " )AAdd( aItems, "Ruanda RWA " )AAdd( aItems, "Schweden S " )AAdd( aItems, "Saudi-Arabien SA " )AAdd( aItems, "Salzburg SBG " )AAdd( aItems, "Swasiland SD " )AAdd( aItems, "Singapur SGP " )AAdd( aItems, "Sankt Helena SHN " )AAdd( aItems, "Slowakei SK " )AAdd( aItems, "Salomonen SLB " )AAdd( aItems, "Slowenien SLO " )AAdd( aItems, "Suriname SME " )AAdd( aItems, "Senegal SN " )AAdd( aItems, "Somalia SP " )AAdd( aItems, "Saint Pierre und Miquelon S" )AAdd( aItems, "Steiermark STM " )AAdd( aItems, "Sao Tome und Principe STP " )AAdd( aItems, "Sowjetunion(historischbis S" )AAdd( aItems, "Sudan SUD " )AAdd( aItems, "Seychellen SY " )AAdd( aItems, "Syrien SYR " )AAdd( aItems, "Thailand T " )AAdd( aItems, "Turks-und Caicos-Inseln TCA" )AAdd( aItems, "Tschad TCH " )AAdd( aItems, "Togo TG " )AAdd( aItems, "Tirol TIR " )AAdd( aItems, "Tadschikistan TJ " )AAdd( aItems, "Tokelau-Inseln TKL " )AAdd( aItems, "Turkmenistan TM " )AAdd( aItems, "Tunesien TN " )AAdd( aItems, "Tonga TO " )AAdd( aItems, "Türkei TR " )AAdd( aItems, "Trinidad und Tobago TT " )AAdd( aItems, "Tuvalu TUV " )AAdd( aItems, "China,Republik(Taiwan) TWN " )AAdd( aItems, "Ukraine UA " )AAdd( aItems, "Vereinigte Arabische Emir U" )AAdd( aItems, "Vereinigte Staaten von Am U" )AAdd( aItems, "Usbekistan UZB " )AAdd( aItems, "Vatikanstadt V " )AAdd( aItems, "Vorarlberg VBG " )AAdd( aItems, "Britische Jungferninseln VG" )AAdd( aItems, "Amerikanische Jungfernins V" )AAdd( aItems, "Wien VIE " )AAdd( aItems, "Vietnam VN " )AAdd( aItems, "China(Volksrepublik) VRC " )AAdd( aItems, "Vanuatu VU " )AAdd( aItems, "Gambia WAG " )AAdd( aItems, "Nauru WAI " )AAdd( aItems, "Sierra Leone WAL " )AAdd( aItems, "Nigeria WAN " )AAdd( aItems, "Dominica WD " )AAdd( aItems, "Grenada WG " )AAdd( aItems, "Wake-Inseln WKI " )AAdd( aItems, "St.Lucia WL " )AAdd( aItems, "Wallis und Futuna WLF " )AAdd( aItems, "Samoa(West-) WS " )AAdd( aItems, "St.Vincent und die Grenad W" )AAdd( aItems, "Jemen Y " )AAdd( aItems, "Jugoslawien(SerbienundMon Y" )AAdd( aItems, "Jugoslawien(historischbis Y" )AAdd( aItems, "Venezuela YV " )AAdd( aItems, "Sambia Z " )AAdd( aItems, "Südafrika ZA " )AAdd( aItems, "Zaire ZRE " )AAdd( aItems, "Simbabwe ZW " )AAdd( aItems, "Staatenlos ZZX " )AAdd( aItems, "Ungeklärt ZZY " )AAdd( aItems, "Unbekannt ZZZ " )AAdd( aItems, " " ) SET _3DLOOK ON DEFINE DIALOg oDlg RESOURCE "TestCombo" REDEFINE COMBOBOX oCbx VAR cItem ITEMS aItems ; ID 110 OF oDlg ; ON CHANGE ( oSayItem:cTitle := oCbx:GetText() ) ; VALID ( MsgBeep(), .t. ) REDEFINE SAY oSayItem ID 120 OF oDlg ACTIVATE DIALOG oDlg CENTERED return nil
rc-file
Code: Select all | Expand
#include "..\include\WinApi.ch" LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US TESTCOMBO DIALOG DISCARDABLE 49, 30, 371, 190STYLE WS_POPUP|DS_MODALFRAME|WS_CAPTION|WS_SYSMENUCAPTION "Testing a ComboBox"BEGIN CONTROL "A ComboBox", -1, "Static", WS_GROUP, 10, 5, 43, 8 CONTROL "", 110, "ComboBox", WS_BORDER|CBS_DROPDOWN|CBS_SORT|WS_TABSTOP, 8, 16, 156, 144 CONTROL "&Selected Item:", -1, "Static", WS_GROUP, 192, 116, 48, 8 CONTROL "", 120, "Static", WS_GROUP, 192, 128, 70, 8 CONTROL "", -1, "Static", SS_ICON, 200, 144, 16, 16 CONTROL "&End", IDCANCEL, "Button", WS_TABSTOP, 264, 84, 33, 12ENDFIVEWIN ICON "..\\icons\\fivewin.ico"