[gameprogrammer] Re: 3D Model Format
- From: Yasser Gonzalez Soto <yassergs@xxxxxxxxxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Sat, 06 Oct 2007 22:04:56 +0200
Sam Nova wrote:
You set the paper width and not the Pels width..
I just searched on Google for "Deplhi ChangeDisplaySettings" and found
this.
uses Windows;
function SetScreenResolution(Width, Height: integer): Longint;
var
DeviceMode: TDeviceMode;
begin
with DeviceMode do begin
dmSize := SizeOf(TDeviceMode);
dmPelsWidth := Width;
dmPelsHeight := Height;
dmFields := DM_PELSWIDTH or DM_PELSHEIGHT;
end;
Result := ChangeDisplaySettings(DeviceMode, CDS_UPDATEREGISTRY);
end;
I got NO clue about Delphi, so don't know if it works...
Oh, advise.. Write variable, function names and comments in English..
Good practice for yourself and makes it easier when you show code to
people.
Best,
Sam
-----Original Message-----
From: gameprogrammer-bounce@xxxxxxxxxxxxx
[mailto:gameprogrammer-bounce@xxxxxxxxxxxxx] On Behalf Of
Yasser Gonzalez Soto
Sent: Saturday, October 06, 2007 1:51 PM
To: gameprogrammer@xxxxxxxxxxxxx
Subject: [gameprogrammer] Re: 3D Model Format
check this delphi code:
//--------------------------------------------------------------
function Cambiazo(ancho,alto:integer):integer;
var
dm:TDeviceMode;
r:integer;
begin
dm.dmSize:=sizeof(TdeviceMode);
dm.dmPaperWidth:=ancho;
dm.dmPelsHeight:=alto;
dm.dmFields:=DM_PELSWIDTH or DM_PELSHEIGHT;
result:=ChangeDisplaySettings(dm,CDS_UPDATEREGISTRY);
end;
buttonClick(Sender:TObject);
begin
Cambiazo(800,600);
end;
-------------------------------------------//
doesn't make the resolution chage. Why. Help me anybody please
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
-----------------------------------------------------------------------------///
I do it like you have said but nothing happened. And is iqual to C++ code
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- References:
- [gameprogrammer] Re: 3D Model Format
- From: Sam Nova
Other related posts:
- » [gameprogrammer] 3D Model Format
- » [gameprogrammer] Re: 3D Model Format
- » [gameprogrammer] Re: 3D Model Format
- » [gameprogrammer] Re: 3D Model Format
- » [gameprogrammer] Re: 3D Model Format
- » [gameprogrammer] Re: 3D Model Format
- » [gameprogrammer] Re: 3D Model Format
- » [gameprogrammer] Re: 3D Model Format
- » [gameprogrammer] Re: 3D Model Format
- » [gameprogrammer] Re: 3D Model Format
- » [gameprogrammer] Re: 3D Model Format
- » [gameprogrammer] Re: 3D Model Format
- » [gameprogrammer] Re: 3D Model Format
You set the paper width and not the Pels width..
I just searched on Google for "Deplhi ChangeDisplaySettings" and found
this.
uses Windows;
function SetScreenResolution(Width, Height: integer): Longint;
var
DeviceMode: TDeviceMode;
begin
with DeviceMode do begin
dmSize := SizeOf(TDeviceMode);
dmPelsWidth := Width;
dmPelsHeight := Height;
dmFields := DM_PELSWIDTH or DM_PELSHEIGHT;
end;
Result := ChangeDisplaySettings(DeviceMode, CDS_UPDATEREGISTRY);
end;
I got NO clue about Delphi, so don't know if it works...
Oh, advise.. Write variable, function names and comments in English..
Good practice for yourself and makes it easier when you show code to
people.
Best,
Sam
-----Original Message-----From: gameprogrammer-bounce@xxxxxxxxxxxxx [mailto:gameprogrammer-bounce@xxxxxxxxxxxxx] On Behalf Of Yasser Gonzalez SotoSent: Saturday, October 06, 2007 1:51 PM To: gameprogrammer@xxxxxxxxxxxxx Subject: [gameprogrammer] Re: 3D Model Format check this delphi code: //-------------------------------------------------------------- function Cambiazo(ancho,alto:integer):integer; var dm:TDeviceMode; r:integer; begin dm.dmSize:=sizeof(TdeviceMode); dm.dmPaperWidth:=ancho; dm.dmPelsHeight:=alto; dm.dmFields:=DM_PELSWIDTH or DM_PELSHEIGHT; result:=ChangeDisplaySettings(dm,CDS_UPDATEREGISTRY); end; buttonClick(Sender:TObject); begin Cambiazo(800,600); end; -------------------------------------------// doesn't make the resolution chage. Why. Help me anybody please --------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html
-----------------------------------------------------------------------------///
- [gameprogrammer] Re: 3D Model Format
- From: Sam Nova