Skip to main content
GameDev.net gamedev.net
🔒 Locked

Common dialog problems

Started by O-san Jun 15, 2007 at 6:29 AM 1 replies 1.2k views
Original Post
O-san
O-san
Hello! I'm using GetOpenFileName function with explorer style - not oldstyle, to get user selected files. When I move the dialog the background behind it gets messed up. My background is an OpenGL scene, so I tried catching the WM_MOVE message and redraw the scene when needed but GetOpenFileName dialog doesn't send any such message :( If I change the style of the dialog to the oldstyle I get the WM_MOVE message and all works as expected. Does anyone know whats causing the loss of the WM_MOVE message?? :S Thanks!
Skizz
Skizz
The WM_MOVE message is sent to a window that has moved. When you move the file dialog, only that dialog gets the WM_MOVE, it doesn't pass it on to any other window (nor should it). When the file dialog moves, any window (or part of) underneath it that becomes visible gets a WM_PAINT message. The main app probably isn't handling the WM_PAINT message correctly. In windowed mode, you want OpenGL to render to a backbuffer and then copy the backbuffer to the screen in response to a WM_PAINT message.

Skizz
O-san
O-san
I have a hook proc on my openfiledialog that catches the WM_MOVE message, but I never got the message when I moved the dialog :S I did however get the WM_INITDIALOG message. If I switch to the old style dialog it sends the WM_MOVE message (strange?). But now it works anyways, I had totally forgot about WM_PAINT :D thanks for refreshing my memory! works like a charm =)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.