473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Windows resource/.rc, .h files and GDI Functions, Fonts & Bitmaps

SHC
Hi all,
I saw the following 2 files used in the OpenGL and DirectX 9 programming:
1) resource.h
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by dx9_indexed_geometry.rc
//
#define IDC_MYICON 2
#define IDD_DIRECTX_DIALOG 102
#define IDD_ABOUTBOX 103
#define IDS_APP_TITLE 103
#define IDM_ABOUT 104
#define IDM_EXIT 105
#define IDS_HELLO 106
#define IDI_DIRECTX_ICON 107
#define IDC_DIRECTX_MENU 108
#define IDC_DIRECTX_ACCELERATOR 109
#define IDC_DIRECTX 110
#define IDR_MAINFRAME 128
#define IDC_STATIC -1

// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 129
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 110
#endif
#endif
2) filenameXYZ.rc (opened by using Notepad)
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#define APSTUDIO_HIDDEN_SYMBOLS
#include "windows.h"
#undef APSTUDIO_HIDDEN_SYMBOLS
#include "resource.h"

/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32

/////////////////////////////////////////////////////////////////////////////
//
// Icon
//

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_DIRECTX_ICON ICON "codesampler.ico"

/////////////////////////////////////////////////////////////////////////////
//
// Menu
//

IDC_DIRECTX_MENU MENU
BEGIN
POPUP "&File"
BEGIN
MENUITEM "E&xit", IDM_EXIT
END
POPUP "&Help"
BEGIN
MENUITEM "&About ...", IDM_ABOUT
END
END
/////////////////////////////////////////////////////////////////////////////
//
// Accelerator
//

IDC_DIRECTX_ACCELERATOR ACCELERATORS
BEGIN
"/", IDM_ABOUT, ASCII, ALT, NOINVERT
"?", IDM_ABOUT, ASCII, ALT, NOINVERT
END
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//

IDD_ABOUTBOX DIALOG 22, 17, 230, 75
STYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "About"
FONT 8, "System"
BEGIN
ICON IDI_DIRECTX_ICON,IDC_MYICON,14,9,20,20
LTEXT "DirectX Sample v1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX
LTEXT "Copyright (C) 2001",IDC_STATIC,49,20,119,8
DEFPUSHBUTTON "OK",IDOK,195,6,30,11,WS_GROUP
END
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//

2 TEXTINCLUDE
BEGIN
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""windows.h""\r\n"
"#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""resource.h""\r\n"
"\0"
END

3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END

1 TEXTINCLUDE
BEGIN
"resource.h\0"
END

#endif // APSTUDIO_INVOKED

#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////

#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
///////////////////////////////////////////////////////////////////////////
Issue #1: I do not know how the numerical numbers are decided and used in 1).
Issue #2: I have a hard to do the coding to create the .rc file like 2) for
Icon, Menu, Accelerator, Dialog, TEXTINCLUDE, etc.
Issue #3: Chapter 6 of Book "Programming with Microsoft Visual C++ .NET"
(Core Reference) by G. Shepherd with D. Kruglinski teaches Classic GDI
Functions, Fonts, and Bitmaps used in MFC. I do not know whether these GDI
Functions, Fonts and Bitmaps are related to the .rc file for Icon, Menu,
Accelerator, Dialog, TEXTINCULE, etc. Please help and address the
above-mentioned 3 issues for me or point out where I can find the answers for
them.

Thanks in adanve,
SHC
Nov 17 '05 #1
0 3415

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ken Lindner | last post by:
I have a need to become familiar with SQL Server 2000 for work. Needless to say I am new to SQL Server any version, but not IT in general. My employer has provided me with the SQL Server 2000...
0
by: Adam Dockter | last post by:
I want my custom controls to have customer bitmaps but I can't get them to work if I try to pull the icon from a resource file. I know that I can add the icon to the project as an embedded...
3
by: Stuart Ferguson | last post by:
I have just started using Visual Basic .NET, after having used VB 5 & 6 for the last 2 years and was wondering if anyone could let me know how to access elements in resource files e.g. strings and...
3
by: Chris Paul | last post by:
I'm having trouble with PHP & PostgreSQL/OpenLDAP/Apache on Windows. I've set this up countless times on BSD (piece of cake) but I'm trying to do this on Windows now so that my developer can work...
10
by: Kamilche | last post by:
I have a question for all you Pythoneers out there. I'm making a game with Python, and have a need for fonts. I am currently using a free TrueType font, but am considering switching to a bitmap...
1
by: Nickneem | last post by:
The following is driving me mad: VS2005 Compact framework, project upgraded from 2003. I get a cast exeception error trying to populate an imagelist (code is by design)...
7
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Is it possible to create multilingual support in a Windows form like you can do in a web page by using resource files?
8
by: raylopez99 | last post by:
I have the latest version of Visual Studio 2008 Professional, which allows you to create resource files (this is the .resx file, no?), unlike the Express version, which does not. I am trying to...
1
by: JoeyMP | last post by:
Hello, I can successfully copy Chinese and other non-English characters form web pages and paste them into Microsoft Word 2003. However, when I attempt to paste them into "Value" fields in my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.