Announcement

Collapse
No announcement yet.

Dialogs and Graphic Windows

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

  • Kevin Cramer
    replied
    I see that I had the handles reversed...now it works...

    Leave a comment:


  • Kevin Cramer
    replied
    Hi Bob,

    When I try this:


    DIALOG NEW PIXELS, 0, "Cramer Surveillance Inc", ,, 680, 400, _
    %DS_MODALFRAME OR %WS_CAPTION OR %WS_SYSMENU OR %WS_EX_WINDOWEDGE OR %DS_SYSMODAL, 0 TO hdlg
    DIALOG SET COLOR hDlg, -1, RGB(245,245,220)

    CONTROL ADD GRAPHIC, hDlg,hWin,"",10, 5, imWidth, imHeight
    GRAPHIC ATTACH hWin, hDlg, REDRAW


    Then do some pixel setting like this:

    FOR y = 1 TO imWidth
    FOR x = 1 TO imHeight
    rgbColor& = RGB(img2(y, imHeight+1-x).rgbtred,img2(y, imHeight+1-x).rgbtgreen,img2(y, imHeight+1-x).rgbtblue)
    'rgbColor& = RGB(img(y, x).rgbtred,img(y, x).rgbtgreen,img(y, x).rgbtblue)

    GRAPHIC SET PIXEL (y, x) , rgbColor&

    NEXT y
    NEXT x

    GRAPHIC REDRAW

    The graphic window is there where I want it, but is blank. It seems that the redraw does not happen...

    Leave a comment:


  • Kevin Cramer
    replied
    Perfect...thanks Bob.

    Leave a comment:


  • Bob Zale
    replied
    A Graphic Window is intended to be a "standalone" window. On a Dialog, just use a Graphic Control (CONTROL ADD GRAPHIC). They are functionally identical.

    Bob Zale
    PowerBASIC Inc.

    Leave a comment:


  • Kevin Cramer
    started a topic Dialogs and Graphic Windows

    Dialogs and Graphic Windows

    Is there anyway to put a graphic window onto a dialog? I have a need to show both an original video feed on a window with buttons and the associated callbacks, but also want to show the video with alterations on the same window separate from the source video. Right now I can do this with two separate windows, but this is very suboptimal.

    So the question is whether it is possible to get the capabilities of a graphic window (e.g. - trapping mouse events and coordinates and then drawing lines on the video) on a dialog. It does not seem that dialogs can contain graphic windows or vice versa.

    Any ideas?

    Muchos Gracias...

    Kevin
Working...
X