English
Bugs and vermeintliche

Startpaint DC&

 

Uwe
''Pascal''
Niemeier
I bins again

be this trouble punched:
If I with StartPaint  the lever one DeviceContext angebe, the keinem Dialogelement zugeordnet is, I get with employment the most Gafikbefehle The Message this commands setting one Window advance.
The suitable API-Gegenstücke can against it free from problems use.
The same Message Gibts indeed, if one into SpeicherBitmap draw wants and no laid out has ; sits there somewhere ne suitable Sicherheitsüberprüfung in the lane?
because if I first one Control need, power the employment the DCs still really none sense, because I then same the control-lever bring into action can.
CompileMarkSeparation
window 10,10-500,500
 $H Windows.ph
------------------Geht
var dlg&=create(dialog,%hwnd,Test,100,100,300,300)
var DC1&=~GetDC(dlg&)
startpaint DC1&
textcolor 1,255
drawtext 40,0,Hallo
endpaint
------------------Geht nicht
var DC2&=~CreateCompatibleDC(%hdc)
startpaint DC2&
textcolor 1,255
drawtext 40,0,Hallo
endpaint
02/14/09  
 




Matthias
Arlt
Hello Pascal,

comic, by me functions really both not so right zufriedenstellend. I use therefore subesquent, yet always reliable Workarround. and use whom DC thereby really only for Repaint...
CompileMarkSeparation
hdc&=~GetDC(dlg&)
hdc2&=~CreateCompatibleDC(hdc&)
b&=~CreateCompatibleBitmap(hdc&,width(dlg&),height(dlg&))
~SelectObject(hdc2&,b&)
startpaint dlg&
...
endpaint
~BitBlt(hdc2&,0,0,width(dlg&),height(dlg&),hdc&,0,0,$CC0020)
~DeleteObject(b&)
setautopaint 1
while...

if %wmPaint

    setautopaint 2	ansonsten permanentes neuzeichnen...
    ~BitBlt(hdc&,0,0,width(1&),height(1&),hdc2&,0,0,$CC0020)
    ~RedrawWindow(dlg&,0,0,$400+$1+$80+$100+$2)
    setautopaint 1

endif

wend

~DeleteDC(hdc2&)
~DeleteDC(hd
n class=s2>)
 
WinXP SP2, Win7 - XProfan 10/11/FreeProfan32 - Xpia
02/14/09  
 




RGH
Uwe Pascal Niemeier
I bins again
The same Message Gibts indeed, if one into SpeicherBitmap draw wants and no laid out has ; sits there somewhere ne suitable Sicherheitsüberprüfung in the lane?


Yes, The Error Message diving always then on, if the DC, on the what drawn go should, the value 0 has. in this special Dall sleep STARTPAINT well fehl. (too to STARTPAINT has The Systemvariable %HDC whom values the current DC. In this case is it objectively 0.) The reason is well, that STARTPAINT whom Parameter from I do not erkennbaren Found not as a DC recognize, separate for a Fensterhandle holds.

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
02/14/09  
 




Uwe
''Pascal''
Niemeier
Hi Roland!

I hope still, that You the with opportunity änderst?
As I said, otherwise would The Possibility whom DC vorzugeben Yes none sense make. Handles as Parameter gabs already long.

SeeYou
Pascal
 
02/15/09  
 



tommorrow! If the whole something so To do, that The hPicss not really grosse Ausmasse having can?
 
02/15/09  
 




RGH
Uwe Pascal Niemeier
Hi Roland!

I hope still, that You the with opportunity änderst?
As I said, otherwise would The Possibility whom DC vorzugeben Yes none sense make. Handles as Parameter gabs already long.

SeeYou
Pascal


Tja, if I know I there Change can. into most Make functions it Yes and a Devicekontext becomes as such recognized (that is: The API GetObjType() recognize on OBJ_DC).
i'll me the but once more look at and bad, what GetObjType() in this special drop reports ...
background: there StartPaint indeed Fensterhandles, Bitmaps, etc. transfer go can, must I Yes first once detect, what there transfer watts. For this use I GetObjType().

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
02/15/09  
 




RGH
... and already what found:

there's too whom type OBJ_MEMDC and the becomes here created. whom I had well at Aufbohren of STARTPAINT not Fokus (probably the API-Documentation not far enough down gescrollt). it'll in the next Version nachgerüstet!

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
02/15/09  
 




Jörg
Sellmeyer
by me functions not!
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
11/04/11  
 




RGH
what functions with you not?
by me comes The of Pascal angemeckerte Error Message not any more!

Greeting
Roland
 
XProfan X2
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
11/08/11  
 




Jörg
Sellmeyer
Sorry - I know it too none More
now funktioniert's. Perhaps I had only whom code wrong understood
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
11/09/11  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

11.987 Views

Untitledvor 0 min.
RudiB.05/16/21
Jörg Sellmeyer06/01/18
H.Brill09/23/17
Wilfried05/22/16
More...

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