delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/02/08/13:29:41

From: syring AT pollux DOT edv DOT agrar DOT tu-muenchen DOT de (Karl Martin Syring)
Subject: RE: Set/GetWindowLong doesn't seem work
8 Feb 1998 13:29:41 -0800 :
Message-ID: <01BD34D4.2785C070.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: "'Miron the Master'" <miron-the-master AT usa DOT net>,
GNU-Win32 Mailing list
<gnu-win32 AT cygnus DOT com>

This probably should read: 
SetWindowLong(hwnd, GWL_USERDATA, (LONG)hEdit);
GetWindowLong(hwnd, GWL_USERDATA);
Windows programming using the bare API really is challenging ;)

Regards
Karl   

 

-----Original Message-----
From:	Miron the Master [SMTP:miron-the-master AT usa DOT net]
Sent:	Sunday, February 08, 1998 12:22 PM
To:	GNU-Win32 Mailing list
Subject:	Set/GetWindowLong doesn't seem work

Hi,
I'm workin on a small text editor. I use edit class for editing text.
Here's what I do:

1. Create new window using SendMessage & WM_MDICREATE
2. In document callback proc in respond to WM_CREATE i create EDIT window
using
hEdit = CreateWindowEx(...);
and remember edit handle
SetWindowLong(hwnd, 0, (LONG)hEdit);
And when i use GetWindowLong(hwnd, 0) to get edit handle I don't get it.

hEdit - edit handle
hwnd - parameter passed to document window proc.

Look at the sample source...

Thanx for all help.


Daniel Mironowicz                 miron-the-master AT usa DOT net



 
-
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