Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - imgtrans function

imgtrans function

Discuss PocketC for CE (including Desktop Edition)

Postby Zumbi on Sat Mar 08, 2003 7:56 am

I have a problem with the above-mentioned function. It continues to eat ram when called. I wrote a code which loads several .jpg's with imgload when program starts. Then, on clicking a button, it draws those images with imgtrans. I noted that each time i click this button it takes more and more ram, though i dont load anymore images to memory. Is there any possibility to solve this problem?

--------------
Zumbi ?Ǭ? o senhor das guerras
Zumbi ?Ǭ? o senhor das demandas
Quando Zumbi chega
E Zumbi quem manda
--------------
Zumbi ½ o senhor das guerras
Zumbi ½ o senhor das demandas
Quando Zumbi chega
E Zumbi quem manda
Zumbi
 
Posts: 8
Joined: Tue Dec 03, 2002 9:23 am
Location: Russia

Postby Zumbi on Sun Mar 09, 2003 3:42 pm

A little addition:
Memory begins to shrink starting only by 20-25 time calling the function.

--------------
Zumbi ?Ǭ? o senhor das guerras
Zumbi ?Ǭ? o senhor das demandas
Quando Zumbi chega
E Zumbi quem manda
--------------
Zumbi ½ o senhor das guerras
Zumbi ½ o senhor das demandas
Quando Zumbi chega
E Zumbi quem manda
Zumbi
 
Posts: 8
Joined: Tue Dec 03, 2002 9:23 am
Location: Russia

Postby guy on Mon Mar 10, 2003 10:50 am

imgload() returns an HBITMAP (if you know the real Win32 API). You could try using the CE API interface for PocketC (link in sig below) and then use one of the standard win32 bit blit operations to write the bitmap to the screen (like the TransparentImage() function):

Code: Select all

#include "/pocketc/wingdi.h"

// ...

HBITMAP     hBitmap ;
HWND        hWndMainWindow ;
HDC         hDCMainWindow ;
COLORREF    lTransColour = RGB(155, 0, 0) ;

hWndMainWindow = gethwnd(1) ;

hBitmap = imgload("somefile.jpg", 100, 240, 240) ;


// ...

hDCMainWindow = GetDC(hWndMainWindow) ;

TransparentImage(hDCMainWindow, DstX, DstY, DstW, DstH, hBitmap, SrcX, SrcY, SrcW, SrcH, lTransColour) ;

// ...

ReleaseDC(hDCMainWindow) ;




Guy
[url]mailto:pcform@pcform.net[/url]
http://www.pcform.net
PocketC CE API interface: http://www.networkdynamics.net/PCForm.html#library
PCForm and CE API forum: http://www.networkdynamics.net/forum
Guy
[url]mailto:pcform@pcform.net[/url]
http://www.pcform.net
PocketC CE API interface: http://www.networkdynamics.net/PCForm.html#library
PCForm and CE API forum: http://www.networkdynamics.net/forum
guy
 
Posts: 879
Joined: Thu Dec 07, 2000 8:58 am
Location: United Kingdom

Postby guy on Mon Mar 10, 2003 11:06 am

... by using the direct Windows CE API call you should be bypassing anything in the PocketC runtime that eats memory.


Guy
[url]mailto:pcform@pcform.net[/url]
http://www.pcform.net
PocketC CE API interface: http://www.networkdynamics.net/PCForm.html#library
PCForm and CE API forum: http://www.networkdynamics.net/forum
Guy
[url]mailto:pcform@pcform.net[/url]
http://www.pcform.net
PocketC CE API interface: http://www.networkdynamics.net/PCForm.html#library
PCForm and CE API forum: http://www.networkdynamics.net/forum
guy
 
Posts: 879
Joined: Thu Dec 07, 2000 8:58 am
Location: United Kingdom

Postby Zumbi on Mon Mar 10, 2003 2:39 pm

I forgot to say that I use be-300, as I know that library doesnt support this divice.

--------------
Zumbi ?Ǭ? o senhor das guerras
Zumbi ?Ǭ? o senhor das demandas
Quando Zumbi chega
E Zumbi quem manda
--------------
Zumbi ½ o senhor das guerras
Zumbi ½ o senhor das demandas
Quando Zumbi chega
E Zumbi quem manda
Zumbi
 
Posts: 8
Joined: Tue Dec 03, 2002 9:23 am
Location: Russia

Postby guy on Mon Mar 10, 2003 3:17 pm

Download the kit builder distribution of CEAPI. That contains the BE300 DLL along with the DLLs for every other platform. The only reason that BE300 isn't supported fully is because I can't find out how to make a proper installation. The Casio installation builder and docs are not good.

Currently only the SmartPhone is not supported.


Guy
[url]mailto:pcform@pcform.net[/url]
http://www.pcform.net
PocketC CE API interface: http://www.networkdynamics.net/PCForm.html#library
PCForm and CE API forum: http://www.networkdynamics.net/forum
Guy
[url]mailto:pcform@pcform.net[/url]
http://www.pcform.net
PocketC CE API interface: http://www.networkdynamics.net/PCForm.html#library
PCForm and CE API forum: http://www.networkdynamics.net/forum
guy
 
Posts: 879
Joined: Thu Dec 07, 2000 8:58 am
Location: United Kingdom

Postby Zumbi on Mon Mar 10, 2003 3:55 pm

Ok, I've done it, but I still get an error:
Problem @ file pocketc/wingdi.h line 545
---------
keyword [struct] declare error, ex: struct Person { string name; int age ];

I tried to exclude this section from file, as many of exports (not all though), but finally it comes up with transparentimage () function, so it helps little.

Could you tell me what exactly I should do? I'm quiet new to pocketc. Maybe I must put the dlls somewhere else.

--------------
Zumbi ?Ǭ? o senhor das guerras
Zumbi ?Ǭ? o senhor das demandas
Quando Zumbi chega
E Zumbi quem manda
--------------
Zumbi ½ o senhor das guerras
Zumbi ½ o senhor das demandas
Quando Zumbi chega
E Zumbi quem manda
Zumbi
 
Posts: 8
Joined: Tue Dec 03, 2002 9:23 am
Location: Russia

Postby Zumbi on Tue Mar 11, 2003 8:20 am

I fanally realized how to make it work. I put dlls to the folder with all header files. But I must restart PocketC each time after comiling, or it will give the same error.

--------------
Zumbi ?Ǭ? o senhor das guerras
Zumbi ?Ǭ? o senhor das demandas
Quando Zumbi chega
E Zumbi quem manda
--------------
Zumbi ½ o senhor das guerras
Zumbi ½ o senhor das demandas
Quando Zumbi chega
E Zumbi quem manda
Zumbi
 
Posts: 8
Joined: Tue Dec 03, 2002 9:23 am
Location: Russia

Postby guy on Tue Mar 11, 2003 9:46 am

PocketC often fails to reinitialise after a compilation.


Guy
[url]mailto:pcform@pcform.net[/url]
http://www.pcform.net
PocketC CE API interface: http://www.networkdynamics.net/PCForm.html#library
PCForm and CE API forum: http://www.networkdynamics.net/forum
Guy
[url]mailto:pcform@pcform.net[/url]
http://www.pcform.net
PocketC CE API interface: http://www.networkdynamics.net/PCForm.html#library
PCForm and CE API forum: http://www.networkdynamics.net/forum
guy
 
Posts: 879
Joined: Thu Dec 07, 2000 8:58 am
Location: United Kingdom


Return to PocketC for CE

Who is online

Users browsing this forum: No registered users and 3 guests

cron