Yes very true. FreeBasic has no problems with the issue. I compared the code, that was suggested to me up front, with with that FreeBasic code, as I said then, and corrected the flawed Cboard code. I was asked to explain the expression "not working". The discussion got no further than that, and finally the inability to come up with an answer to my posted query sadly turned into being called an a-hole.
That's because FreeBasic's OR operator is bitwise, not logical like you're attempting to use in your flawed C code. You were given the answer many posts ago and for some bizarre reason refuse to fix your code. Fix the data types that you got wrong, fix the use of the incorrect operators and everything will probably work. Turn on your compiler warnings.
Edit: Based on your attitude I'm not sure I should be giving you more information but toggling the least significant bit, which is what you're doing, toggles the window to be modal/non-modal. So it appears that if your code is working (in C) it's only because modal dialogs don't have minimize/maximize buttons. But you don't want a modal dialog, you want a normal window without the minimize/maximize buttons. So, if it's working, it's only because it appears to be working; i.e. an accident and it does something very different you what you wanted to do. Why can't you fix your code to use bitwise operators as required (and fix the LONG_PTR mistake)?
Edit 2: It seems that you might not even know what bits are and how to manipulate them
Last edited by Hodor; 12-17-2019 at 02:20 AM.
[QUOTE=Hodor;1292142]That's because FreeBasic's OR operator is bitwise, not logical like you're attempting to use in your flawed C code. <snipped>/QUOTE]
There might be shortcomings in the code I posted else I would have had no cause to post a query. Of course I lack knowledge, as you rightly say, therefore I turn to a forum for help. A lot of suggestions have been made. There was no suggestion that actually worked. I tried them all!! If the freeBasic code is flawed, why then does it work perfectly well (I have already, on request, defined the term "doesn't work"). Given the fact that no suggestion worked, why has this discussion turned into an argumentative, mud throwing exercise like being called an arshole? Given the multitude of suggestions that have been made, just for once post code that you say is flawless and I shall be very happy to try it and we can end this fruitless tail-biting.
Last edited by Ivory348; 12-17-2019 at 03:52 AM.
Basically, you want a working solution handed to you on a silver platter. When you did not get that, you tried fixing the tentative solution that you did get by comparing with working code from another programming language but failed, but instead of working with other community members to arrive at a working solution, you refused to give detailed feedback and try a discovery process but rather just kept waiting for the working solution to be handed to you on a silver platter.Originally Posted by Ivory348
The fact is that sometimes you will indeed get a fellow community member who posts a code snippet that works for you from the outset. More often, you won't. You might get code that is close but isn't quite what you want, or fails to compile because of some typo, or fails to work because of some secondary oversight, or that is a contrived example that you must retrofit for your actual code, or you might only get suggestions on how to arrive at a solution with no or minimal code shown to you. Whichever it is, programmers will make use of what they get to come up with a working solution, or if they cannot do that, they will provide as much detail in their feedback as possible so that someone else -- who might not necessarily be the person that initially replied -- might be able to help them come closer to a working solution.
Unfortunately, when newbies persistently fail to do this and do things like present themselves as entitled to a solution on a silver platter, sometimes we do get experienced programmers who then insult and belittle them. I can't say I approve of the bad behaviour, but I can also understand why such programmers can get all cranky and dismissive.
What I can say in closing is this: if you want to get the most out of online communities for programmers, read Eric Raymond's classic article on How To Ask Questions The Smart Way
Beyond this, this thread is obviously a dead end that can only lead to unproductive arguments, so I shall close it.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)