Thanks for that MSDN link ... good to know that.
Posts made by vertex
-
RE: WM_DESTROY, WM_CLOSE, ...
-
RE: WM_DESTROY, WM_CLOSE, ...
I figured it out ... finally. For everyone who needs to do the same thing, this little combo works:
ShowWindow(hWnd, SW_HIDE);
CloseWindow(hWnd);
DestroyWindow(hWnd);
To think that this took me about three days to figure out - I should be ashamed. ShowWindow actually works without animation, but it doesn't remove the window. CloseWindow removes the window from the taskbar without animation when the window is hidden. -
RE: WM_DESTROY, WM_CLOSE, ...
Doesn't stop the animation. It's really frustrating since windows get destroyed cleanly while the application is running, only when exiting and destroying all open windows they stay in the taskbar (I use the same destroy code in both cases). Maybe I'll put in a sleep() and a // FIXME and move on to more important things. sigh
-
RE: WM_DESTROY, WM_CLOSE, ...
Hmm - found that in old code of myself and in a lot of examples via google. The problem is that the windows are shown in the taskbar even after the app is no longer running. When I click the icon in the taskbar Windows somehow notices that they are no longer alive and removes them. I have no idea why, but I'll keep trying, got another idea.
-
WM_DESTROY, WM_CLOSE, ...
Hi!
I've got the following problem: my windows stay on the taskbar after my app exits; calling CloseWindow() before DestroyWindow() removes that problem, but then windows #&$!*§ animates the windows to the taskbar before closing them. Every single one of them - and since there's a chance that I have a lot of windows on screen that is so totally unacceptable.
So, after googling around and finding no helpful information whatsoever (why are there 3.2 quadrillion copies of the same tutorial on how to open a window when so many ides have a code snippet doing exactly that anyway?) I thought I'll ask here. I need information on why a window stays in the taskbar after calling DestroyWindow() from the thread that created the window or how to CloseWindow() a window without the animation. Thanks for any help.
-Mike
-
RE: Tablet pen pressure - how to?
@daniel c w said:
perhaps this might also help you:
http://msdn2.microsoft.com/en-us/library/ms645536.aspx
I'm currently handling input via SDL, afaik SDL does raw input anyway. I'll give it a couple hours to see if I can easily poll the pen pressure when I need it. If it doesn't work I'll screw the idea. All that hassle just for the odd chance that someone besides me has a tablet ... not worth it.
-
RE: Tablet pen pressure - how to?
Thanks!
Not tablet PC, Wacom tablets. Wintab is what I need, thanks, I hope I can link that with D; as far as I've seen with a quick newsgroup search there are some problems with the calling convention *sigh*. I wasn't aware that it's not possible with the Windows API - really, I just assumed that it's there - how hard can it be? It's just logical to expect some kind of struct MOUSEPOINTEREX or something.
-
Tablet pen pressure - how to?
I'm either too blind or too stupid to find something on that subject, but ... how do you get the pen pressure from a graphics tablet and find out if the user is drawing with the eraser ... in Windows? It would be nice if someone knew if that's possible with SDL, but ... any information would be nice. I don't know what to google for anymore, and searching MSDN is ... well ... not exactly helpful.
-
RE: Toilet Server
Funny that the last one isn't a server rack at all - it's an audio rack. and while writing this post I discovered the most bizarre WTF I ever had - with every keystroke except backspace the site jumps to the top or the bottom, alternating, that's really annoying, I tell you, I get epilepsy (sp?) and can't see what I've typed ... argh. Is that f'ed up javascript or Opera?
-
RE: You can't beat this kind of convenience
1. Boost productivity. The more clicking you do, the more time you waste. Save hige amounts of time with Ribbon Clicker.
Obviously you can't use spell checking with this. -
RE: Eject your hard disks.
My XP lets me eject one of my two hard drives. I guess it's most likely the motherboard reporting the drive as ejectable. This didn't happen with my old motherboard.
-
RE: Software awards
Sorry ... I just occasionally read the general discussion, so I wasn't aware it was posted already.
-
Software awards
For all of you who haven't seen this on digg: http://successfulsoftware.net/2007/08/16/the-software-awards-scam/
That's WTF indeed. -
RE: How many people here are programmers?
IT trainer, teaching windows, office, access, flash, php, c#, etc.
Programmer in my spare time.
-
RE: What's your biggest screw up?
I was writing plugins for an application and I once had to get a name from the app, like
char** name;
proxyObject->getName(name);
Unfortunately I didn't really grok the idea behind the call, so later in my code I did this:
delete name;
Needless to say, some weeks after my code was released to customers, reports about random crashes started coming in. The good thing about this is that my manager found a big screw-up he did himself, another big screw-up of another co-worker and my screw-up while tracking down this thing. So all in all it had a positive outcome.
-Mike -
RE: Phone Software WTF
Oh, yeah, I totally forgot the CD burning softwares that install their own crappy picture viewer and associate themselves with .wav and .aiff files. If you're composing music and generally working with a lot of audio (like me) that's a real PITA.
I generally hate every release of every CD burning software more and more (Alcohol is probably the only sane one). The options for copying or creating CDs are hidden somewhere in all those useless Media Center, Cover Designer and Audio Editor icons, the option to turn the wizards off is nowhere to be found, so that the only way to start the burning software is to manually browse the programs folder (at least that was the case when I tried to burn a CD on a friend's computer the last time). Pure featuritis.
Funny thing is that every power user/developer I know starts to use the same programs at one point: Winamp, VLC, an old copy of Nero, Real Alternative, Foxit Reader, etc.
-Mike -
Phone Software WTF
Hi!
This is a minor WTF, but something that is generally annoying:
I got this new cell phone from that well known northern-european manufacturer, installed the software on my computer and played around with transferring some jars onto it. There are some really nice apps out there! Anyway, today I got time to do some coding and tried to start my text editor, which is jEdit. But no jEdit for me this time, the phone's jar-file transfer software starts. WTF? Tried it again, same behaviour. Is the link broken? Nope, it's alright. Started explorer, went into the application folder, started the jar-file directly. Again: The phone software starts. Then I understood what had happened: The cell phone software installer registered all jar-files with that jar transfer software. Changed it back to the jre, and this time jEdit starts - finally.
The thing that bothers me is: Why does that installer do that without even asking if it should, making it virtually impossible to run any java apps when the phone software is installed? How should any non-tech person find a solution to this? And why do the developers think that loading a java app onto a cell phone is a more common task than running a java app on the computer directly?
And I also hate it when printer or camera software steals all jpgs without asking. Why? Why? I use XNView, it's a nice little program to cut and convert images for website use, but then I install a printer driver and suddenly all images open in a retarded application that lets me share them online, send them to a printing company and scan them in from a wodden table. Why? Why? Why?
Sorry for the rant, but it had to come out.
-Mike
-
RE: WOW! best java forum's WTF code sniplet ever!
The real WTF is this response from BlindSquirrel on the moonlander thread:
@BlindSqurirrel said:My tic tac toe code has all those variables as a joke. Over 3/4 of them are not used in my program. They were used in my old copy of the program when i used all fors and ifs, and no cases. I jsut copied them over with the other accidently.
That's ... just ... I'm speechless.
-mike -
RE: My WTF coding or not?
Thanks for the replies and the links!
I'll check that out as soon as I have recovered from the new year party ... :)
@GeneWitch: Could be a problem. Both threads work like this:bool running = true;
while (running)
{
// do stuff
}When shutting down, I set the running flags to false and wake the threads up, so that they can leave the while loop and wait() for them to exit. Maybe I should make a critical section for the member function that sets the running flag. I'll try that. Biggest problem of course is that I need to wait 4-5 days after a change to see if it has worked.
@iwpg: On my laptop I never got that problem. But then, I didn't start/stop the program as often as on my development machine. I'll give it a try and see if I can crash my laptop too.
-mike
-
My WTF coding or not?
Hi!
I'm looking for some advice, since I've run out of ideas.
Here's the problem: I'm working on a hobby project, which will eventually become an audio sequencer. The project was originally started in C++, using MinGW under Win2k, and after some time I ran into a little problem: Sometimes I got a BSOD at the exact same instant I closed my application: BAD_POOL_CALLER, 0x2c, BAD_POOL_REQUEST. This started to happen after I started working on the (then) OpenGL-UI which I had planned for this application.
Eventually I scrapped the program, this being one of the reasons, and after some time I converted some code to D and started again with some big changes in the concept. Ok, after I started working on the UI again (this time using SDL instead of OpenGL) the exact same bluescreens are back, occuring under exactly the same condition: at the exact same instant I press the ESC key to close the program. Now, there are sometimes days without BSOD and sometimes I get 2-3 BSOD a day. When working on other stuff or gaming or whatever I get NO bluescreens at all, the system is cleaned regularly and runs usually very smoothly without any problems, these bluescreens are the only ones I get.
Unfortunately I can't provide a test case, since I can't replicate this behavior in any way, so I'll give you a brief description of the system: my development machine is a Win2k machine, I am (currently) using SDL for audio output (until I get ASIO up and running, the old system used WDM, so it can't be an issue with SDL, I guess), and using SDL for drawing the UI. Audio calculation and GUI rendering are done in two threads, the audio rendering thread sleeps and wakes up when the audio callback is called from the driver (so the audio thread always can prepare audio data in advance), the GUI render thread runs in an endless loop and sleeps for a couple of microseconds, while keyboard and mouse input are handled in the main thread (which stays in the SDL main loop after initializing everything). All interfacing functions are secured in critical sections. When shutting down, the main thread waits for the other two threads to exit before calling the destructors. One thing to note is that D uses a garbage collector, which might possibly be a problem (although the guys in the D newsgroup don't think so and I got the same bluescreens in C++ - with manual memory management).
I hope someone can point out the problem - since if I can't solve this the whole thing is useless and I can scrap it again. I mean, who wants a program that randomly crashes the machine when it exits? Any help would be very appreciated.
Oh, and happy new year to all!
-mike (long-time TDWTF lurker)