flat assembler
Message board for the users of flat assembler.
Index
> Windows > Some questions about resources |
Author |
|
IronFelix 29 Dec 2004, 06:34
I try to give you some answers:
1. Windows doesn't automatically create window, you should use CreateDialogParam (or other from this series) to create modeless dialog box or DialogBoxParam (or other) to create modal dialog box. 2. I didn't understand what you mean saying 'label'. If it is ID of the resource, it must be for resource to be compiled. If you doesn't know ID you may try to use such functions as FindResource, LockResource etc., but i am not sure it will helps you. If you say about it's handle you should use GetDlgItem function to get HWNDs of dialog child, or LoadIcon, LoadCursor, LoadImage, LoadBitmap, LoadMenu etc. for other resource types. 3. If i understood you right, you want to use some resources. All of them have ID. If you don't know it see 2. Best regards. |
|||
29 Dec 2004, 06:34 |
|
IronFelix 29 Dec 2004, 06:44
I forgot to tell you about EnumResourceLanguages, EnumResourceTypes, and EnumResourceNames functions. You can use then to enumerate all resources and try to get what you need.
Regards. |
|||
29 Dec 2004, 06:44 |
|
madmatt 29 Dec 2004, 10:25
Thanks IronFelix,
By the second quetion I mean something like this: Code: myresource: section '.rsrc' resource from 'res/noteit.res' data readable I am making a dialog in RadASM and was wondering how to Create the dialog without any label by the data? I found this code for my dialog, do you use the data in this text? Code: #define IDD_DLG1 1000 #define IDC_BTN1 1001 #define IDC_BTN1 1002 #define IDC_CBO1 1003 #define IDC_LST1 1004 #define IDC_STC1 1005 #define IDC_STC1 1006 #define IDC_BTN2 1007 IDD_DLG1 DIALOGEX 6,6,172,237 CAPTION "Screen Mode" FONT 8,"MS Sans Serif",0,0 STYLE 0x10CE0000 EXSTYLE 0x00000000 BEGIN CONTROL "Create Mode List",IDC_BTN1,"Button",0x50010000,4,3,78,20,0x00000000 CONTROL "Run Program",IDC_BTN1,"Button",0x50010000,88,3,80,20,0x00000000 CONTROL "",IDC_CBO1,"ComboBox",0x50010003,4,42,162,15,0x00000000 CONTROL "",IDC_LST1,"ListBox",0x50010141,4,72,162,135,0x00000200 CONTROL "DEVICES",IDC_STC1,"Static",0x50000000,4,33,30,8,0x00000000 CONTROL "SCREEN MODE LIST",IDC_STC1,"Static",0x50000000,4,60,72,8,0x00000000 CONTROL "CLOSE",IDC_BTN2,"Button",0x50010000,4,210,162,20,0x00000000 END |
|||
29 Dec 2004, 10:25 |
|
IronFelix 29 Dec 2004, 13:02
You are welcome, madmatt!
I also use RadASM and like it very much. To use dialog created by RadASM you should compile *.rc file produced by RadASM with a resource compiler (RC.EXE). You can find it in MASM or somewhere else. As a result you wiil get *.RES file containing compiled resource Then using 'section ...' FASM links it with your EXE or DLL. Then you code such thing: invoke CreateDialogParam,hInst,IDD_DLG1,0,DlgProc,0 mov [hwndDialog],eax where hwndDialog is initialized or uninitialized data: hwndDialog dd ? (or 0 for example) You can create *.rc files manually (i usually did it to link some bitmaps, icons etc.), but last version of RadASM can now correctly produce such files (not only dialogs). Regards. |
|||
29 Dec 2004, 13:02 |
|
madmatt 29 Dec 2004, 22:22
All Right, thanks, thats the info I needed. It's going to be easier than I thought!
|
|||
29 Dec 2004, 22:22 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.