   Bitmaps that won't load outside of the WndProc
Hello everyone, so I''ve been able to load my bitmaps from resources into windows. This was done during the WM_CREATE portion of the WNDProc for the window. Because I want to "declutter" my WNDProc, I decided to make an additonal .cpp file where all my auxilliary functions can reside. So I simply took all the code that was in the WM_CREATE and moved it to a FS_init() call that would do all the init stuff plus load the bitmaps I needed. The problem is that now, nothing displays on the screen?? I checked to see if the functions were returning successfully (i.e. LoadBitmap, and GetObject, etc) all are working, the only difference is that they are not in the WNDProc anymore. Has anyone else have this happen? How do I fix this...? Also, before I called the FS_init() function I did this little snippet of code....hInstance = ((LPCREATESTRUCT) lParam)->hInstance;hdc = GetWindowDC(hWnd);FS_init(hWnd, hInstance, hdc);Thanks!!~Bolt 
  youre probably passing them by value, pass by refrence.do this:FS_init(HWND hWnd, HINSTANCE hInstance, HDC& hdc);   the way you *probably* have it now, means that whatever you assign to the parameters inside your function revert back to the way they were once the function returns. Putting the & means pass by refrence, allowing the changes that occur to the paramters inside youre function to stay once the function exits.   [edited by - Mulligan on February 11, 2004 9:32:13 PM];I tried it that way, and said the heck with it and changed all the parameters to globals so that the function now looks like FS_init(HWND hWnd) and that''s it... still no go...  any other ideas??~Bolt;   I''m sorry I wasterd anybody''s time... The main reason I''m posting now is to provide closure and a gentle reminder for those who might have done the same thing unwittingly...Anyhow, I included the header file for my auxfunctions file, but in the header file, I never included the .cpp file...hehe~Bolt 