Encapsulation window creation

This is a discussion on Encapsulation window creation within the Windows Programming forums, part of the Platform Specific Boards category; Ive been trying to get this to work but cant. Im trying to make a class Window that encapsulates creating ...

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

    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
    Mox
    Mox is offline
    Registered User
    Join Date
    Aug 2001
    Posts
    41
    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

    Joren

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, 07: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, 10: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21