|
ForNow wrote: I am not really sure what you mean by 'try to load the .exe as a resource' does the bitmap have to be linked into the .exe
Just open your VS, then Menu -> File -> Open -> find in the open file dialog (File Explorer) your .exe file -> open it!
Then you will see the tree with all the embedded resources. Just navigate to the Bitmap hive and ensure that the bitmap with your bitmap ID does exist!
|
|
|
|
|
Yes it see it there are the resource numbers of my bitmaps my questions is then the following
Quote: BREAKPOINT BITMAP "C:\\DriveRichEdit\\DriveRichEdit\\DriveRichEdit\\res\\bullet_red.bmp"
IDR_MAINFRAME BITMAP "res\\Toolbar.bmp"
IDB_BITMAP1 BITMAP "res\\bitmap1.bmp"
I have tried various strings 1) full path name of where the bitmap resides as indicated by my first entry 2) partial as indicated by my second entry "res\\Toolbar.bmp" would you know the correct entry
thanks
|
|
|
|
|
ForNow wrote: would you know the correct entry
According your OP it should be:
ForNow wrote: Here is My rc statement
IDB_BITMAP1 BITMAP "res\\bitmap1.bmp"
|
|
|
|
|
I re-checked the doc and it say I can put in the full path name of the bitmap going to do that I’ll also do a getlasterror if RC _!= 0
Thanks
|
|
|
|
|
You should not need to as the location is only required by the compiler when it builds the executable. Part of the build process is to embed all resources into the final executable. You can check it by getting hold of one of the many free resource editors available online.
|
|
|
|
|
so the bitmap is in the exe I google and see a product Resource tuner maybe i should try it see if it finds the bitap and maybe the problem is I didn't link it in right with the res file
thanks
|
|
|
|
|
I have never encountered a project where the resources did not get included correctly. In fact I just ran a quick test and it worked fine.
|
|
|
|
|
Did a Cimage load the HRESULT was 0 did CBitmap::Attach (there is not documentation on this) but return code was 1 when I looked at the n_hObject in VS debugger it had high order X'FF' the handle was FFFFFFFF88052070 never saw a resource handle with high order X'FF' ITS usually zeros
|
|
|
|
|
- "the HRESULT was 0" (S_OK) means the function completed successfully.
- "(there is not documentation on CBitmap::Attach)". However, there is a documentation on its base class method: CGdiObject Class | Microsoft Docs
|
|
|
|
|
I suspect that whatever results you got are not valid, since you need to pass a GDI object to the Attach call in the first place. So what were you trying to attach?
As I suggested earlier you definitely need to find out whether this image actually exists in your executable's resources, and if not, why not?
|
|
|
|
|
As I have mentioned previously I do not have MFC. But recreating what you are trying to do in pure Win32 (which is what MFC does under the covers) I have successfully loaded and displayed a bitmap resource.
|
|
|
|
|
thanks for your help I re-linked my app and after I did the attach the HANDLE had leading zeros and displayed I played around with BitBlt and StreachBlt
One problem the RED bullet is placed in the middle of a rectangle the color of the rectangle is black.
So my static control is gray. and there is a black squared with a red bullet.
Is there anyway to have the black "background color of the bitmap rectangle" be the the same as the background of the destination control
I have tried creating a brush with that control color selecting/selectobjct and CDC::Fillrect and FillSolidRect
Doesn't seem to have any effect
Thanks
|
|
|
|
|
Try to use icon (with transparent background) instead.
|
|
|
|
|
Quote: used TransparentBLT thank you all"
|
|
|
|
|
Message Closed
modified 15-May-23 19:07pm.
|
|
|
|
|
You appear to be trying to cross compile a project for a Raspberry Pi from a regular PC. The two CPUS do not share machine language, so you will need to install an arm version of libbluetooth to link against. There was another fellow that was trying to do this with the user name "Vaclav_", who's posts you should be able to search for. I don't know if he ever managed to get the cross comipilation working. In the short term, it might be more productive to develop on the RPI. If you have a RPI-4, then you've got a moderately powerful system. If you convert it to boot from USB using an SSD, it should be powerful and fast enough to get you started, while you research how to get an ARM-compatible libbluetooth installed.
Keep Calm and Carry On
|
|
|
|
|
Part 2:
You seem to be using Ubuntu, so you might be able to add packages via the multilib/foreign architecture options for apt. There's a discussion of it in the Debian Wiki here: Multiarch/HOWTO - Debian Wiki I haven't tried this, so can't say for certain it will work, but if it does, it will be much easier than having to cross compile the libraries yourself.
Keep Calm and Carry On
|
|
|
|
|
Message Closed
modified 15-May-23 19:07pm.
|
|
|
|
|
Firstly:
OLLECT_GCC_OPTIONS='-L/usr/lib/x86_64-linux-gnu'
That's a bit odd. If you are compiling for arm, you should not be including anything from the x86_64 lib tree.
Secondly you seem to be confusing the difference between a software package, and its contents. The package is libbluetooh-dev. It has headers, documentation and other files that are needed to compile a program that uses libbluetooth. The package libbluetooth3 contains the shared library: /usr/lib/arm-linux-gnueabihf/libbluetooth.so.3.xx.yy, so you should ask to link only with -lbluetooth
Thirdly: if you've installed the gcc cross-copmiler tools correctly, it should know how to find libm without any additional help from you. Consider the following very simple program
#include <stdio.h>
#include <math.h>
int main()
{
printf("%f\n", lgamma(2.0));
return 0;
} In order to compile it, we need to include libm. On my X86-64 computer I do
gcc example.c -o example -lm to create an x86-64 executable program. To create an ARM version I do
gcc-arm7 example.c -o example-arm -lm I now have 2 versions of the example program, one for X86-64 and one for ARM e.g.
k5054@loaclhost $ file example example-arm
example: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=c5d319f4b896ad825b708ff73a248ed23f64489f, for GNU/Linux 3.2.0, not stripped
example-arm: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, BuildID[sha1]=1bc8369c7de09a7510c93c0bcab5824c6342d688, for GNU/Linux 3.2.0, not stripped Are you sure you've installed the cross compiler correctly and can produce simple programs (like example.c above or a basic hello world) that can run on the RPI?
Keep Calm and Carry On
|
|
|
|
|
Message Closed
modified 15-May-23 19:07pm.
|
|
|
|
|
Message Closed
modified 15-May-23 19:07pm.
|
|
|
|
|
Member 14968771 wrote: Can anybody educate me about the ":" in -l:libbluetooth.a. I cannot find any reference to that option in Using the GNU Compiler Collection (GCC): Link Options[^], where the normal option would be -lbluetooth . I can only assume it is an add-on from somewhere that allows yo to specify the full library name.
|
|
|
|
|
My latest Visual Studio does not display the resources in the Resources tab or the classes in the Classes view.
It's version 16.11.5
I'm doing clean builds from new git clone (but it should not matter with MFC resources).
I've looked and tried to apply different fixes and workarounds (unload/reload projects, create dummy project ... ) and nothing really works.
Any ideas ?
CI/CD = Continuous Impediment/Continuous Despair
|
|
|
|
|
Hmm, works for me. I assume you've tried View->"Class View (Ctrl+Shift+C)" and View->"Other Windows"->"Resource View (Ctrl_Shift+E)"
Mircea
|
|
|
|
|
It works for me the same way as in 16.11.3. No differences, no problems.
|
|
|
|