Hello,
I want to change the Background of the Main-Window
from Inside of a Child.
It checked different versions for background-setting.
It don't know, if it is possible.
Inside of the child for the dialog, there is no problem.
I want to make it possible, to do all settings with a preview.
I start a Dialog with folder as a MDI-Child, from a Office2007-Buttonbar.
Regards
Uwe[/img]
Possible to change Background of the Main-Wnd from Child ?
Possible to change Background of the Main-Wnd from Child ?
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Changing Background of Windows and Dialogs
Antonio
I changed this part with the option < as picture or tiled >,
because i think, it is better to show window-background and
dialog-background together.
Thank you
Regards
Uwe [/img][/code]
I changed this part with the option < as picture or tiled >,
because i think, it is better to show window-background and
dialog-background together.
Code: Select all
FUNCTION TILED_IMG(oBitmap,cBitmap)
LOCAL nRow := 0, nCol := 0, n
hDC := oBitmap:GETDC()
DEFINE BITMAP oImg1 FILENAME cBITMAP
nBmpWidth := oBmp:nWidth()
nBmpHeight := oBmp:nHeight()
// 200 and 280 = Resource-size
// ---------------------------------------
IF nBmpWidth > 0 .and. nBmpHeight > 0
DO WHILE nRow < 200
nCol = 0
DO WHILE nCol < 280
PalBmpDraw( hDC, nRow, nCol, oBmp:hBitmap )
nCol += nBmpWidth
ENDDO
nRow += nBmpHeight
ENDDO
ELSE
MsgAlert( "Not possible to use Picture " + CRLF + ;
cBitmap + CRLF + ;
"for TILED-selection !", "ATTENTION" )
ENDIF
RETURN( NIL )
// ------------------------
FUNCTION PICTURE_IMG(oBitmap,cBitmap)
DEFINE IMAGE oImg2 FILENAME cBitmap
PalBmpDraw( oBitmap:GETDC(), 0, 0, oImg2:hBitmap, , 280, 200 )
RETURN( NIL )
Regards
Uwe [/img][/code]
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Uwe,
Important: Everytime that you call to <oControl>:GETDC(), after that, you have to call <oControl>:ReleaseDC(), or you keep an unreleased hDC, thus consuming GDI resources.
I see from your code that you use a bitmap control on top of the window, to show a bitmap. You can directly use oWnd:GetDC() and paint on top of the window, so there is no need to use a @ ..., ... BITMAP there.
Important: Everytime that you call to <oControl>:GETDC(), after that, you have to call <oControl>:ReleaseDC(), or you keep an unreleased hDC, thus consuming GDI resources.
I see from your code that you use a bitmap control on top of the window, to show a bitmap. You can directly use oWnd:GetDC() and paint on top of the window, so there is no need to use a @ ..., ... BITMAP there.