flat assembler
Message board for the users of flat assembler.

Index > Windows > DialogBox from RES

Author
Thread Post new topic Reply to topic
jochenvnltn



Joined: 15 Jul 2011
Posts: 80
jochenvnltn
Hello everyone Wink

I have a PNG (dlgskin.png) that i converted into a *.RES file.
I would like to load the RES file to use as my main Dialog window.
I have found one example of loading a PNG into a Dialog (picture), but in this case i want to use the PNG as my dialog box and then draw the controls, buttons, edit etc on it. I don't know how to do this, and i was wondering if someone could give me an example on how to do this. It doesn't has to be from RES, if i could just use the PNG as my main window, that would be awesome also Smile


Description:
Filesize: 1.99 KB
Viewed: 488 Time(s)

dlgskin.png


Post 26 Oct 2019, 03:37
View user's profile Send private message MSN Messenger Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 335
Vortex
Hi jochenvnltn,

You can't use a PNG file as a dialog box. You need to create a dialog box with a resource editor.
Post 28 Oct 2019, 14:05
View user's profile Send private message Visit poster's website Reply with quote
jochenvnltn



Joined: 15 Jul 2011
Posts: 80
jochenvnltn
Vortex wrote:
Hi jochenvnltn,

You can't use a PNG file as a dialog box. You need to create a dialog box with a resource editor.



Its been done before Smile So i know you can do it !
Post 29 Oct 2019, 01:32
View user's profile Send private message MSN Messenger Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 16882
Location: In your JS exploiting you and your system
revolution
I think that a PNG would need to be converted to a bitmap. Then the standard dialog can show the bitmap which you can then overlay with the other controls.
Post 29 Oct 2019, 04:42
View user's profile Send private message Visit poster's website Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 1433
Furs
Or you can just paint it manually in WM_PAINT and decode it yourself (with a lib or system API).
Post 31 Oct 2019, 18:39
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.