1. How do I set bitmap from include file ... My code doesn't work !!

Hello,

selrog here,

following is the include file kal.e .

and my code in programme.

Can't seem to find bitmap kal[1}.

so code wrong !

Can someone modify ?

In anticipation ...

cheers selrog.

 
 
global sequence kal 
kal = 
{ 
  { 
    {0,0,0}, 
    {236,233,216} 
  }, 
  { 
    {0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 
    {0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 
    {0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 
    {0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 
    {0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 
    {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 
    {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 
    {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 
    {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 
    {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 
    {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 
    {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 
    {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 
    {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 
    {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 
    {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 
    {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 
    {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 
    {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 
    {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1} 
  } 
} 
 
setBitmap(button2,kal[1])--"c:\\Euphoria\\Im\\kal.bmp") 
new topic     » topic index » view message » categorize

2. Re: How do I set bitmap from include file ... My code doesn't work !!

In Euphoria, indexes start with 1, unlike some languages where indexes start with zero. So what would happen if you changed the 1's to 2, and the 0's to 1?

new topic     » goto parent     » topic index » view message » categorize

3. Re: How do I set bitmap from include file ... My code doesn't work !!

Hello Jerry,

Thanks for answering.

Tried your suggestion.

The same error.

Unable to open ..... DIB.

So the bitmap in kal.e annot be found or cannot be read????

Thanks anyway Jerry.

Cheers selrog

new topic     » goto parent     » topic index » view message » categorize

4. Re: How do I set bitmap from include file ... My code doesn't work !!

Selgor said...

So the bitmap in kal.e annot be found or cannot be read????

From your code snippet, kal[1] is ...

{  
    {0,0,0},  
    {236,233,216}  
}  

which is not a bitmap or the name of a bitmap. Why do you think it is one?

new topic     » goto parent     » topic index » view message » categorize

5. Re: How do I set bitmap from include file ... My code doesn't work !!

Hello Derek,

I found Bitmap Converter programme in the archive.

From the explanation this extract ....

"The bitmap converter is a very straightforward program. You open a bitmap file using the file menu. The bitmap will be displayed in the window so you can be sure you have opened the correct one. Then you save the bitmap as a Euphoria include file. That's all there is to it."

So I thought include file was the Bitmap.

So, I am up the proverbial creek.

And without a paddle . ??

Just trying to learn the bitmap techniques and the include file coding.

Any help would be appreciated.

In anticipation,

Cheers,

Selgor.

new topic     » goto parent     » topic index » view message » categorize

6. Re: How do I set bitmap from include file ... My code doesn't work !!

setBitmap(button2,kal[1])--"c:\\Euphoria\\Im\\kal.bmp")  

What happens when you give it a file name, with path if necessary?

setBitmap(button2,"kal.bmp"])--"c:\\Euphoria\\Im\\kal.bmp")  
new topic     » goto parent     » topic index » view message » categorize

7. Re: How do I set bitmap from include file ... My code doesn't work !!

Jerry_Story said...
setBitmap(button2,"kal.bmp"])--"c:\\Euphoria\\Im\\kal.bmp")  

Damn typo.

setBitmap(button2,"kal.bmp")--"c:\\Euphoria\\Im\\kal.bmp")  
new topic     » goto parent     » topic index » view message » categorize

8. Re: How do I set bitmap from include file ... My code doesn't work !!

Hello Jerry,

There is a DIB error .

And this is error message ....

C:\EUPHORIA\Win32LIB6006\Demo\w32msgs.e:112 in procedure fShowError()  
attempt to divide by 0  
    pParams = {85'U',110'n',97'a',98'b',108'l',101'e',32' ',116't',111'o', 
32' ',111'o',112'p',101'e',110'n',32' ',39''',39''',44',',32' ',105'i',110'n', 
32' ',82'R',101'e',97'a',100'd',68'D',73'I',66'B'} 
    pMode = 1 
    lErrCode = 0 
    lResponse = 2 
    lStyle = 51'3' 
    s = {85'U',110'n',97'a',98'b',108'l',101'e',32' ',116't',111'o',32' ', 
111'o',112'p',101'e',110'n',32' ',39''',39''',44',',32' ',105'i',110'n', 
32' ',82'R',101'e',97'a',100'd',68'D',73'I',66'B'} 
    lDispMsg = {85'U',110'n',97'a',98'b',108'l',101'e',32' ',116't',111'o', 
32' ',111'o',112'p',101'e',110'n',32' ',39''',39''',44',',32' ',105'i',110'n', 
32' ',82'R',101'e',97'a',100'd',68'D',73'I',66'B',10,10,80'P',114'r',101'e', 
115's',115's',10,32' ',32' ',91'[',32' ',89'Y',69'E',83'S',32' ',93']',32' ', 
32' ',116't',111'o',32' ',99'c',111'o',110'n',116't',105'i',110'n',117'u', 
101'e',44',',10,32' ',32' ',91'[',32' ',78'N',79'O',32' ',93']',32' ',116't', 
111'o',32' ',105'i',103'g',110'n',111'o',114'r',101'e',32' ',114'r',101'e', 
112'p',101'e',97'a',116't',115's',44',',32' ',111'o',114'r',10,32' ',32' ', 
91'[',32' ',67'C',97'a',110'n',99'c',101'e',108'l',32' ',93']',32' ',32' ', 
116't',111'o',32' ',113'q',117'u',105'i',116't',46'.',10,10,87'W',105'i', 
110'n',51'3',50'2',76'L',105'i',98'b',32' ',118'v',48'0',46'.',54'6',48'0', 
46'.',54'6',32' ',49'1',57'9',45'-',83'S',101'e',112'p',45'-',50'2',48'0', 
48'0',52'4'} 
    lTitle = {87'W',105'i',110'n',51'3',50'2',76'L',105'i',98'b',32' ',65'A', 
112'p',112'p',87'W',105'i',110'n',100'd',111'o',119'w',32' ',45'-',32' ', 
69'E',114'r',114'r',111'o',114'r',32' ',87'W',97'a',114'r',110'n',105'i', 
110'n',103'g'} 
................... etc for long time ????

Thanks for the help. Cheers.

Selrog

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu