Mail Archives: cygwin/1998/02/09/03:19:44
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".
- Raw text -