⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wpw_tool_borl_95.html

📁 VC programing
💻 HTML
📖 第 1 页 / 共 3 页
字号:
                         - the rest is history -
=============================================================================

<HR>
In article <3t1up7$hbr@eldborg.rhi.hi.is> (30 Jun 1995 22:44:55 GMT), Haraldur Darri Thorvaldsson (harri@rhi.hi.is) wrote:
: >I'm programming for Windows with BC4.5, using my own GUI class framework
: >(not OWL). I've been fiddling with options trying to shrink the executables, 
: >using all the optimizations and skipping all unneccesary stuff. I use the
: >command-line TLINK with parameters -Oa and -Oc to shrink'em even further
: >(it makes a big difference, often around 20%).
: >   Do any of you wanna share some executable-trimming tips? 

Borland's Delphi has got one utility called W8LOSS.EXE - this compresses 
Windows binaries (DLLs and EXEs). Sometimes the compression ratio is nil 
but more often it is something between 15-35%. 

The Chief
---------
Dr. Abimbola A. Olowofoyeku (The African Chief) 
E-mail   : laa12@keele.ac.uk
Author of: Chief's Installer Pro 1.70 for Windows: 
           winner of PC PLUS Magazine Gold Award (April 1995 U.K. edition)
           ftp://ftp.demon.co.uk/pub/ibmpc/windows/chief/pro/cinstp17.zip
<HR>

harri@rhi.hi.is (Haraldur Darri Thorvaldsson) wrote:
>I suspect BC always includes all the exception-handling stuff, 
>even when you don't use it.

use the -x- option to turn the exception handling stuff off.
you can also turn rtti off with -XT.  You might also want to
use -N- to turn stack overflow checking off.

------------------------------------------------------------
Donald K. Forbes                     e-mail:  don@mythos.com
            _  _     ____     ___ ___
           / / //__/  /  /__//  //__
          /   /  /   /  /  //__/___/ Software, Inc.

My opinions are mine and not necessarily that of my employer
------------------------------------------------------------
<HR>
On 30 Jun 1995 22:44:55 GMT, harri@rhi.hi.is (Haraldur Darri Thorvaldsson) said in article <3t1up7$hbr@eldborg.rhi.hi.is>:
>   Do any of you wanna share some executable-trimming tips? I suspect BC
>always includes all the exception-handling stuff, even when you don't
>use it. When I examine MAP files my EXE's always seem to include a lot of
>exception-handling routines and also the 'string' class, which I often don't
>use and don't want! Is there a way to get rid of the exception-handling code
>when you don't want it, or does the run-time library depend on it? Disabling
>them in the project file doesn't seem to do the trick.

Disable execeptions in the project options, but you also need to link 
noeh?.lib before cl.lib.  This causes the startup code to link in stubs 
rather than the exception handling code, which adds about 40K.

>   Also, where can I find some info on deciphering MAP files? I don't
>understand everything in them, for example, does 'idle' mean that a symbol
>or routine is not present in the executable? (sorry for silly question).

It means that the symbol is not referenced in the executable.  It is still
linked.  You don't have to worry about all the unused Windows API imports 
from import.lib, but the other stuff probably is fat.


--
Robert Mashlan             R2M Software Company           Programmer for Hire
mailto:rmashlan@r2m.com    http://www.csn.net/~rmashlan     PGP key available
Resources for Windows Developers    -     http://www.csn.net/~rmashlan/windev
Windows Developers FAQ    -    http://www.csn.net/~rmashlan/win-developer-FAQ

</PRE>


<HR><A NAME=TOOL_BORLANDC_POPUP_MENU_PROB_RW>
Return to <a href="wpw_tool_index.html#TOC">Table of Contents for this chapter</a><br>
<H4>Subject: Problem with Borland RW's POPUP menu</H4><PRE>

Hello -

I think there must be a bug in the Resource Workshop...  or else I am
making a very very stupid mistake.  I made up these pull down menus in
RW, assigned all the ID numbers, wrote some code to activate
functions, and compiled the code.  When I ran it, the first of the
three pop-up menus in the third pop-up menu was greyed.  I checked the
ID numbers, all were fine.  I changed the ID numbers of the greyed
item, just to see what would happen.  I recompiled.  Upon running, now
both the first and second pop-up menu in the third pop-up menu were
greyed.  I changed the ID number of the second item, recompiled,
reran, and all three pop-up menus in the third pop-up menu were
greyed.  I am including a resource header file in the main CPP file
that contains all the info in the .rc file, and I updated it each time
to reflect the changes in ID numbers I made.  I edited the the .RC
script and removed the popup specifier that placed all three of those
pop-up menus in a pop-up menu, now they were just on the main pull
down menu bar.  I recompiled, and ran the program.  Those pull downs
were on the main bar, each one is not greyed, and all of them call
their appropriate functions in the CPP file.  So, their IDs must be
right.

Anyway, this seems like a glaring mistake if it is one, I can't find
anything wrong in what I've done...  so, does anyone know what's
happening?

Thanks, and if you could reply to me at my e-mail that'd be most
ideal.  I check these newsgroups, but not as often as mail.

Thanks for any help.

- Quincy

Here's the .RC file, it looks fine, but I don't know, something,
somewhere isn't...


/****************************************************************************


atinevry.rc

produced by Borland Resource Workshop


*****************************************************************************/


#define EVERY_DIALOG    155
#define IN_DIALOG       154
#define EVENTS_DIALOG   152
#define AT_DIALOG       153
#define MAIN_MENU       151
#define CM_PRINTER_SETUP        307
#define CM_PAGE_SETUP   306
#define CM_PRINT        305
#define CM_SAVE_AS      304
#define CM_SAVE 303
#define CM_OPEN 302
#define CM_NEW  301
#define CM_VIEW_ALL     230
#define CM_EXIT 308
#define CM_UNDO 201
#define CM_CUT  202
#define CM_COPY 203
#define CM_PASTE        204
#define CM_VIEW_EVERY   179
#define CM_VIEW_IN      178
#define CM_VIEW_AT      177
#define CM_DELETE_EVERY 186
#define CM_DELETE_IN    185
#define CM_DELETE_AT    184
#define CM_ADD_EVERY    193
#define CM_ADD_IN       192
#define CM_ADD_AT       191
MAIN_MENU MENU
{
 POPUP "&File"
 {
  MENUITEM "&New", CM_NEW
  MENUITEM "&Open...", CM_OPEN
  MENUITEM "&Save", CM_SAVE
  MENUITEM "Save &as...", CM_SAVE_AS
  MENUITEM SEPARATOR
  MENUITEM "&Print...", CM_PRINT
  MENUITEM "Page se&tup...", CM_PAGE_SETUP
  MENUITEM "P&rinter setup...", CM_PRINTER_SETUP
  MENUITEM SEPARATOR
  MENUITEM "E&xit", CM_EXIT
 }

 POPUP "&Edit"
 {
  MENUITEM "&Undo\tCtrl+Z", CM_UNDO
  MENUITEM "&Cut\tCtrl+X", CM_CUT
  MENUITEM "&Copy\tCtrl+C", CM_COPY
  MENUITEM "&Paste\tCtrl+V", CM_PASTE
 }

 POPUP "Function"
 {
  POPUP "Add"  // This now appears greyed out
  {
        MENUITEM "At...", CM_ADD_AT
        MENUITEM "In...", CM_ADD_IN
        MENUITEM "Every...", CM_ADD_EVERY
  }

  MENUITEM SEPARATOR

  POPUP "Delet&e" // This is greyed out, too
  {
        MENUITEM "At...", CM_DELETE_AT
        MENUITEM "In...", CM_DELETE_IN
        MENUITEM "Every...", CM_DELETE_EVERY
  }

  MENUITEM SEPARATOR
  POPUP "View" // Yup, this, too.
  {
        MENUITEM "At...", CM_VIEW_AT
        MENUITEM "In...", CM_VIEW_IN
        MENUITEM "Every...", CM_VIEW_EVERY
        MENUITEM "All...", CM_VIEW_ALL
  }

 }

}



EVENTS_DIALOG DIALOG 54, 51, 254, 124
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CLASS "bordlg"
CAPTION "Events"
FONT 8, "MS Sans Serif"
{
 LISTBOX 451, 16, 6, 224, 72, LBS_STANDARD | WS_GROUP
 PUSHBUTTON "Add", 452, 8, 98, 39, 14
 PUSHBUTTON "Delete", 453, 59, 98, 39, 14
 PUSHBUTTON "Done", 454, 205, 98, 39, 14
 CONTROL "", -1, "BorShade", BSS_HDIP | BSS_LEFT | WS_CHILD |
WS_VISIBLE, 5, 84, 245, 2
}


AT_DIALOG DIALOG 52, 81, 262, 114
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "At"
FONT 8, "MS Sans Serif"
{
 DEFPUSHBUTTON "OK", 473, 101, 92, 50, 14
 PUSHBUTTON "Cancel", 337, 200, 94, 50, 14
 PUSHBUTTON "Help", 961, 200, 76, 50, 14
 COMBOBOX 461, 4, 12, 24, 130, CBS_DROPDOWNLIST | WS_TABSTOP
 COMBOBOX 462, 34, 12, 24, 130, CBS_DROPDOWNLIST | WS_TABSTOP
 COMBOBOX 463, 64, 12, 24, 130, CBS_DROPDOWNLIST | WS_TABSTOP
 COMBOBOX 464, 102, 12, 24, 33, CBS_DROPDOWNLIST | WS_TABSTOP
 COMBOBOX 465, 140, 12, 24, 130, CBS_DROPDOWNLIST | WS_TABSTOP
 COMBOBOX 466, 173, 12, 45, 130, CBS_DROPDOWNLIST | WS_TABSTOP
 COMBOBOX 467, 227, 12, 30, 130, CBS_DROPDOWNLIST | WS_TABSTOP
 LTEXT "Hour", -1, 9, 4, 17, 8
 LTEXT "Minute", -1, 36, 4, 20, 8
 LTEXT "Second", -1, 64, 4, 25, 8
 LTEXT "AM/PM", -1, 103, 4, 23, 8
 LTEXT "Day", -1, 144, 4, 14, 8
 LTEXT "Month", -1, 183, 4, 20, 8
 LTEXT "Year", -1, 232, 4, 17, 8
 EDITTEXT 468, 5, 39, 90, 12
 EDITTEXT 470, 5, 66, 90, 12
 PUSHBUTTON "Browse...", 471, 101, 65, 50, 14
 PUSHBUTTON "Browse...", 469, 101, 38, 50, 14
 EDITTEXT 472, 5, 93, 90, 12
 LTEXT "Working Directory", -1, 6, 57, 60, 8
 LTEXT "File", -1, 6, 31, 60, 8
 LTEXT "Command Line", -1, 5, 85, 60, 8
 LTEXT "/", -1, 221, 14, 4, 8
 LTEXT "/", -1, 167, 14, 4, 8
 LTEXT ":", -1, 30, 13, 4, 8
 LTEXT ".", -1, 60, 15, 3, 8
}


IN_DIALOG DIALOG 37, 55, 263, 114
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "In"
FONT 8, "MS Sans Serif"
{
 DEFPUSHBUTTON "OK", 492, 101, 92, 50, 14
 PUSHBUTTON "Cancel", 339, 200, 94, 50, 14
 PUSHBUTTON "Help", 962, 200, 76, 50, 14
 COMBOBOX 481, 4, 12, 24, 130, CBS_DROPDOWNLIST | WS_TABSTOP
 COMBOBOX 482, 34, 12, 24, 130, CBS_DROPDOWNLIST | WS_TABSTOP
 COMBOBOX 483, 64, 12, 24, 130, CBS_DROPDOWNLIST | WS_TABSTOP
 COMBOBOX 484, 140, 12, 24, 130, CBS_DROPDOWNLIST | WS_TABSTOP
 COMBOBOX 485, 173, 12, 45, 130, CBS_DROPDOWNLIST | WS_TABSTOP
 COMBOBOX 486, 227, 12, 30, 130, CBS_DROPDOWNLIST | WS_TABSTOP
 LTEXT "Hour", -1, 9, 4, 17, 8
 LTEXT "Minute", -1, 36, 4, 20, 8
 LTEXT "Second", -1, 64, 4, 25, 8
 LTEXT "Day", -1, 144, 4, 14, 8
 LTEXT "Month", -1, 183, 4, 20, 8
 LTEXT "Year", -1, 232, 4, 17, 8
 EDITTEXT 487, 5, 39, 90, 12
 EDITTEXT 489, 5, 66, 90, 12
 PUSHBUTTON "Browse...", 490, 101, 65, 50, 14
 PUSHBUTTON "Browse...", 488, 101, 38, 50, 14
 EDITTEXT 491, 5, 93, 90, 12
 LTEXT "Working Directory", -1, 6, 57, 60, 8
 LTEXT "File", -1, 6, 31, 60, 8
 LTEXT "Command Line", -1, 5, 85, 60, 8
 LTEXT "/", -1, 221, 14, 4, 8
 LTEXT "/", -1, 167, 14, 4, 8
 LTEXT ":", -1, 30, 13, 4, 8
 LTEXT ".", -1, 60, 15, 3, 8
}


EVERY_DIALOG DIALOG 27, 39, 263, 167
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Every"
FONT 8, "MS Sans Serif"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -