Results 1 to 2 of 2

Thread: create_new_window question

  1. #1

    Default create_new_window question

    I bind a exists wnd to clanlib, but the default message process function stumped me.

    in win32_window.cpp func create_new_window
    why not remove these code

    old_wndproc = (WNDPROC) GetWindowLongPtr(hwnd, GWLP_WNDPROC);
    SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR) Win32Window::static_window_proc);

    void Win32Window::create_new_window(const DisplayWindowDescription &desc)
    allow_screensaver = desc.get_allow_screensaver();

    if (desc.get_handle())
    hwnd = desc.get_handle();
    destroy_hwnd = false;
    // old_wndproc = (WNDPROC) GetWindowLongPtr(hwnd, GWLP_WNDPROC);
    // SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR) OpenGLWindowProvider_WGL::message_handler);

  2. #2
    ClanLib Developer
    Join Date
    May 2007


    Usually when you provide an existing hwnd to the DisplayWindow is because a different API to ClanLib is being used, that has its own message loop.

    In your message you say "why not remove these code". This code is not there? Maybe it was on an old version of ClanLib.

    I haven't used ClanLib with an existing hwnd for a long time. (I used to use a MFC based window)



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts