CreateMenu doesn't work
Archives Forums/BlitzPlus Bug Reports/CreateMenu doesn't work
| ||
I am trying to create a calculator program and I wanted to create some menus to set the different calculating modes, but when I test the code they just don't appear: The whole thing just generates a standard window that closes when you click the <X> button with nothing in it. Here's the code (problem code is indented): The Include things are supposed to load the other mathematic functions used ther, other than the ones I can simply write in the code without using functions. They won't work for now because I haven't yet written those other functions. The If thing is just supposed to close the program when I'm testing it and works perfectly well. I'm running Windows XP Home Edition release 2002 SP3 and the latest version of blitz+. |
| ||
add this:UpdateWindowMenu mainwin and it should work ;-) by the way: avoid Goto. |
| ||
thx for the advice but why not goto? works fine |
| ||
and sometimes my loops (such as while...wen or repeat...forever/until) produce an error message when i get too much content into the loop so because i don't want to usee functions i use goto and it works really fine |
| ||
Goto has the bad quality to produce spaghetti-code... I know what I'm talking about, I also used Goto for a long time, but it really makes the code ugly and illegible. I had to throw away a ~40 kB Code because of that... There are alternatives, such as functions. |