Has the latest ooDialog release changed the Binary Menu Bar parameters? The code that you sent me last month (see below) does not work now. I checked oodMenu.cpp but the comments seem the same as last time I looked. Code (without comments) is below. The code barfs on creating the menubar:
D:\...>testresdialog init() result: 0 Creating menu bar 89 *-* menuBar = .BinaryMenuBar~new(self, IDR_PRODUCT_VIEW_MENU, self, , .true, .true) 8347 *-* self~initDialog 7443 *-* if self~startIt(icon, modeless) \= 0 58 *-* self~execute("SHOWTOP") 194 *-* dlg~activate -- Must be the last statement. 1 *-* call startProductView -- a routine in ProductView.rex Error 88 running D:\Development\oodUserGuide\From Mark\TestResDialog.rex line 89 : Invalid argument Error 88.916: Argument 2 must be one of a valid numeric or symbolic resource ID ; found "IDR_PRODUCT_VIEW_MENU" In unInit() of MenuBar class Btw, I did check the .h file and the .rc file, and I re-compiled the dll just to make sure I didn't have an old (bad) one. Many thanks, Oliver ---------------------------------------------- call startProductView -- a routine in ProductView.rex ::requires "ooDialog.cls" ::CLASS ProductView SUBCLASS ResDialog PUBLIC ::METHOD init forward class (super) continue say 'init() result:' result if \ self~createMenuBar then do self~initCode = 1 return end ::METHOD createMenuBar expose menuBar return .true ::METHOD activate UNGUARDED self~execute("SHOWTOP") return ::METHOD initDialog expose menuBar prodControls say "Creating menu bar" menuBar = .BinaryMenuBar~new(self, IDR_PRODUCT_VIEW_MENU, self, , .true, .true) ::METHOD updateProduct UNGUARDED say "update product menu" ::METHOD refreshData UNGUARDED say "refreshdata" ::METHOD print UNGUARDED say "ProductView-print-01" ::METHOD about UNGUARDED say "ProductView-about-01" dlg = .AboutDialog~new("ProductView.dll", IDD_PRODUCT_VIEW_ABOUT, , "ProductView.h") dlg~execute("SHOWTOP", IDI_DLG_DEFAULT) ::class 'AboutDialog' subclass ResDialog ::method initDialog expose font say 'in initDialog AboutDialog' module = .ResourceImage~new( "", self) id = self~constDir[IDB_OOREXX] -- Resource ID for the Bitmap resource. bitmap = module~getImage(id) stImage = self~newStatic(IDC_OOREXX_LOGO)~setImage(bitmap) -- Resource ID for the static containing the bitmap (Type = Bitmap, Real Size Control = True, Visibaile = True) font = self~createFontEx("Ariel", 12) --self~newStatic(IDC_STATIC)~setFont(font) -- This caused a hang!!! self~newStatic(IDC_ST_MORETEXT)~setFont(font) -- Following is testing a dbl-click: self~connectStaticNotify("IDC_OOREXX_LOGO", "DBLCLK", showMsgBox) ::method showMsgBox say "AboutDialog-showMsgBox." ans = MessageDialog("You double-clicked!") ::method leaving expose font self~deleteFont(font) ::ROUTINE StartProductView PUBLIC dlg = .ProductView~new("ProductView.dll", IDD_PRODUCT_VIEW, , "ProductView.h") dlg~activate -- Must be the last statement. ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ Oorexx-users mailing list Oorexx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-users