error RC2108: expected numerical dialog constant

Acest forum este dedicat intrebarilor de Windows API, folosing C/C++
Post Reply
Raduku077
Junior
Junior
Posts: 20
Joined: 09 Jan 2014, 15:41
Judet: Iaşi

error RC2108: expected numerical dialog constant

Post by Raduku077 » 30 Jan 2014, 03:22

Salutare ! Nu am gasit pana acum o rezolvare pentru : "error RC2108: expected numerical dialog constant"


generic.rc :


#include "generic.h"

GENERIC MENU DISCARDABLE
BEGIN
POPUP "&File"
BEGIN
MENUITEM "&Test\tCtrl+T", IDM_TEST
MENUITEM "E&xit\tCtrl+E", IDM_EXIT
END
POPUP "&Help"
BEGIN
MENUITEM "&About My app..\tCtrl+A", IDM_ABOUT
END
POPUP "&Info"
BEGIN
MENUITEM "Ex&tras\tCtrl+I", IDM_INFO
END
POPUP "IDM_GOTO",
BEGIN
MENUITEM "IDM_GOTO", IDM_GOTO
END

END



FileAccel ACCELERATORS
BEGIN
"T", IDM_TEST, CONTROL, VIRTKEY ; CTRL+T
"I", IDM_INFO, CONTROL, VIRTKEY ; CTRL+I
"E", IDM_EXIT, CONTROL, VIRTKEY ; CTRL+E
"A", IDM_ABOUT, CONTROL, VIRTKEY ; CTRL+A
END



DLG_GOTO DIALOG DISCARDABLE 20, 20, 180, 70
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Test Dialog"
FONT 8, "MS Sans Serif"
BEGIN
EDITTEXT "Edit :", ID_LINE, WS_TABSTOP | WS_CHILD, 10, 10, 40, 10 Aici indica atentionarea compilatorului
CHECKBOX "CheckBox : ", ID_ABSREL, 9, 7, 60, 10
PUSHBUTTON "OK", IDOK, 20, 250, 50, 10
PUSHBUTTON "CANCEL", IDCANCEL, 80, 250, 50, 10
END



User avatar
Ovidiu Cucu
Fondator
Fondator
Posts: 3776
Joined: 11 Jul 2007, 16:10
Judet: Iaşi
Location: Iasi
Contact:

Re: error RC2108: expected numerical dialog constant

Post by Ovidiu Cucu » 30 Jan 2014, 12:09

Vezi sintaxa aici: http://msdn.microsoft.com/en-us/library ... s.85).aspx
Oricum, de ce te-ai apucat de editat manual fisierul .rc?
In Visual Studio ai un editor de resurse, datorita caruia nici nu ar trebui sa te intereseze ce-i in acel fisier.

User avatar
Ovidiu Cucu
Fondator
Fondator
Posts: 3776
Joined: 11 Jul 2007, 16:10
Judet: Iaşi
Location: Iasi
Contact:

Re: error RC2108: expected numerical dialog constant

Post by Ovidiu Cucu » 30 Jan 2014, 12:18

...arunca un ochi la Resource Editors si poti scapa de durerile de cap datorate (editarii manuale a) fisierului .rc.

Raduku077
Junior
Junior
Posts: 20
Joined: 09 Jan 2014, 15:41
Judet: Iaşi

Re: error RC2108: expected numerical dialog constant

Post by Raduku077 » 31 Jan 2014, 02:47

Vreau sa nu pot fi luat prin surprindere in cazul in care voi avea nevoie , la facultate sau in alta parte de editarea manuala .

User avatar
Ovidiu Cucu
Fondator
Fondator
Posts: 3776
Joined: 11 Jul 2007, 16:10
Judet: Iaşi
Location: Iasi
Contact:

Re: error RC2108: expected numerical dialog constant

Post by Ovidiu Cucu » 31 Jan 2014, 10:08

Raduku077 wrote:Vreau sa nu pot fi luat prin surprindere in cazul in care voi avea nevoie , la facultate sau in alta parte de editarea manuala .
Munca de Sisif, fara rost. Chiar si batranul FoxPro 2.x for MS-DOS avea un editor de "ecrane" care sa te scuteasca sa numeri patratele ca sa stii pe unde pui un butonel.
Iar daca acum ai un IDE fara editor de resurse, no problem, se gasesc editoare 3-rd party free, moca si de pleasca.
Exemplu: ResEdit.

Daca vrei sa inveti programare Windows, ce contine acel fisier de resurse (.rc) nu-i o prioritate.

Post Reply