Qt handle native messages?
-
Is there any way how to handle native messages? I mean to handle, for example, on Windows WM_NCPAINT (to work with border). It is not available to work with Window Caption Bar. Will Qt implement it? Yes, it requires to add some handler function for example, add to QWidget method:
@virtual void QWidget::borderPaintEvent(QPainter* e) = 0;@ ?
In WinAPI it just require to catch in Switch-case code...
@
case WM_NCPAINT:
// call QWidget::borderPaintEvent(QPainter *e);
break;
@
It could allows me to work with Non-Client Area in Qt and use platform-depent libraries. Could it be RFC, Can I push it somewhere ? -
Like "QCoreApplication::winEventFilter()":http://doc.qt.nokia.com/latest/qcoreapplication.html#winEventFilter?
-
Yes. But, I think, it is not good idea to work with Window settings under QCoreApplication (QApplication). Much more logic gives to have handler under QWidget. So, I will have to inherit and replace QWidget. It seems.
//EDIT:
Hmm...I think to inherit QCoreApplication/QApplication, reimplement winEventFilter, and it in, call @MainWidget::borderPaintEvent();@
This could be also an idea... -
"QWidget::winEvent":http://doc.qt.nokia.com/latest/qwidget.html#winEvent.
-
result is the "system-dependant":http://goo.gl/t8Cg3, "message-dependant":http://goo.gl/G1e1Q result of the message. "In your case":http://goo.gl/oL2jS zero if the message has been processed.