PC Review


Reply
Thread Tools Rate Thread

BeginPaint ,End Paint functions

 
 
=?Utf-8?B?U2Vsw6d1ayBZQVpBUg==?=
Guest
Posts: n/a
 
      17th Dec 2004
Hi Every Body,

i try to developin C# application in CASIO IT-500 device. TO make image
capture i need BeginPaint EndPaint functions. Anybody has idea how can we
user this functions.

thanks in advance.
 
Reply With Quote
 
 
 
 
Chris Tacke, eMVP
Guest
Posts: n/a
 
      17th Dec 2004
What would these functions do? Control (and some derivatives) support
overriding OnPaint, so at the top would likely be "begin" and the bottom
"end".

--
<ctacke/>
www.OpenNETCF.org
Your CF searches start and end here


"Selçuk YAZAR" <Selçuk (E-Mail Removed)> wrote in message
news45004DD-5861-4CDD-A0E4-(E-Mail Removed)...
> Hi Every Body,
>
> i try to developin C# application in CASIO IT-500 device. TO make image
> capture i need BeginPaint EndPaint functions. Anybody has idea how can we
> user this functions.
>
> thanks in advance.



 
Reply With Quote
 
=?Utf-8?B?U2Vsw6d1ayBZQVpBUg==?=
Guest
Posts: n/a
 
      17th Dec 2004

hi, i wantto use this functions capture pictures on device camera. now i'm
try to run Evc++ sample application, in the Camera.h

INT CAMSingleCapture( const TCHAR *, INT, INT); // Captures a single image

function is defined, and i try to use this function like this;

CAMSingleCapture(TEXT(\\My Documents\\Picture.jpg),CAM_JPEG,CAM_VGA);

but evc encountered error like below

error C2664: 'CAMSingleCapture' : cannot convert parameter 1 from 'char
[26]' to 'const unsigned short *'

why, why ????

thanks.









 
Reply With Quote
 
Chris Tacke, eMVP
Guest
Posts: n/a
 
      17th Dec 2004
Well you're missing quotes, that's a start....

--
<ctacke/>
www.OpenNETCF.org
Your CF searches start and end here


"Selçuk YAZAR" <(E-Mail Removed)> wrote in message
news:6AEE1E29-4266-4F2A-959F-(E-Mail Removed)...
>
> hi, i wantto use this functions capture pictures on device camera. now i'm
> try to run Evc++ sample application, in the Camera.h
>
> INT CAMSingleCapture( const TCHAR *, INT, INT); // Captures a single image
>
> function is defined, and i try to use this function like this;
>
> CAMSingleCapture(TEXT(\\My Documents\\Picture.jpg),CAM_JPEG,CAM_VGA);
>
> but evc encountered error like below
>
> error C2664: 'CAMSingleCapture' : cannot convert parameter 1 from 'char
> [26]' to 'const unsigned short *'
>
> why, why ????
>
> thanks.
>
>
>
>
>
>
>
>
>



 
Reply With Quote
 
=?Utf-8?B?U2Vsw6d1ayBZQVpBUg==?=
Guest
Posts: n/a
 
      20th Dec 2004
Hi ,
thank you for help, in weekend i try to implemet come c# code for beginpaint
functions.

public struct PAINTSTRUCT
{

public IntPtr hdc;
public int fErase;
public System.Drawing.Rectangle rcpaint;
public int fRestore;
public int fIncUpdate;
public Byte[] rgbReserved;
};

[DllImport("coredll", EntryPoint="BeginPaint", CharSet=CharSet.Unicode,
CallingConvention=CallingConvention.Winapi,SetLastError=false)]
public extern static IntPtr BeginPaint(IntPtr hwnd, ref PAINTSTRUCT pps);

[DllImport("coredll", EntryPoint="EndPaint", CharSet=CharSet.Unicode,
CallingConvention=CallingConvention.Winapi,SetLastError=false)]
public extern static IntPtr EndPaint(IntPtr hwnd, ref PAINTSTRUCT pps);

but when try this functions in form Paint evet it gives Not
supportedexception.

thanks in advance.
 
Reply With Quote
 
Guest
Posts: n/a
 
      20th Dec 2004
AZlright, now I see the function you were trying to call. I think at this
point it's better to ask what you're trying to achieve overall rather than
trying to debug your P/Invoke call. Exactly what behavior are you trying to
achieve? It may be possible without the call.

-Chris


"Selçuk YAZAR" <(E-Mail Removed)> wrote in message
news:4B372123-BE1E-41B8-ABAA-(E-Mail Removed)...
> Hi ,
> thank you for help, in weekend i try to implemet come c# code for
> beginpaint
> functions.
>
> public struct PAINTSTRUCT
> {
>
> public IntPtr hdc;
> public int fErase;
> public System.Drawing.Rectangle rcpaint;
> public int fRestore;
> public int fIncUpdate;
> public Byte[] rgbReserved;
> };
>
> [DllImport("coredll", EntryPoint="BeginPaint", CharSet=CharSet.Unicode,
> CallingConvention=CallingConvention.Winapi,SetLastError=false)]
> public extern static IntPtr BeginPaint(IntPtr hwnd, ref PAINTSTRUCT pps);
>
> [DllImport("coredll", EntryPoint="EndPaint", CharSet=CharSet.Unicode,
> CallingConvention=CallingConvention.Winapi,SetLastError=false)]
> public extern static IntPtr EndPaint(IntPtr hwnd, ref PAINTSTRUCT pps);
>
> but when try this functions in form Paint evet it gives Not
> supportedexception.
>
> thanks in advance.



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Paint problem-the draw function, draws ~1cm up and to the left of pencil nib(same prob with other functions) Jon Windows Vista General Discussion 0 13th Jan 2008 01:08 PM
Tux Paint, great little free paint program for kids Mudlark General Discussion 3 16th Apr 2007 12:27 AM
Can't close paint or open new paint =?Utf-8?B?RGFjZg==?= Windows XP Basics 0 12th Feb 2007 10:25 PM
Tux Paint - Open Source Children Paint Program CoMa Freeware 2 15th Mar 2005 03:12 PM
Microsoft Paint Wont Paint Colors =?Utf-8?B?cGFpbnRoZWxwcGxlYXNl?= Windows XP Help 2 13th Jul 2004 01:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:39 AM.