OK... why in s4t4n's name must it be that friggen case sensitive? Excuse my swearing but that had to get out... My eys hurt, my hands shake and I was close on getting delivered into a psychatrie... I have rarely problems with the case but I just scanned my code about 687.000 times until I discovered that I wrote hWnd instead of hwnd once... argh... Anyone got some tranquilizers ? =) Would masm be angry at me if I just replace every 'hwnd' in his include files with a 'hWnd' ? Calm down Jimmy.. it's all good... relax... get a smoke... chill...
Posted on 2000-11-24 15:43:00 by JimmyClif
Posted on 2000-11-24 17:45:00 by Test Department
Jimmy, Maybe that cup of coffee and another cigarette is what you needed followed by a good night's sleep. We have all done this one at some stage and then looked for it for a long time to find where the error occurred. My own preference is to use hWnd as the handle for the main window of the application and also make it GLOBAL so it can be used from anywhere in the app. I do the same with the instance handle as it is needed in many different places. The other trick is to build the app often so you limit where an error of this type can occur, write a proc or part of it and build it to see if it works. If you have any typos, you will find them fast this way. Regards, hutch@pbq.com.au
Posted on 2000-11-24 20:28:00 by hutch--
Jimmy... welcome to the big leagues. Now if this is the biggest debugging problem you ever face, well, then you chanced your profession to basket weaving or something else non technical. You made a point I make constantly, that YOU, the programmer, are the weak link in any programmer. Not that you personally are a bad programmer, or dumb, inattentave,but that you are human with a hunman mind, and humans make this and similar mistakes. Actually, I *like* compile errors like this, as they halp me find bugs before I even run my program. I bet you also had a compile error. When I get one klike this, I do a SEARCH for the offending varaible. Usually, I find a single reference at the non-compiling line, so I know I mis-spelt it. I actually think case sensativity is a good thing, even though it lets you *think* hwnd and hWnd are the same thing (which would probably have disasteropus results if you had that bug in your code), but that's my thinking and coding convention (I'd hate to have MyVariable and MYVARIABLE be equivalent). If you don't agree, you can change how MASM compiles to do away with case sensativity. That is it's default anyway. Just remove the "option casemap:none" line and it reverts to blissful ignorance about case.
Posted on 2000-11-25 02:03:00 by TTom
Dear repliers, Here is a well slept out JimmyClif aka JimmyClif the Hun ;) jk The hWnd and hwnd problem I got angry at was because the Win32.hlp refernece told me to make a hWnd at that place. I have hWnd as standart in all my coding but here at that special place it need an hwnd... which is kinda unusual.. Another reason why I got mad at is that sometimes when I can't find the error I just delete that buggy part of the code and write it anew (that's much quicker usually) here also I rewrote that part but put the same 'error' in it again... Anyway I've calmed down, from now on I'll know of one more thing to check, maybe I just copy the includes needed into a external .inc used by my file only... Would be good to have an eye on that to... :) It's all good, sun is out there...
Posted on 2000-11-25 08:31:00 by JimmyClif
Use a true Assembler. Much better than coffee. betov.
Posted on 2000-11-25 14:40:00 by Betov