I'm getting all sorts of weird errors thrown at me ... I think it may be to do with the size of my struct, is there only a limited size for them???
In my window procedure (this is a custom control) I set most things to defaults on WM_CREATE, if I comment out setting the cFACE and cCaption COLORREF variables it doesn't crash but if they are uncommented it does crash.Code:typedef struct { /* Menu specifics */ int iStyle; //Style int iMode; //Mode int iItems; //Number of items int iType; //Item types int iCaptions; //Item captions int iOverflowX; //X-Axis overflow int iOverflowY; //Y-Axis overflow bool bDocked; //Is it docked? bool bSet; //Is it set? HBITMAP *hBmps; //Bitmaps (if bmp mode) HICON *hIcons; //Icons (if icon mode) LPSTR *lCaptions; //Captions /* Theme related */ COLORREF cFace; COLORREF cFrame; COLORREF cText; COLORREF cCaption; HBITMAP hChevron; HBITMAP hClose; HBITMAP hCstmBtn; }MENUSTRUCT, *lpMENUSTRUCT;
I set them like lpms->cFace = RGB(255,0,0) where lpms is MENUSTRUCT*..
Also in my struct could I replace HBITMAP* and HICON* with HANDLE* ??? I could use one variable then because it's either using icons or bitmaps, not both.