You're probably using the new headers.... is there a WindowNew.h in your
header directory? If so, the window format has changed...
<-- STANDARD DISCLAIMER -- You probably shouldn't be accessing the window
structure directly, as your app will most likely crash on future devices,
but if you really want to, at least be clean about it -->
SO...
Check the OS version in your app. If it's below 3, access this:
windowP->displayAddrV20
If you're on OS 3 or above, use this:
windowP->gDeviceP->baseAddr
Or something like that...
You may also want to pop up a dialog at app launch if the OS is greater
than 3.2 or so that says 'Never been tested on this system...may exhibit
wierd behavior and crash. Proceed at your own risk.'
Have fun,
Alan Pinstein
Synergy Solutions, Inc.
http://www.synsolutions.com
1-800-210-5293
>Hi, all!
>
>I'm new on this list. Maybe you can help me...
>
>I'm trying to access the "displayAddr" field of a WindowType inside a form,
>but every time I do it, CodeWarrior tells me "displayAddr" was not found in
>WindowType.
>
>Specifically, I have this code:
>
> frmP = FrmGetActiveForm();
> VoidPtr p2 = frmP->window.displayAddr;
>
>But every time I compile it, just at:
>
> VoidPtr p2 = frmP->window.displayAddr;
>
>the compiler tells me:
>
> Error: undefined identifier 'displayAddr'
>
>Does someone have an idea of what I'm doing wrong? (Of course, I've
>#included
>"window.h" on my project.)
>
>- Heriberto Delgado.