English
Forum

Error Create("BITMAP"?

 

Manfred
Barei
Hi,

I know not whether the one Error is and only me appears.
If I on the Mainwindow one Image as background lay go TabControlls not any more displayed, any others Controlls however go displayed, see code.

Please once testing.
CompileMarkSeparation
 $P+
SET("ERRORLEVEL",0)
DECLARE RICHEDIT1&,RICHEDIT2&
DECLARE STATICBITMAP1&,hbild&
DECLARE GRIDBOX1&
'----------Declarationen für Tabcontroll
DECLARE TabControl&,TabPage1&,TabPage2&,LastTab&
'-----------------------------------------------------------------
DEF GETSYSCOLOR(1) !"USER32","GetSysColor"
WINDOWSTYLE 538
WINDOWTITLE "Test"
WINDOW (%maxx/2 - 736/2),(%maxy/2 - 525/2) - 736,525
SET("TRUECOLOR",1)
DECLARE ENDE&
CLS GETSYSCOLOR(15)
USEFONT "MS Sans Serif",14,0,0,0,0
SETDIALOGFONT 1
'--hier ein eigenes Bild wählen---------------------------
STATICBITMAP1& = CREATE("HPIC",-1,"D:PROGRAMMEXPROFAN11EIGENE_PROGRAMMEKARTEIKARTENBMPKARTEN_TEXTUR.PNG")
'--so funktioniert es nicht mit dem TabControll
'hbild& = Create("BITMAP",%HWND,STATICBITMAP1&,0000,0000)
'--so funktioniert es mit dem TabControll--------------
DrawPic STATICBITMAP1&,0 ,0 ;0
'-----------TabControl--------------------------------------------
TabControl& = @CREATE("TABCTRL",%HWND,"Vorderseite",260,150,425,265)
TabPage1& = CONTROL("DIALOG","", $40081003,2,25,WIDTH(TabControl&)-10, HEIGHT(TabControl&)-30,TabControl&,0,%HINSTANCE)
SHOWWINDOW(TabPage1&,0)
@INSERTTAB(TabControl&,2,"Rückseite")
TabPage2& = CONTROL("DIALOG","", $40081003,2,25,WIDTH(TabControl&)-10, HEIGHT(TabControl&)-30,TabControl&,0,%HINSTANCE)
SHOWWINDOW(TabPage2&,0)
LastTab& = TabPage1&
RICHEDIT1& = CREATE("RICHEDIT",TabPage1&,"",2,0,425,-235)
RICHEDIT2& = CREATE("RICHEDIT",TabPage2&,"",2,0,425,-235)
SHOWWINDOW(LastTab&,1)
'-------------------------------------------
GRIDBOX1& = create("GridBox",%HWND,"lfd. Nr.;0;50;von;2;65;bis;2;65",3,032,145,175,280)
SETFOCUS(%HWND)
REPAINT 0
ENDE& = 0

WHILENOT ENDE&

    WAITINPUT

    If %KEY=2

        ENDE&= 1

    ElseIf @TABCHANGED(TabControl&)

        SHOWWINDOW(LastTab&,0)

        If GETACTIVETAB(TabControl&) = 0

            LastTab& = TabPage1&

        ElseIf GETACTIVETAB(TabControl&) = 1

            LastTab& = TabPage2&

        EndIf

        SHOWWINDOW(LastTab&,1)
        SETFOCUS(TabControl&)

    EndIf

EndWhile

DeleteObject STATICBITMAP
class=s4 href='./../../function-references/XProfan/end/'>end

Greeting from the Heath
Manfred
 
Zu wenig Wissen ist gefärlich, zu viel auch.(XProfan X4) | Win 10 Pro 64 | Win7 Ultimate 32/64 | AMD FX-8320, 16GB, GeForce GT 630 |
10/05/10  
 



with crashes the program same ex because in the code standing:
CompileMarkSeparation
STATICBITMAP1& = CREATE("HPIC",-1,"D:PROGRAMMEXPROFAN11EIGENE_PROGRAMMEKARTEIKARTENBMPKARTEN_TEXTUR.PNG")
>
but the File No is (geschweige of drive ^^) -

if I but:
CompileMarkSeparation
STATICBITMAP1& = CREATE("hNewPic",%maxx,%maxy,$FF7733)
>
write funktionierts wonderful and under Win7 have I here too no Anzeigeprobleme or. it'll everything correctly drawn.

(now against no XP to hand...)
 
10/06/10  
 




Thomas
Freier
You understand not. it would like gladly - Why too always- not : DrawPic STATICBITMAP1&,0 ,0 ;0
separate : hbild& = Create("BITMAP",%HWND,STATICBITMAP1&,0000,0000)

there's the tab-Control not any more in the Vordergrund in the Contrast to GridBOX well then would like Manfred know, Why the so is.
mandatory it well with DrawPic accept or the tab-Control on hbild& lay.
 
Gruß Thomas
Windows XP SP2, XProfan X2
10/06/10  
 




E.T.
there react some items right different:
one @CONTROL("DIALOG",... lying in background,
one @Create("Button,%HWnd,... lying in the Vordergrund

Quote: ...or the tab-Control on hbild& lay.

in the Help standing moreover:
"Hinweis; If Dialogelemente on this Bitmap lying should, so is with them nevertheless the lever the übergeordneten Dialoges/Fensers anzugeben and not the the Bitmap-Controls. so becomes gewährleistet, that the Buttons, etc. How dwelt react."

means should it Yes so made go, as Manfred in the Bsp. aufzeigt !

an unification the items in XProfan, so the then too any items in the Vordergrund lying, would I there for appropriate hold...
 
Grüße aus Sachsen... Mario
WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte...
10/06/10  
 



time with a Canvas [...]  probiert?
 
10/06/10  
 




Manfred
Barei
Hello iF,

if you you whom code accurate durchgelesen would have then would have You seen that I over the row with the STATICBITMAP1& a comment eingefügt have in the standing the man one own Image select should.

How Thomas correctly. recognized has need I it with Create("BITMAP" and not DrawPic because not so functions How I it need

iF, I have with the the Canvas not yet so integrally understood but I will be it so once try.

Fals yet someone another possibility having, i'm with almost everything all right, I must it only understand.

Greeting
Manfred
 
Zu wenig Wissen ist gefärlich, zu viel auch.(XProfan X4) | Win 10 Pro 64 | Win7 Ultimate 32/64 | AMD FX-8320, 16GB, GeForce GT 630 |
10/06/10  
 




if you you whom code accurate durchgelesen would have then would have You seen that I over the row with the STATICBITMAP1& a comment eingefügt have in the standing the man one own Image select should.


now biste unfair. I have whom code thoroughly very respected and _deshalb too recognized the in the Contrast to that code in the Phorum hPic instead of Bitmap apply becomes - So one "Bild" instead of one Control and You write supra indeed "ein Image as Hintergrund" and not one Bitmap-Static. my hNewPic-Info was still one hint How the example had plainer looks can.

"If I on the Mainwindow one Image as background lege" - standing in the Eingangsposting and this was for me too "schlüssig" because Bitmaps Yes apparently the TabControl no Repaint Send (I but not more than suspect).

thatswhy I had Thomas neither understood with "Du understand not. it would like gladly - Why too always- not : DrawPic", because the Eingangsposting weicht in code and text from the Bitmap-Posting there to that hPic-Posting ex.

But "wurscht" - we find already a code the fit.

What exactly want You letztendlich achieve? the the Wallpapers too simply _nachträglich changed go can? unless then would still the hPic-draw on hWnd optimal and one could too time Canvas on DLG try.

such one Canvas How from the canvas.inc hergebildet knows 2 "Modi". The first Modi means as much as "Subclasse me Control/ dialog XYZ and draw me hereon one hPic which one constantly too Change can How one wants simply by on-hPic-Zeichnen".

The second Modi ((if More as 1 Param indicated with create) created one Static in angegebener Size and places hereon one hPic which one constantly too Change can How one wants simply by on-hPic-draw.

so could one say Modi2 is like a Bitmap-Static with the Difference too as an afterthought simply hereon draw to without Flimmern etc., Modi1 draw hold on one beliebigen Control such hPic.

might one say canvas circa "hPic on Control paste without self circa Repaint concern To müssen".
 
10/07/10  
 




E.T.
Quote: "..."hPic on Control paste without self circa Repaint concern To müssen"

the must I well still too same (means if Time is...) time try....

but the any items in XProfan "vorn" or "hinten" lying (of Image seen), ought to still vereinheitlicht go (Ah, wish prompt...).
I had recent too astonishes geschaut, as my "änderbares Hintergrundbild" at produce and visible make one (@Control(...)-Statics simply not whom background wished...
 
Grüße aus Sachsen... Mario
WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte...
10/07/10  
 



one must hold not suppose that The Z-axis itself too in each drop optisch auswirkt - if one hintenliegendes Control draw and not on vordere Controls the Repaint anweist or Sektionen as "beschädigt" markiert then is naturally the hintenliegende Control optisch in front. ^^
 
10/07/10  
 




E.T.
means XProfan with 3D-goggles (at least at testing - Intepreter), so one sees, if supra in front and hinten left is ... Hihi
 
Grüße aus Sachsen... Mario
WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte...
10/07/10  
 



one can indeed a Button on ne Listbox lay and these ListBox on ne ChoiceBox and these ChoiceBox on one Static - Anzegefehler produzieren can Yes not the Topic his. ^^
 
10/07/10  
 




Manfred
Barei
Hello iF,

Entschuldige Please, I have me well wrong framed.
I need the image as statisches (not veränderliches) Control, so I not around the new draw concern must.

Greeting
 
Zu wenig Wissen ist gefärlich, zu viel auch.(XProfan X4) | Win 10 Pro 64 | Win7 Ultimate 32/64 | AMD FX-8320, 16GB, GeForce GT 630 |
10/07/10  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

8.542 Views

Untitledvor 0 min.
Rainer Hoefs07/02/15
Georg Teles05/15/14
H.Brill04/06/14
Axel Berse02/20/13

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie