Announcement

Collapse
No announcement yet.

Modal blues?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Guest's Avatar
    Guest replied
    Thank you Lance - that does it.

    After you make the resolution change:
    Code:
      LOCAL i AS LONG
      i = BroadcastSystemMessage(%NULL, %NULL, %WM_SETTINGCHANGE, %NULL, %NULL)
      DIALOG END ghDlg, 0
    resets the desktop so there is no oversized Taskbar anymore.
    Great!

    [This message has been edited by William Fletcher (edited April 25, 2000).]

    Leave a comment:


  • Lance Edmonds
    replied
    It may also be worthwhile to try broadcasting a
    %WM_SETTINGCHANGE message.

    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Semen Matusovski
    replied
    William --
    I think that anyway you need to change work area also (I mean SystemParametersInfo %SPI_SETWORKAREA ...).

    I decided to search MSDN (perhaps, I will solve one my problem with console windows)

    WINSHELLAPI UINT APIENTRY SHAppBarMessage(
    DWORD dwMessage, PAPPBARDATA pData);

    Sends an appbar message to the system.

    ABM_SETPOS Sets the size and screen position of an appbar.
    ABM_WINDOWPOSCHANGED Notifies the system when an appbar's position

    Just now I have following sample. Perhaps, today evening I will continue and will solve a question with Abm_SetPos.

    Code:
       #Compile Exe
       #Register None
       #Dim All
       #Include "Win32Api.Inc"
    
       Function PbMain
          Dim ABD As APPBARDATA
          Dim rc As RECT
          Dim ABD_State As Long
          Dim position As Integer
          Dim hWndAppBar As Long
          Dim Msg As String
    
          ABD.cbSize = Len(ABD)
    
          ABD_State = SHAppBarMessage(%ABM_GETSTATE, ABD)
    
          Msg = "ABM_GETSTATE returned " + Str$(ABD_State) + $CRLf
          Select Case ABD_State
             Case %False
                msg = msg + "  - Auto Hide= False, Always on Top = False." + $CRLf
                msg = msg + "  - User allows apps cover the taskbar." + $CrLf
                msg = msg + "  - The taskbar must be manually invoked with maximized apps."
             Case %ABS_ALWAYSONTOP
                msg = msg + "  - Always on Top = True." + $CrLf
                msg = msg + "  - User wants the taskbar on-screen at all times." + $CrLf
                msg = msg + "  - The available screen is reduced by the taskbar size."
             Case Else
                msg = msg & "  - Auto Hide = True." + $CrLf
                msg = msg & "  - The taskbar appears on a mousemove." + $CrLf
                msg = msg & "  - There are taskbar(s) positioned on the "
    
               'see which edge has a taskbar
                For position = %ABE_LEFT To %ABE_BOTTOM
                   ABD.uEdge = position
                   hWndAppBar = SHAppBarMessage(%ABM_GETAUTOHIDEBAR, ABD)
                   If hWndAppBar > 0 Then
                     Select Case position
                        Case %ABE_LEFT:   msg = msg + "LEFT "
                        Case %ABE_TOP:    msg = msg + "TOP "
                        Case %ABE_RIGHT:  msg = msg + "RIGHT "
                        Case %ABE_BOTTOM: msg = msg + "BOTTOM "
                     End Select
    
                   End If
    
                Next
    
          End Select
          MsgBox msg$
    
       End Function


    [This message has been edited by Semen Matusovski (edited April 25, 2000).]

    Leave a comment:


  • Guest's Avatar
    Guest started a topic Modal blues?

    Modal blues?

    I am changing screen resolutions using:
    Code:
      GLOBAL ScreenMode as DEVMODE
      ... set mode; set flags; etc. ...
      i = ChangeDisplaySettings(ScreenMode, %CDS_UPDATEREGISTRY)
    inside of a MODAL dialog. When I change resolution from low (say 640x480) to high (1280x1024) all is well. When I then close the dialog (DIALOG END) - the Taskbar climbs halfway up the screen! It is resized easily by the user, but...

    Does anyone know of a reason *why* this might be occurring? and how to prevent it?

    TIA
Working...
X