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
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.
I am copying stuff from "quick answers" to here because it is no longer quick solution.
I am doing voluntarily and will comment / post in FRONT and if I get discussion going here I will delete "quick answers".
Last suggestion was to link to
Here is the SAME type of error - the library cannot be found.
I am deleting most of the post - it is no longer needed.
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.
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.
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
1. Being lazy I left the x86 links references in - it should not matter,
but I'll take them out.
2. Yes I got puzzled by instruction to "install a library " when in essence I was installing a
Linux package which contains the library and other stuff. I got better undertaking of thet
3. I have another app in works with no problem crosscompiling and actually running it on Raspberry.
3. No, I did not physically install the crosscomplier - just selected "cross compile" option in Eclipse.
I am not sure if my -l and -L options are syntactically correct - but it looks OK in output
I'll recheck that .
Many thanks for your help, appreciate that very much.
It definitely looks as a linker "suggestion " when "libbluetooth" is set as an option
When both ":" and ".a" are used linker does not complain.
/usr/bin/ld: cannot find -llibbluetooth
/usr/bin/ld: note to link with /usr/lib/x86_64-linux-gnu/libbluetooth.a use -l:libbluetooth.a or rename it to liblibbluetooth.a
collect2: error: ld returned 1 exit status
I have a richedit control as child control in my modeless dialog. I have populated editcontrol via streamin SF_TEXT with a program listing. I am looking to insert a bullet to specify a breakpoint.
After doing some research there were a number of articles about the richedit ole interface. With the bitmap being an ole client. I remember at one time getting this work (had different computer but still had windows 10)
regardless just looking back at those articles it seems the ole support would only work with RTF format text.
I am now thinking of going back to original API for bitmaps by that I mean BitBlt and or Strechbilt.
In my initdialog after creating the rich edit both object via new and creating a HWND via DDX_CONTROL I did a Clientrect on bot the modless dialog box and the richedit control it showed that right variable of the RECT structure for richedit window was 20 pixels less than the right viariable of the parent modeless dialog box. I think those 20 pixels would be enough for me to insert a bullet bmp
Yet when eyeballing the output, it seemed the text of the richedit was right up against the frame of the modeless dialog box
I think 20 pixels would be something I would notice
I'm not sure, but couldn't it be that the dialog's client rect is relative to the upper left of the window, while the child control's client rect is relative to the upper left of the dialog's client rect?
The difficult we do right away...
...the impossible takes slightly longer.
Not sure what you mean by window in dialog box same as CFRamewnd there is a frame that takes up space
The GetClientRect implies as in Client the white back ground portion
I mean if you were to Draw text the coordinates would be the white back ground right So if the richedit child control is +20 from the client area of dialog the text I’m writting to or streaming shouldn’t be right up against the frame right ?
I don't have MFC so I cannot test this control. However, it occurs to me that perhaps the RichEdit control reserves some edge space for its own purposes (possibly a scrollbar). Try calling GetWindowRect on the control and compare that with the dialog's client rect.
I just checked the difference between the Window and Client sizes of a simple Edit control. The width was 25 pixels different, and the height 4. So I guess what you are seeing is correct.
modified 18-Oct-21 11:30am.
Last Visit: 31-Dec-99 19:00 Last Update: 8-Feb-23 11:38