| |

VerySource

 Forgot password?
 Register
Search
View: 11|Reply: 3

Resource file compilation error in vc (program source The Art of C ++)

[Copy link]

1

Threads

2

Posts

3

Credits

Newbie

Rank: 1

Credits
3

 China

Post time: 2020-3-20 10:00:02
| Show all posts |Read mode
// The contents of the tcp.rc file are as follows:

#include <windows.h>
#include "panel.h"
 
ThreadPanelDB DIALOGEX 20, 20, 140, 110
CAPTION "Thread Control Panel"
STYLE WS_BORDER | WS_VISIBLE | WS_POPUP | WS_CAPTION | WS_SYSMENU
{
  DEFPUSHBUTTON "Done", IDCANCEL, 55, 80, 33, 14
  PUSHBUTTON "Terminate", IDD_TERMINATE, 10, 20, 42, 12
  PUSHBUTTON "Suspend", IDD_SUSPEND, 10, 35, 42, 12
  PUSHBUTTON "Resume", IDD_RESUME, 10, 50, 42, 12
  LISTBOX IDD_LB, 65, 20, 63, 42, LBS_NOTIFY | WS_VISIBLE |
          WS_BORDER | WS_VSCROLL | WS_TABSTOP
  CTEXT "Thread Priority", IDD_TEXT1, 65, 8, 64, 10
  CTEXT "Change State", IDD_TEXT2, 0, 8, 64, 10
}

Compile prompt: missing ';' before identifier 'DIALOGEX'
Reply

Use magic Report

0

Threads

3

Posts

3

Credits

Newbie

Rank: 1

Credits
3

 China

Post time: 2020-6-25 15:45:01
| Show all posts
Won't read this stuff...
Reply

Use magic Report

0

Threads

14

Posts

13

Credits

Newbie

Rank: 1

Credits
13

 Hong Kong

Post time: 2020-6-27 20:45:01
| Show all posts
The front of DIALOGEX should be the control ID, and it should be defined as an integer in resource.h, and include the resource.h file
Reply

Use magic Report

1

Threads

2

Posts

3

Credits

Newbie

Rank: 1

Credits
3

 China

 Author| Post time: 2020-7-15 19:30:01
| Show all posts
Reputation: 99
This is my definition in the #include "panel.h" header file.
#define IDD_LB 200
#define IDD_TERMINATE 202
#define IDD_SUSPEND 204
#define IDD_RESUME 206
#define IDD_TEXT1 208
#define IDD_TEXT2 209
#define ThreadPanelDB 199
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2020|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list