Thread: Different approaches to making a Win32 wrapper

  1. #16
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    I think the WM_NCCREATE (non-client CREATE) comes in before the WM_CREATE, both have a CREATESTRUCT but for reasons I cannot entirely remember (but i'm sure involved avoiding horrible crashes) I check for either with a logical 'OR' to get the CREATESTRUCT etc.

    I think I was probably worried about ms changing things around in the future - I seem to remember reading in msdn somewhere or other that we should not rely on the order in which msgs came in as this would be bad programming technique! (yeh, I thought it was pretty funny too )

    But here's a question that's been on my mind for a while: so called 'race conditions' ie when you have a whole bunch of windows that are using the same StaticWndProc is there a possibility (particularly with multiple-threads) where a crash could occur due to the volume of processing that the one fn is having to deal with? Maybe that's a stupid question...but...?

  2. #17
    Registered User xds4lx's Avatar
    Join Date
    Nov 2001
    Posts
    630
    Hmm, I dont know about that but ill do something fun to find out hehe (Reminds me when I was learning about pthreads (yes i know this is a unix thing, but there is a great win32 port at: http://sources.redhat.com/pthreads-win32/ )) and wanted to see how many it would take to freeze windows if i remember it was about 400,000 on my old celeron 500.) I think ill just create an array of 1000 windows hmm and see what happens.
    Last edited by xds4lx; 02-27-2002 at 11:51 PM.
    "only two things are infinite, the universe and human stupidity, and im not sure about the former." - albert einstein

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. FILES in WinAPI
    By Garfield in forum Windows Programming
    Replies: 46
    Last Post: 10-02-2003, 06:51 PM
  2. confusion win32 -console app
    By GanglyLamb in forum C Programming
    Replies: 2
    Last Post: 06-11-2003, 10:12 AM
  3. Win32 Programming - Intructor or Book?
    By dark_fusion in forum Windows Programming
    Replies: 6
    Last Post: 02-05-2003, 07:59 PM
  4. Help with Direct X and Win32......:D
    By incognito in forum Windows Programming
    Replies: 1
    Last Post: 04-16-2002, 07:59 PM
  5. About Unix Programming - Making a career desision
    By null in forum C Programming
    Replies: 0
    Last Post: 10-14-2001, 07:37 AM