Anoni Moose wrote:
/* This table is used to save all of the needed font settings in Notepad. * It looks quite messy, when in fact it _hugely_ eases loading/setting of settings. Really. ;) * It is layed out as follows: * * [n][0] == pointer to registry subkey name (WCHAR) * [n][1] == type of registry entry * [n][2] == pointer to buffer to store setting * [n][3] == size of data returned * [n][4] == default value to use if subkey was not found * [n][5] == registry path to open (ANSI, not including root (HKEY_CURRENT_USER, etc)) */ DWORD settings_data[15][6] = { { (DWORD)&heightW, REG_DWORD, (DWORD)&Globals.lfFont.lfHeight, sizeof(REG_DWORD), -10, (DWORD)&FONT_SETTINGS_REG_PATH },
You should define a proper structure to put this data in rather than casting the values to DWORD (which won't work in 64-bit mode). -- Rob Shearman