News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

Sticky Form

Started by halsten, November 27, 2008, 12:00:02 PM

Previous topic - Next topic

halsten

Hello,

Apparently the form I created in PellesC had became sticky so I can not move it around. Any ideas why that would happen?

Regards,
halsten

JohnF

Do you mean a Dialog Box that is your apps window can't be moved? Try to be more concise.

John

halsten

Yes, the Dialog Box became sticky and on top most as well. And I didn't write such code for those functions.

Regards,
halsten

halsten

Here's the sample.

Regards,
halsten

JohnF

If I comment out this, it is not sticky. You should be able to investigate and find the reason.


/*
case WM_SYSCOMMAND:
if (wParam == SC_MINIMIZE) {
MinimizeWndToTray(hwndDlg);
ShowNotifyIcon(g_hInstance, hwndDlg, TRUE);
SetWindowLong(hwndDlg, DWL_MSGRESULT, 0);
return TRUE;
}
return TRUE;
*/


John

halsten

#5
Okay, but if you comment those lines the form will still be TOP MOST. Any idea why that happens?

Regards,
halsten

Stefan Pendl

Quote from: halsten on November 27, 2008, 11:41:48 PM
Okay, but if you comment those lines the form will still be TOP MOST. Any idea why that happens?
It is a system modal dialog, which is usually used for notifications that must be placed above all other windows.

If this is the main window of your application, remove the modal style too, since this only makes sense for support windows of an application window.

You may wish to take a look at the window styles at MSDN, they are found in the descriptions of CreateWindow and CreateWindowEx, be sure to check the win32 descriptions.
---
Stefan

Proud member of the UltraDefrag Development Team

halsten

Okay, thanks a lot for your help.

Regards,
halsten