Recent

Author Topic: Access to Devicemode declaration in Lazarus/FPC ?  (Read 4875 times)

wchris

  • Newbie
  • Posts: 2
Access to Devicemode declaration in Lazarus/FPC ?
« on: February 14, 2010, 10:20:59 pm »
Hi,

i need TdeviceMode record declaration to get the list of available screen resolutions in windows with EnumDisplaySettings.

i found it in struct.inc

but when i compile, it does nothing because there is a conditional define inside that says {$ifdef read_interface}

if i declare {$define read_interface} it compiles but i get errors saying "identifier not found ULONG"

can someone help me out with this ? how do i get access to win32 api TdeviceMode declaration ?

thank you

PS: i'm creating pure windows applications and i don't care about portability. So don't bother about portability if you have a solution
« Last Edit: February 14, 2010, 10:24:39 pm by wchris »

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7625
Re: Access to Devicemode declaration in Lazarus/FPC ?
« Reply #1 on: February 14, 2010, 11:00:08 pm »
struct.inc (and FPC sources in general) are not supposed to be used directly.

Everything is available in precompiled form with normal releases.

In this case, struct.inc is part of unit windows. Do a "uses windows;" and the declaration will be available

wchris

  • Newbie
  • Posts: 2
Re: Access to Devicemode declaration in Lazarus/FPC ?
« Reply #2 on: February 14, 2010, 11:47:48 pm »
Thank you marcov  :D it works now.

for some reason i thought there was no windows unit in lazarus and LCLType, LCLProc instead.

and have access to the wiki was a almost impossible this weekend.
« Last Edit: February 14, 2010, 11:50:49 pm by wchris »