As a FAsm user I'm subject to solving problems never solved with FAsm before. The author of FAsm has provide a macro to cover dialog items in the reasource, but there are no examples on how to add the strings to a COMBOBOX or LISTBOX.
FAsm creates the rsrc section byte for byte from what the user specifiec. What I need to know is how a reasource for COMBOBOX and LISTBOX dialogs is created at the byte.
If someone could provide this info or an assembled dialog box with a COMBOBOX I would be much appriciative.
Thanks,
Mike
FAsm creates the rsrc section byte for byte from what the user specifiec. What I need to know is how a reasource for COMBOBOX and LISTBOX dialogs is created at the byte.
If someone could provide this info or an assembled dialog box with a COMBOBOX I would be much appriciative.
Thanks,
Mike
It's the same as MASM dude. Show me MASM source and I will show you how to do it in FASM :)
I'm not familliar with combo boxs and stuff...
I'm not familliar with combo boxs and stuff...
Here is the RC file that would be abused by MASM:
The Hex DWords are the 3 strings:
Verison
Prepaid
Sprint PCS
//
// Symantec ResourceStudio generated header file
//
// This file is intended for use with Windows 95
//
#define APSTUDIO_READONLY_SYMBOLS
#include <afxres.h>
#include <ver.h>
#undef APSTUDIO_READONLY_SYMBOLS
#include "resource.k"
IDD_DIALOG1 DIALOGEX MOVEABLE IMPURE LOADONCALL DISCARDABLE 10, 10, 185, 74, 0
STYLE DS_MODALFRAME | 0x0004 | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_POPUP
CAPTION "Dialog"
FONT 8, "MS Sans Serif", 700, 0 /*FALSE*/
BEGIN
CONTROL "", IDC_COMBOBOX1, "Combobox", CBS_SORT | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP, 123,26,48,40, , 0
LTEXT "Hello World", IDC_STATIC, 17,18,40,8, SS_LEFT, , 0
END
IDD_DIALOG1 DLGINIT
BEGIN
// Control ID: IDC_COMBOBOX1
3000, 0x0403, 8, 0
0x6556, 0x6972, 0x6F73, 0x006E
3000, 0x0403, 8, 0
0x7250, 0x7065, 0x6961, 0x0064
3000, 0x0403, 11, 0
0x7053, 0x6972, 0x746E, 0x5020, 0x5343, "\x00"
0
END
The Hex DWords are the 3 strings:
Verison
Prepaid
Sprint PCS
I have never needed resources, so I have no idea how to use them, but this is the best traslation I can make:
It goes something like this:
After the control the rc file has an empty , , thing, and I didn't quite know what to do there, and I don't know how to translate the strings thing, but that should be easy enough...
It goes something like this:
dialog combobox,4,'Dialog',10,10,185,74,WS_CAPTION or WS_SYSMENU or WS_VISIBLE or WS_POPUP
dialogitem 'CONTROL','',IDC_COMBOBOX1,123,26,48,40,CBS_SORT or CBS_DROPDOWN or WS_SCROLL or WS_TABSTOP
dialogitem 'LTEXT','Hello World',IDC_STATIC,17,18,40,8,SS_LEFT
After the control the rc file has an empty , , thing, and I didn't quite know what to do there, and I don't know how to translate the strings thing, but that should be easy enough...
I've already had the combobox dialogitem in place. It's the strings that I can't figure out. I even looked for a macro in the fasm include directory.
That part of the resource macros might not exist yet? Have you looked at the code for 'ASMWork' - it appears to have the most up-to-date macro that are public? 'ASMWork' is a windows editor that the FASM author is working on. I'm not interesting in using FASM to code windows programs, or I'd figure it out myself.
IMO FASM good for OS and not really windows...