flat assembler
Message board for the users of flat assembler.

Index > Windows > WINAMP GUI

Author
Thread Post new topic Reply to topic
Luka



Joined: 29 Mar 2009
Posts: 3
Luka 29 Mar 2009, 12:25
hi guys!
i am trying to create an mp3 player using fasm, any idea how i could create a gui interface as nullsoft has done for winamp.
Any tutorial about gui programming using fasm?
Post 29 Mar 2009, 12:25
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 29 Mar 2009, 12:37
Quote:
Any tutorial about gui programming using fasm?

GUI programming in FASM is basically same as GUI programming in C. So you can (have to, in fact) look for C GUI programming tutorials.
Post 29 Mar 2009, 12:37
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1905
DOS386 30 Mar 2009, 01:29
Luka wrote:
trying to create an mp3 player using fasm


Don't miss the free audio codecs Vorbis, FLAC and WAVPACK Smile
Post 30 Mar 2009, 01:29
View user's profile Send private message Reply with quote
ManOfSteel



Joined: 02 Feb 2005
Posts: 1154
ManOfSteel 30 Mar 2009, 08:33
I don't remember where I got this from.
It's a CD player and it's in MASM but it may still be useful.


Description:
Download
Filename: CDPlayer.zip
Filesize: 61.85 KB
Downloaded: 227 Time(s)

Post 30 Mar 2009, 08:33
View user's profile Send private message Reply with quote
frech



Joined: 10 Mar 2009
Posts: 31
frech 30 Mar 2009, 16:26
If you mean a skin, I think you should look at all the functions regarding the creation of regions with winapi. They use bmp, as far as I know (very little, at this moment, as they are not in one of my projects at the moment), with one colour set as transparent.
Post 30 Mar 2009, 16:26
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20632
Location: In your JS exploiting you and your system
revolution 30 Mar 2009, 16:44
Skinning a window is quite easy, and there is no need to try and understand winamp sources when there are a number of demos and tuts available on the web.
Post 30 Mar 2009, 16:44
View user's profile Send private message Visit poster's website Reply with quote
Luka



Joined: 29 Mar 2009
Posts: 3
Luka 12 Apr 2009, 09:41
Quote:

GUI programming in FASM is basically same as GUI programming in C. So you can (have to, in fact) look for C GUI programming tutorials.


u mean forgers-win32-tutorial.zip?
Post 12 Apr 2009, 09:41
View user's profile Send private message Reply with quote
pal



Joined: 26 Aug 2008
Posts: 227
pal 12 Apr 2009, 10:51
Look into GDI+.
Post 12 Apr 2009, 10:51
View user's profile Send private message Reply with quote
Luka



Joined: 29 Mar 2009
Posts: 3
Luka 12 Apr 2009, 13:51
ive found this site

http://msdn.microsoft.com/en-us/library/ms645434(VS.85).aspx
Post 12 Apr 2009, 13:51
View user's profile Send private message Reply with quote
KingDemon



Joined: 16 Oct 2006
Posts: 21
Location: Somewhere in Romania
KingDemon 13 Apr 2009, 08:47
Smile

Ok, here's my idea (ignoring the fact that you just found the CreateDialog function and seem pretty satisfied about it =)) ) :

* create a popup window (or dialog if you want) without any decorations
* create some bitmaps:
- one hotspot bitmap used to identify hot spots (clickable areas) inside your UI;
- one appearance bitmap containing default images for each area you defined in the hotspot bitmap plus the background of your skin (this would also be a hotspot with say clor #000000 in the hotspot bitmap - in case you want to make it draggable);
- add bitmaps for the following states of the clickable areas: focused (if you also use keyboard navigation), hovered, pressed, disabled etc.; these are the basic states of a button control, but you can add as many as you wish - you can also add multiple images for just one state to create an animated effect (e.g., when hovering the mouse, "fade to green" effect - which would be created by multiple bitmaps with different shades of green)
* implement mouse (and keyboard) actions - use the hotspot bitmap to hit-test for an area then perform an action based on the color in that area and the state of the mouse buttons / position of the mouse etc.

This way you could allow for easy editing of skins (no INI files, no configuration of any kind - just bitmaps). I would not use regions unless I were writing for win 95 Neutral !?
While I did say "bitmaps", I'd probably go with transparent PNGs loaded and drawn via GDI+ (there are GDI+ APIs you can use for this) and I'd use a per-pixel alpha-blended layered window.

If you don't understand anything I just said, start googling! Smile
Post 13 Apr 2009, 08:47
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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.