Post

 Resources 

Console


Enumertion Steve Gillham (1 reply, 0 views) (2000-Jul-1)
-
i am using this code to enumerate display modes for my program: Dim DX As New DirectX7 Private Sub Form_Load() Me.Show GetDisplayCards End Sub Sub GetDisplayModes(sGuid As String) Dim DisplayModesEnum As DirectDrawEnumModes Dim ddsd2 As DDSURFACEDESC2 Dim dd As DirectDraw7 Set dd = DX.DirectDrawCreate(sGuid) dd.SetCooperativeLevel Me.hWnd, DDSCL_NORMAL Set DisplayModesEnum = dd.GetDisplayModesEnum(0, ddsd2) Dim OutPut As String For i = 1 To DisplayModesEnum.GetCount() DisplayModesEnum.GetItem i, ddsd2 OutPut = Trim(Str(ddsd2.lWidth) & " x" & Str(ddsd2.lHeight)) '& Str(ddsd2.ddpfPixelFormat.lRGBBitCount)) cboResolution.AddItem OutPut, 0 Next For i = 1 To DisplayModesEnum.GetCount() DisplayModesEnum.GetItem i, ddsd2 OutPut = Trim(Str(ddsd2.ddpfPixelFormat.lRGBBitCount)) cboDepth.AddItem OutPut, 0 Next Set dd = Nothing End Sub Sub GetDisplayCards() Dim ddEnum As DirectDrawEnum Dim strGuid As String Set ddEnum = DX.GetDDEnum() For i = 1 To ddEnum.GetCount() strGuid = ddEnum.GetGuid(i) GetDisplayModes strGuid Next End Sub but wht I want to do is only copy the resolution into a combo box once as i want the bitdepth to be split into another combobox so I do not want the resolution and bitdepth values to be repeated the same number of times as the amount of bitdepths. Thanks in advance Steve 8-(


-
Back to Forum

RE: Enumertion Jack Hoxley (0 replies) (2000-Jul-1)

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.
There have been 95 visitors within the last 20 minutes
RSS News Feed