Page 2 of 3

Re: Simple Tutorial - 15 : More Organization

Posted: Mon Apr 17, 2017 4:00 pm
by franco
Anand, quick thought. My includes is empty.
my configuration says
inc=yes
head=native

my resources says
edit_new BITMAP edit_new.bmp
My_F1 BITMAP My_F1.bmp
my_f2 BITMAP my_f2.bmp
my_f3 BITMAP my_f3.bmp
my_f4 BITMAP my_f4.bmp
my_f5 BITMAP my_f5.bmp
my_f6 BITMAP my_f6.bmp
my_f7 BITMAP my_f7.bmp
my_f8 BITMAP my_f8.bmp
my_f9 BITMAP my_f9.bmp
my_f10 BITMAP my_f10.bmp
my_f11 BITMAP my_f11.bmp

does configuration need anything to do with resources

I tried the program you sent me with #include <hmg.ch> and put the above in the resources file.
I get error .....resource compiler can`t open bitmap file 'edit_new.bmp':-42 no such file or directory
it is in the the resources folder in the hmg3.2 folder

Franco

Re: Simple Tutorial - 15 : More Organization

Posted: Mon Apr 17, 2017 5:22 pm
by serge_girard
Franco, I think somewhere there is a file missing, check it all!

Serge

Re: Simple Tutorial - 15 : More Organization

Posted: Mon Apr 17, 2017 6:28 pm
by mol
Put all filenames and resources i n capital letters.
Maybe it will help

Re: Simple Tutorial - 15 : More Organization

Posted: Mon Apr 17, 2017 8:29 pm
by edk
franco wrote: Mon Apr 17, 2017 8:28 am Thanks Anand, I still can not get it to work for me.
I built my own f.bmp`s and put them in the hmg 3.2 resources folder. Then entered there names as you suggested in my resource area of my program. (...)
franco wrote: Mon Apr 17, 2017 4:00 pm my resources says I
edit_new BITMAP edit_new.bmp
My_F1 BITMAP My_F1.bmp
my_f2 BITMAP my_f2.bmp
my_f3 BITMAP my_f3.bmp
my_f4 BITMAP my_f4.bmp
my_f5 BITMAP my_f5.bmp
my_f6 BITMAP my_f6.bmp
my_f7 BITMAP my_f7.bmp
my_f8 BITMAP my_f8.bmp
my_f9 BITMAP my_f9.bmp
my_f10 BITMAP my_f10.bmp
my_f11 BITMAP my_f11.bmp
Try copy all .bmp files into your project folder, the same as .prg file (files), then compile.
Or copy into subfolder ex. "res" and edit resource file like this

Code: Select all

   
edit_new   BITMAP  res\edit_new.bmp
My_F1      BITMAP  res\My_F1.bmp
my_f2      BITMAP  res\my_f2.bmp
my_f3      BITMAP  res\my_f3.bmp
my_f4      BITMAP  res\my_f4.bmp
my_f5      BITMAP  res\my_f5.bmp
my_f6      BITMAP  res\my_f6.bmp
my_f7      BITMAP  res\my_f7.bmp
my_f8      BITMAP  res\my_f8.bmp
my_f9      BITMAP  res\my_f9.bmp
my_f10      BITMAP  res\my_f10.bmp
my_f11      BITMAP  res\my_f11.bmp
   
Also as PICTURE property you must use resource name, not file name, for example

Code: Select all

PICTURE "edit_new"
not

Code: Select all

PICTURE "edit_new.bmp"
Edward.

Re: Simple Tutorial - 15 : More Organization

Posted: Tue Apr 18, 2017 6:43 am
by franco
Thank You edk, I have it working as you suggested. I put any bitmaps in my program folder and set as you said Picture "edit_new".
This works, but it would be nice to use the hmg resources.
Here is the error I get if the bmp is not in my program folder. I do not know how to set the bmp path to hmg.3.2\resources
My program folder is c:\hmg3\grtest
hbmk2: Linking... grtest.exe
gcc.exe: error: C:/hmg3/grtest/_temp.o: No such file or directory
Thanks again to all ......................Franco

Re: Simple Tutorial - 15 : More Organization

Posted: Tue Apr 18, 2017 7:25 am
by edk
The path to bmp files you should set into grtest.rc file, ex:

Code: Select all

edit_new   BITMAP  c:\hmg.3.2\resources\edit_new.bmp
My_F1      BITMAP  c:\hmg.3.2\resources\My_F1.bmp
my_f2      BITMAP  c:\hmg.3.2\resources\my_f2.bmp
my_f3      BITMAP  c:\hmg.3.2\resources\my_f3.bmp
my_f4      BITMAP  c:\hmg.3.2\resources\my_f4.bmp
my_f5      BITMAP  c:\hmg.3.2\resources\my_f5.bmp
my_f6      BITMAP  c:\hmg.3.2\resources\my_f6.bmp
my_f7      BITMAP  c:\hmg.3.2\resources\my_f7.bmp
my_f8      BITMAP  c:\hmg.3.2\resources\my_f8.bmp
my_f9      BITMAP  c:\hmg.3.2\resources\my_f9.bmp
my_f10      BITMAP  c:\hmg.3.2\resources\my_f10.bmp
my_f11      BITMAP  c:\hmg.3.2\resources\my_f11.bmp
To check, is it bmp included into your grtest.exe, just extract your grtest.exe file (by 7-zip), and see folder: .rsrc\BITMAP, if doesn't exist edit_new.bmp file you do something wrong.
Bez tytułu.png
Bez tytułu.png (62.31 KiB) Viewed 3449 times
By the way, in my opinion, better use PNG instead of BMP files.
Then the grtest.rc file should look like this:

Code: Select all

edit_new   PNG  c:\hmg.3.2\resources\edit_new.png
My_F1      PNG  c:\hmg.3.2\resources\My_F1.png
my_f2      PNG  c:\hmg.3.2\resources\my_f2.png
my_f3      PNG  c:\hmg.3.2\resources\my_f3.png
my_f4      PNG  c:\hmg.3.2\resources\my_f4.png
my_f5      PNG  c:\hmg.3.2\resources\my_f5.png
my_f6      PNG  c:\hmg.3.2\resources\my_f6.png
my_f7      PNG  c:\hmg.3.2\resources\my_f7.png
my_f8      PNG  c:\hmg.3.2\resources\my_f8.png
my_f9      PNG  c:\hmg.3.2\resources\my_f9.png
my_f10      PNG  c:\hmg.3.2\resources\my_f10.png
my_f11      PNG  c:\hmg.3.2\resources\my_f11.png

Re: Simple Tutorial - 15 : More Organization

Posted: Tue Apr 18, 2017 11:00 am
by Anand
Hi Franco,

Hope your problem is solved from all the guidance you already got :D , the beauty of HMG.

Regards,

Anand

Re: Simple Tutorial - 15 : More Organization

Posted: Tue Apr 18, 2017 4:16 pm
by franco
I wish to thank all who participated in my problem. Most problems become very simple in the end.
In going through this I noticed there is a stable 3.3. The reason I used 3.2 is it showed stable in download folder.
The 3.3 looks like it has a lot more to it. Is it stable ? and do you think I should change to it. I do not want any problems for my business clients.
Thanks again ..................... Franco :D

Re: Simple Tutorial - 15 : More Organization

Posted: Wed Apr 19, 2017 8:01 am
by serge_girard
Franco,

See also this topic with Button.prg , thanks to Pablo :

http://hmgforum.com/viewtopic.php?f=14&t=5128

Serge

Re: Simple Tutorial - 15 : More Organization

Posted: Wed Apr 19, 2017 8:21 am
by franco
Thanks Serge,
This very interesting and could be useful in the future.
Franco