Changeset 1486 for trunk/dll/tools.c


Ignore:
Timestamp:
Dec 17, 2009, 1:36:04 AM (16 years ago)
Author:
Gregg Young
Message:

Initial changes to commands handling. Allows you to reorder commands menu without breaking toolbars and changing hotkeys. Fixes the environment so it is used and so it is deleted if the command is deleted. Allows for user defined bitmaps in toolbars which are named based on the text or the the ID of the command.The new commands.dat will not be usable with earlier versions of FM/2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/tools.c

    r1435 r1486  
    669669      CHAR idstr[7];
    670670      USHORT id;
     671      CHAR text[CCHMAXPATH];
    671672
    672673      *idstr = 0;
    673674      WinQueryDlgItemText(hwnd, ADDBTN_ID, 6, idstr);
     675      WinQueryDlgItemText(hwnd, ADDBTN_TEXT,CCHMAXPATH - 1, text);
    674676      id = atoi(idstr);
    675677      if (id) {
     
    678680          hbm = GpiLoadBitmap(hps, 0, id, 28, 28);
    679681        if (!hbm)
    680           hbm = LoadBitmapFromFileNum(id);
     682          hbm = LoadBitmapFromFileIdentifier(id, text);
    681683        if (hbm) {
    682684          hbmd = (HBITMAP) WinSendDlgItemMsg(hwnd, ADDBTN_BMP, SM_QUERYHANDLE,
Note: See TracChangeset for help on using the changeset viewer.