Weird, I'm logged in but seem to have posted anonymously. Lets try again (can't edit an anonymous post) with proper source tags [smile] Maybe a moderator can delete the previous post?
- Custard Slice
Yeeeeeehhhhaaaaaa!!!! Just got fullscreen working. YAY!
For those of you who are interested, here is my "hack-and-slash" fullscreen solution (probably not the best way but it works):
1) Enable the ESC key to quit in fullscreen mode
vis_wnd_proc() function in visualization_template.cpp // edit the WM_KEYDOWN handler case WM_KEYDOWN: { // never used this way of doing keys so I did it my way //if(wnd_set_key_press(wParam, true)) if (vis_fullscreen && wParam == VK_ESCAPE) { // quit if in fullscreen PostQuitMessage(0); } return 0; }
2) Prevent using an embedded window. This ensures that the fullscreen call has the correct window size (the wamp_setup_wnd_state() call changes the size to handle the fancy winamp borders etc.)
wamp_module_init() function in wamp_module_functions.cpp // change the lines under the "Check compatibility - version 5.0+ is required" // comment to the following: HWND h_wnd_parent = NULL; if (!fullscreen) { h_wnd_parent = wamp_setup_wnd_state(*module); if(!h_wnd_parent) return 1; }
3) Ensure that the window gets properly destroyed on quit (this solves the "unable to register window" error)
wamp_module_quit() function in wamp_module_functions.cpp: // change this if statement to allow fullscreen mode through // (as we don't have an embedded window any more) if(wamp_wnd_state.me || fullscreen) { . . . // just after the wamp_wnd_state.me state is destroyed, destroy the // actual window. This was missing previously so the UnregisterClass // was failing as the class still had an active window. Thus, trying to // create a new window later would result in the "unable to // register window" error DestroyWindow(wamp_wnd_state.me); // need to destroy the window here too DestroyWindow(h_wnd); UnregisterClass(module->module_title, module->hDllInstance);}
Hope that helps anyone trying to get fullscreen going. As I said, its a bit of a hack and not too pretty but it works and that's good enough for me right now [smile]
Now I'm going to bed (its 1:30 am here). Will send my entry in after I've cleaned up the code a bit.