How to use PNG in ButtonBar from RC into EXE-Solved

How to use PNG in ButtonBar from RC into EXE-Solved

Postby richard-service » Fri Dec 14, 2018 4:17 pm

Hi Mr.RAO

I save PNG into RC and compile it to EXE
I open EXE use Pelles C and show PNG DATA type.
I found Buttonbar not display PNG

    // RESOURCE SCRIPT generated by "Pelles C for Windows, version 8.00".
    #include <windows.h>
    #include <commctrl.h>
    #include <richedit.h>

    #define ALPHABMP 10

    TB_TOP32x ALPHABMP "BmpIcon/Png/ButtonBar/GoFirstData32.png"
Code: Select all  Expand view  RUN

DEFINE BUTTON oDlgBtn[1]  OF ::oDlgBar                     ;
           RESOURCE "TB_TOP32x"                                 ;
           PROMPT  "首筆"                                      ;
           TOOLTIP "移動至第一筆記錄"                          ;
           MESSAGE "記錄指標到第一筆記錄"                      ;
           ACTION ( ::oBrw:Gotop()                            ,;
                      ::oBrw:Refresh()                          ,;
                      ::oBrw:SetFocus() )
 


Image
Last edited by richard-service on Sat Dec 15, 2018 5:58 pm, edited 1 time in total.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 804
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: How to use PNG in ButtonBar from RC into EXE

Postby mastintin » Sat Dec 15, 2018 10:17 am

????
I use only png files in my program and buttonbar show icons ok.

rc line for png is :

BANK 10 "bmp\\png\\bank.png"

Regards.
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: How to use PNG in ButtonBar from RC into EXE-Solved

Postby richard-service » Sat Dec 15, 2018 5:57 pm

Hi

I had used Set Resource to “xxx.DLL”
So I add PNG to xxx.DLL and working fine.
Very Strange. I add PNG to RC and compile to EXE not work.

Thank you so much.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 804
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: How to use PNG in ButtonBar from RC into EXE-Solved

Postby rhlawek » Mon Dec 17, 2018 6:20 pm

I define png files in a resource file this way:

// app_resources.rc

#include "Winver.h"

filter_16 RCDATA "/workspace/resources//filter_16.png"

Then just reference them as BITMAP in any control that uses robb.
User avatar
rhlawek
 
Posts: 194
Joined: Sun Jul 22, 2012 7:01 pm

Re: How to use PNG in ButtonBar from RC into EXE-Solved

Postby richard-service » Tue Dec 18, 2018 5:01 pm

rhlawek wrote:I define png files in a resource file this way:

// app_resources.rc

#include "Winver.h"

filter_16 RCDATA "/workspace/resources//filter_16.png"

Then just reference them as BITMAP in any control that uses robb.


Hi rhlawek,

Thanks for your idea.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 804
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 61 guests