[futurebasic] Re: [FB] Need help using the toolbox call 'CGDisplayAvailableModes'

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 2007 : Group Archive : Group : All Groups

From: maxclass@...
Date: Sun, 25 Nov 2007 08:11:15 -0800
Bernie,

Thanks for the quick reply. I assume, not always a good thing, that  
it would be prudent to always get your display info in this manner.  
It should always return the correct information even if FB does not.

Max Taylor
The MaxClass Guy

=====

On Nov 25, 2007, at 3:39 AM, Bernie wrote:

> Max asked:
>
>> Q. How does one know which of the 36 modes on my monitor is the  
>> currently selected one?
>

I see the following FN sets up for the Current Mode.

Q. How about a second display, if attached?

> dict = fn CGDisplayCurrentMode( fn CGMainDisplayID() )
> long if ( dict )
>
> number = fn CFDictionaryGetValue( dict, fn CFSTR("Mode") )
> long if ( number )
> long if ( fn CFNumberGetValue( number, _kCFNumberLongType, @md ) )
> print "Current mode:";md
> end if
> end if
>
>> Q. Is the assembly code acting like glue in the two FN's where it  
>> is used?
>> Q. Can those two FN's be written without it so that FBtoC can  
>> Universalize it?
>
> Yes.

Look forward to seeing the non assembler versions.