Thread: Encapsulation window creation

  1. #1
    Registered User xds4lx's Avatar
    Join Date
    Nov 2001

    Angry Encapsulation window creation

    Ive been trying to get this to work but cant. Im trying to make a class Window that encapsulates creating a window, sorta like MFC's CWindow, but i keep getting a problem about WndProc can someone please give me an example of this or point me to a tutorial. I have no problem coding Win32 in straight C but i want to use C++ classes.
    "only two things are infinite, the universe and human stupidity, and im not sure about the former." - albert einstein

  2. #2
    Registered User
    Join Date
    Aug 2001
    You probably have errors when setting the lpWndProc member of the WNDCLASS(EX) to a member of you class? If so, this is the same problem I had some time ago.

    This is because the member function also stores info about the current class in the addres (the Class *this pointer).
    There was someone who gave me a link to a site, I'll look it up...

    Found it: here

    If this is not your problem, explain it a little better


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Just starting Windows Programming, School me!
    By Shamino in forum Windows Programming
    Replies: 17
    Last Post: 02-22-2008, 08:14 AM
  2. WM_CAPTION causing CreateWindowEx() to fail.
    By Necrofear in forum Windows Programming
    Replies: 8
    Last Post: 04-06-2007, 08:23 AM
  3. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 11:06 AM
  4. Pong is completed!!!
    By Shamino in forum Game Programming
    Replies: 11
    Last Post: 05-26-2005, 10:50 AM
  5. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM