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
Page 1 of 1

PostPosted: Sat Mar 08, 2003 7:56 am
by Zumbi
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

PostPosted: Sun Mar 09, 2003 3:42 pm
by Zumbi
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

PostPosted: Mon Mar 10, 2003 10:50 am
by guy
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

PostPosted: Mon Mar 10, 2003 11:06 am
by guy
... 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

PostPosted: Mon Mar 10, 2003 2:39 pm
by Zumbi
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

PostPosted: Mon Mar 10, 2003 3:17 pm
by guy
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

PostPosted: Mon Mar 10, 2003 3:55 pm
by Zumbi
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

PostPosted: Tue Mar 11, 2003 8:20 am
by Zumbi
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

PostPosted: Tue Mar 11, 2003 9:46 am
by guy
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