Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
resources in compiled dialog executable (images and zip)
#1
2 questions:

1)
Is it possible with a dialog compiled to .exe to use the following:

Code:
Copy      Help
case WM_INITDIALOG
str s=
:10 c:\test.bmp

Then use something like this:
s.setwintext(id(3 hDlg))
ID 3 = rich editfield in QM dialog.

I have not much experience with resources other then addfile and putting images on buttons.
If this is not the correct method, is there another method in which I can inject images (png or jpg) into an exe and then use them within compiled .exe dialogs (without having to unpack the images).
(could you give example?)

2)
Almost same as question 1 but now with zip-files? Example:
Inject test.zip into an exe compile dialog then when user clicks a button within the running dialog, the test.zip is then unpacked.
(could you give example?)
#2
1.
To display a bmp/png/jpg/gif image in a static bitmap control, assign s to the dialog variable of the control before calling ShowDialog.

Or, if you need bitmap handle, use int hBitmap=LoadPictureFile(s). Later DeleteObject(hBitmap).

QM cannot display images in rich edit controls, or I don't know how.

2. Will need a temporary zip file.

str zipData.getfile(s); zipData.setfile(...
#3
Sorry, about question 1.
I got confused with a rich edit control. What I meant is the QM image scroll control:

Quote:3 QM_ImageScroll 0x54030000 0x4 13 10 192 98 ""

Is there a way to load an image which is in an .exe as an resource into the QM_ImageScroll?
I normally use the .setwintext method, which works.
But now I want to use it to load directly from an internal resource.
#4
str s=LoadPictureFile(":10 Q:\Test\image.png")
s.setwintext(id(3 hDlg))
#5
THANK YOU!!!


Forum Jump:


Users browsing this thread: 1 Guest(s)