Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » DHCTRL not refreshed
DHCTRL not refreshed [message #50819] Thu, 03 January 2019 18:50 Go to next message
mdelfede is currently offline  mdelfede
Messages: 1259
Registered: September 2007
Senior Contributor
Hi,

I've this problem in Windows 7; the DHCTRL is inside a TabCtrl.
It doesn't get refreshed when moving another window over it. The refresh happens ONLY when I move the mouse over an object (which triggers the update from my code). You can see from the image below:

index.php?t=getfile&id=5731&private=0

I tried to set some breakpoints in refresh and status code, it doesn't get called when moving something over my control.
Putting a breakpoint inside DHCtrl's WindowProc shows that WM_PAINT and WM_NCPAINT event are indeed sent by windows, but probably they're not processed.
On Linux it's all ok, as usual.
  • Attachment: dhctrl.PNG
    (Size: 124.42KB, Downloaded 75 times)
Re: DHCTRL not refreshed [message #50820 is a reply to message #50819] Thu, 03 January 2019 19:21 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1259
Registered: September 2007
Senior Contributor
The above problem is ONLY on Windows7 on a real machine.
The same thing DOESN'T HAPPEN on a windows 7 under VirtualBox... weird.
Re: DHCTRL not refreshed [message #50825 is a reply to message #50820] Sat, 05 January 2019 13:21 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11700
Registered: November 2005
Ultimate Member
Not having Win7 machine around, I will for now hope you will have luck resolving this...

Mirek
Re: DHCTRL not refreshed [message #50828 is a reply to message #50825] Sat, 05 January 2019 15:26 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1259
Registered: September 2007
Senior Contributor
Hi,

I'm fixing some printing sfuffs on my app, then I'll look at this problem.
The weird stuff is that it behaves differently on VirtualBox and on a real machine, both with windows 7...
Re: DHCTRL not refreshed [message #50943 is a reply to message #50828] Mon, 14 January 2019 19:29 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1259
Registered: September 2007
Senior Contributor
Hi Mirek,

this is "solved" modifying the window proc of my ctrl like this :

LRESULT OCEView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
	if(message == WM_PAINT)
	{
		RefreshLayout();
	}
	return DHCtrl::WindowProc(message, wParam, lParam);
}



Don't ask why... I really dont' know. I've tried with everything else with no changes or crashes.
This one works. Simple Refresh() doesn't, nor UpdateWindow nor anything else.

Ciao

Massimo
Re: DHCTRL not refreshed [message #50948 is a reply to message #50943] Mon, 14 January 2019 22:58 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11700
Registered: November 2005
Ultimate Member
Would it work if put after

LRESULT GLCtrl::GLPane::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
	if(message == WM_PAINT && s_openGLContext) {


?

Mirek
Re: DHCTRL not refreshed [message #50949 is a reply to message #50948] Tue, 15 January 2019 00:08 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1259
Registered: September 2007
Senior Contributor
Hi,

I'm not using GLCtrl but DHCtrl directly...OpenCascade library already has the OpenGL layer, just needs an hwnd.

EDIT
Thinking a bit more... I could use the generic interface of OpenCascade, which should do the job with your GLCtrl
control. It's called Aspect_NeutralWindow, in replacement of WNT_Window and X11_Window, and requires the "manual" context creation, which your control does.

[Updated on: Tue, 15 January 2019 00:16]

Report message to a moderator

Re: DHCTRL not refreshed [message #50952 is a reply to message #50949] Tue, 15 January 2019 09:07 Go to previous message
mirek is currently offline  mirek
Messages: 11700
Registered: November 2005
Ultimate Member
mdelfede wrote on Tue, 15 January 2019 00:08
Hi,

I'm not using GLCtrl but DHCtrl directly...OpenCascade library already has the OpenGL layer, just needs an hwnd.

EDIT
Thinking a bit more... I could use the generic interface of OpenCascade, which should do the job with your GLCtrl
control. It's called Aspect_NeutralWindow, in replacement of WNT_Window and X11_Window, and requires the "manual" context creation, which your control does.


Well, could you please test our OpenGL Ctrl (e.g. OpenGL/examples) with Win7?

Mirek
Previous Topic: TreeCtrl - How to expand all?
Next Topic: Brand new Win32 API project (no U++) with compilation error
Goto Forum:
  


Current Time: Sun Feb 17 11:30:11 CET 2019

Total time taken to generate the page: 0.00596 seconds