delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/02/09/18:42:27

From: syring AT pollux DOT edv DOT agrar DOT tu-muenchen DOT de (Karl Martin Syring)
Subject: RE: Set/GetWindowLong doesn't seem work
9 Feb 1998 18:42:27 -0800 :
Message-ID: <01BD3592.33BF8A10.cygnus.gnu-win32@syringpollux.edv.agrar.tu-muenchen.de>
Reply-To: "syring AT pollux DOT edv DOT agrar DOT tu-muenchen DOT de"
<syring AT pollux DOT edv DOT agrar DOT tu-muenchen DOT de>
Mime-Version: 1.0
To: GNU-Win32 Mailing list <gnu-win32 AT cygnus DOT com>

Benny,
cbWndExtra is declared as an int in the MS header, so there is no space to 
reserve. Usually it it used as a pointer to the window specific data 
structures.
A possible reason for Daniels problems may an error in the declaration of the 
WNDCLASS structure. Perhaps he should download the real thing from the MS SDK 
....

Regard
Karl

-----Original Message-----
From:	Benjamin Riefenstahl [SMTP:benny AT crocodial DOT de]
Sent:	Monday, February 09, 1998 11:57 AM
To:	GNU-Win32 Mailing list
Subject:	Re: Set/GetWindowLong doesn't seem work

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);

[]  <snip>

-
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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019