Author |
Topic: Error in manual (Read 1272 times) |
|
KenDown
Full Member
member is offline


Posts: 181
|
 |
Re: Error in manual
« Reply #8 on: Feb 10th, 2014, 9:47pm » |
|
Er - thanks, Simon. I wondered if there was some such call. The only trouble is that when I use it - copied and pasted from your post - I get the message "No such system call".
I'm using BB4W 5.95a, if that is relevant.
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: Error in manual
« Reply #9 on: Feb 10th, 2014, 9:59pm » |
|
on Feb 10th, 2014, 9:47pm, KenDown wrote:| I get the message "No such system call". |
|
Can I refer you to the BB4W Help documentation, specifically under 'Accessing the Windows API... Adding a menu bar', which you can also read online here:
http://www.bbcbasic.co.uk/bbcwin/manual/bbcwine.html#addingmenu
There you will see that the command you are looking for is:
Code: SYS "DrawMenuBar", @hwnd% Richard.
|
|
Logged
|
|
|
|
KenDown
Full Member
member is offline


Posts: 181
|
 |
Re: Error in manual
« Reply #10 on: Feb 10th, 2014, 10:01pm » |
|
Andy, thanks. You've given the correct version of the call SYS"DrawMenuBar" and now the menu items are greyed out. However your fancy procedure simply toggles the state and doesn't show what the state is.
The menu items are greyed out and unresponsive when I set the flag to 1 and are not greyed out and do respond when I set the flag to 0. That is as I stated originally and contrary to what the manual states.
You try it with the small program I posted above - though add the SYS"DrawMenuBar",@hwnd% to make the gray appear.
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: Error in manual
« Reply #11 on: Feb 10th, 2014, 10:11pm » |
|
on Feb 10th, 2014, 10:01pm, KenDown wrote:| Andy, thanks. You've given the correct version of the call SYS"DrawMenuBar" |
|
I'm confused. The only message I can see drawing attention to the correct API is the one I posted a few minutes ago.
Quote:| The menu items are greyed out and unresponsive when I set the flag to 1 and are not greyed out and do respond when I set the flag to 0. That is as I stated originally and contrary to what the manual states. |
|
Here is an exact quote from the BB4W manual: "the third parameter is 0 to enable the item and 1 to disable the item (and change it to grey to indicate that it is disabled)":
http://www.bbcbasic.co.uk/bbcwin/manual/bbcwine.html#enablemenuitem
How is that "contrary" to your own findings?
Richard.
|
| « Last Edit: Feb 10th, 2014, 10:32pm by admin » |
Logged
|
|
|
|
KenDown
Full Member
member is offline


Posts: 181
|
 |
Re: Error in manual
« Reply #12 on: Feb 11th, 2014, 04:53am » |
|
Grrrrr.
1. Someone called S. Bracken posted that the call was SYS"DrawMenu", and both you and Andy gave the correct version. I'm not blaming S. It's all too easy to make such a slip, particularly if you're working from memory.
2. You are absolutely right. The manual does state what I have found. I must be getting old, as I was sure that what I was doing was contrary to the manual - reread it multiple times to work out what I was doing wrong. Bah!
Apologies all round for raising a storm in a teacup (might as well, there's storms everywhere else this week). Possibly, if you felt like it, a reference to SYS"DrawMenuBar" might be useful on that page, as I don't recall ever coming across that call before.
|
|
Logged
|
|
|
|
sbracken
New Member
member is offline


Posts: 19
|
 |
Re: Error in manual
« Reply #13 on: Feb 11th, 2014, 3:44pm » |
|
Hi Ken,
Sorry about the mistake. Serves me right for not double checking my facts before posting! Hopefully I did not add too much to your confusion!
Simon
|
|
Logged
|
|
|
|
|