From: benny AT crocodial DOT de (Benjamin Riefenstahl) Subject: Re: Set/GetWindowLong doesn't seem work 9 Feb 1998 03:19:44 -0800 Message-ID: <34DEE107.ED703696.cygnus.gnu-win32@crocodial.de> References: <01bd3483$cd981c20$LocalHost AT ppp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: GNU-Win32 Mailing list Hi Daniel, Daniel Mironowicz wrote: > SetWindowLong(hwnd, 0, (LONG)hEdit); > And when i use GetWindowLong(hwnd, 0) to get edit handle I don't get it. I think you forgot to reserve the space for that data. In the initialization of the WNDCLASS struct for the DocWindow, do wnd.cbWndExtra = sizeof(LONG); Other things I notice: - You call GetWindowLong() on your MDI frame once, but you never set anything in that window. You should probably rename your variables to make sure you know which of your three HWNDs you are dealing with in each place. - You should memset() all structures to 0 before using them. It's a good habit to get into with structures, especially with those that you didn't define yourself. I got bitten by that one precisely with WNDCLASS. - In Win/32 you can call GetLastError() if *anything* fails. This gives you a hint most of the time (at least it does for me). so long, benny ====================================== Benjamin Riefenstahl (benny AT crocodial DOT de) Crocodial Communications EntwicklungsGmbH Ophagen 16a, D-20257 Hamburg, Germany - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".