Thread: HWND not working properly

  1. #1
    Call me AirBronto
    Join Date
    Sep 2004
    Location
    Indianapolis, Indiana
    Posts
    195

    HWND not working properly

    ok so i make my window and declare
    Code:
    HWND hwnd
    at the top

    so then i set a member variable to hwnd with
    Code:
    _pGameEngine->SetHandleToWindow(hwnd);
    this member name is m_hwnd

    so when i try to use m_hwnd, becouse my windows proc calls and functions inside my engine which handles the messages, nothing happens but when i just use hwnd it works, why cant i just set m_hwnd equal to hwnd and have it work?

  2. #2
    Call me AirBronto
    Join Date
    Sep 2004
    Location
    Indianapolis, Indiana
    Posts
    195
    ok i figured it out i was setting it equal before i put properties to it, sorry for being a retartd so remember kiddies set equal after something like this
    Code:
        if(!(hwnd = CreateWindowEx(
                  NULL,                                   //extended style
                  WINDOW_CLASS_NAME,                            //class
                  "Engine IKnow",                    //title
                  WS_OVERLAPPEDWINDOW | WS_VISIBLE,       
                  0, -30,                                    //initial x,y  (trick 0,-30)
                  2000,2000,                                //initial width, height  (trick 2000,2000)
                  NULL,                                   //handle to parent
                  NULL,                                   //handle to menu
                  hinstance,                              //instance of the application
                  NULL)))

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Parallel Port IO ops not working properly
    By microtechno in forum Linux Programming
    Replies: 16
    Last Post: 06-08-2009, 12:33 PM
  2. processing window messages w/out DispatchMessage ()
    By xixpsychoxix in forum Windows Programming
    Replies: 10
    Last Post: 01-18-2009, 10:07 PM
  3. My first "real" windows app
    By JoshR in forum Windows Programming
    Replies: 2
    Last Post: 07-28-2005, 07:40 AM
  4. drawing lines
    By makveli in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 11-11-2003, 03:22 AM
  5. Need some more assistance
    By Thantos in forum Windows Programming
    Replies: 6
    Last Post: 08-14-2003, 12:13 PM