Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > WNDCLASS: cbWndExtra

Reply
Thread Tools

WNDCLASS: cbWndExtra

 
 
Karel Bruneel
Guest
Posts: n/a
 
      08-30-2003
Hi,

Is this right?

1)if I register a WNDCLASS in witch set cbWndExtra to a value greater than
0, this means that every time I create a window of that class there will be
an extra amount of memory alocated.

2)I can put something into that extra memory.

If the two statements are correct:

How can I write and read from that extra memory.

Thank you
Karel Bruneel



 
Reply With Quote
 
 
 
 
Alf P. Steinbach
Guest
Posts: n/a
 
      08-30-2003
On Sat, 30 Aug 2003 19:36:19 GMT, "Karel Bruneel" <> wrote:

>Hi,
>
>Is this right?
>
>1)if I register a WNDCLASS in witch set cbWndExtra to a value greater than
>0, this means that every time I create a window of that class there will be
>an extra amount of memory alocated.


Not necessarily, but there's an extra amount of memory _available_ for
your use.



>2)I can put something into that extra memory.


Yes.

But since every Win32 window has room for a user-defined pointer you
generally don't need to specify more storage.

It's a relic from 16-bit Windows.


(Note that there are many other ways to associate data with a window,
including (1) SetProp/GetProp, (2) dynamically generated window proc
stub, and (3) static association table.)


>If the two statements are correct:
>
>How can I write and read from that extra memory.


GetWindowLong, SetWindowLong.

 
Reply With Quote
 
 
 
 
Alf P. Steinbach
Guest
Posts: n/a
 
      08-30-2003
On Sat, 30 Aug 2003 19:54:03 GMT, (Alf P. Steinbach) wrote:
>


I'm sorry, I didn't notice this was crossposted to [comp.lang.c++].

Karel: DON'T DO THAT.

Or else...

 
Reply With Quote
 
Karel Bruneel
Guest
Posts: n/a
 
      08-31-2003
I thank all of you.


"Karel Bruneel" <> schreef in bericht
news:T074b.9675$...
> Hi,
>
> Is this right?
>
> 1)if I register a WNDCLASS in witch set cbWndExtra to a value greater than
> 0, this means that every time I create a window of that class there will

be
> an extra amount of memory alocated.
>
> 2)I can put something into that extra memory.
>
> If the two statements are correct:
>
> How can I write and read from that extra memory.
>
> Thank you
> Karel Bruneel
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57