Jump to content

  • Log In with Google      Sign In   
  • Create Account


tanzanite7

Member Since 20 Nov 2005
Offline Last Active Today, 02:55 PM

Posts I've Made

In Topic: how to get a display is configured to span/extended mode?

10 September 2014 - 03:45 PM

It is a bit too late to dig in my code and i do not actually know how/if it handles ~stretch modes - but it should (at least it is meant to). Have to check that tomorrow.

 

However, my code is intended to enumerate all displays and their actual modes (from EDID data: http://en.wikipedia.org/wiki/Extended_display_identification_data#EDID_1.3_data_format ) i use EDD_GET_DEVICE_INTERFACE_NAME for enumeration.

 

Interface names should be on a per monitor basis - ie. physical monitors instead of logical ones (i doubt the graphics card is faking a EDID response in hardware for stretch modes).

 

edit: My graphics card does not seem to use your terminology - so i am not sure what any of the stretch options you mentioned actually mean. I use two monitors as one desktop (both on same graphics device - so, stuff can overlap both monitors). No problems detecting the monitors and their desktop coordinates / etc / etc.

 

edit2: Ha, i thought i remembered a mode that stretched the windows task bar over both screens making windows think it is one monitor. And it seems stretch indeed refer to graphics card faking a single monitor. Google did spit out this in regards to stretch: "Most video cards only support span (aka. stretch) mode on Windows XP and earlier.". No wonder i do not see it mentioned anywhere - it is abandoned nowadays. If true then the only way to know the actual monitors is ask your graphics card in some vendor specific way.


In Topic: decltype(vector<Type>) doesn't compile

31 August 2014 - 08:22 AM

,>,>

Completely OT, but what does that emote mean? Never seen it before and it is rather difficult to Google for it x_x.
 

copy/pasting it is not so easy because my VS is in german

Yeah noticed. My grasp of German is still fairly good, besides - the gibberish part between the fairly standard text is where the problem is actually shown.

Btw, OT again, why do you use German for VS? English is not my native language either, but i still strongly prefer all my tools to be in English - easier to Google stuff etc (ie. the knowledge pool in English is a far greater benefit than the un-noteworthy benefit of having some tools in ones native language).

edit: Oh, yeah "template<typename Type> typename Test<Type>::NewType get(void) { ... }" - forgot the second "typename" there. Oh C++, you so silly.

In Topic: decltype(vector<Type>) doesn't compile

31 August 2014 - 07:21 AM

it appears though that using std::conditional in this case also doesn't work. There appears to be a general problem with using a "typedef" as part of an auto-specializer, or am I doing something wrong here?

template<typename Type>
auto get(void) -> decltype(typename std::conditional<true, Type, Type*>::type) { ...

"typename std::conditional<true, Type, Type*>::type" is already a type - what is "decltype" doing there? VS likes to crap its pants when "decltype" contains something outside of the limited set of things it finds edible.

I assume you tried without "decltype" and still got some kind of problems - would be worth copy-pasting here (NOT intellisense output - it is for fast overview, which while extremely useful normally, tends to hide some tiny details).

Also, use "typedef" for divide-and-conquer approach:
template<typename T> struct Test {
    typedef typename std::conditional<true, Type, Type*>::type NewType;
};

Test<something-in-particular>::NewType instantiationCheck;

template<typename Type> Test<Type>::NewType get(void) { ... }
... in case something in your actual templated function is at fault.

In Topic: decltype(vector<Type>) doesn't compile

31 August 2014 - 05:44 AM

decltype is very fragile with VS ... not that your problem has anything to do with it, just mentioning to be cautious in relying on it.

Anyway, what you seem to want is:
std::conditional<std::is_pod<SomeType>::value, SomeType, SomeType*>::type
also, might want to typedef it if it is needed often for readability:
typedef typename std::conditional<std::is_pod<SomeType>::value, SomeType, SomeType*>::type NewType;
edit: "typename" is of course not needed if SomeType is not template parameter - kind of wrote it on autopilot.

In Topic: How remove thin contour adjacent to area?

24 August 2014 - 01:17 AM

Sounds like a badly re-explained homework :/


PARTNERS