View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0032532 | Community | OCCT:Visualization | public | 2021-08-12 14:17 | 2021-09-03 13:38 |
Reporter | occ_siddhesh_nikam | Assigned To | bugmaster | ||
Priority | normal | Severity | just a question | ||
Status | closed | Resolution | no change required | ||
Platform | Windows | OS | Windows | ||
Product Version | 7.2.0 | ||||
Target Version | 7.4.0 | ||||
Summary | 0032532: Multiple Views using "WNT_Window" in MFC Dialog | ||||
Description | Hello, I have created three "3d_views" in a MFC dialog using following code: Viewer_1 = new V3d_Viewer(GraphicDriver); Viewer_2 = new V3d_Viewer(GraphicDriver); Viewer_3 = new V3d_Viewer(GraphicDriver); Window_1 = new WNT_Window(GetSafeHwnd()); Window_2 = new WNT_Window(GetSafeHwnd()); Window_3 = new WNT_Window(GetSafeHwnd()); View_1 = Viewer_1->CreateView(); View_2 = Viewer_2->CreateView(); View_3 = Viewer_3->CreateView(); View_1->SetWindow(Window_1); if (!Window_1->IsMapped()) Window_1->Map(); View_2->SetWindow(Window_2); if (!Window_2->IsMapped()) Window_2->Map(); View_3->SetWindow(Window_3); if (!Window_3->IsMapped()) Window_3->Map(); It is working; but while opening a dialog, all three views are not building at a same time. Instead, Window_1 is first created, then Window_2 and then Window_3. It is giving weird behavior of a dialog. They should build simultaneously. Also, above code works in "OnPaint()", not in "OnInDialog()." Is it a flickering issue or anything else? | ||||
Tags | No tags attached. | ||||
Test case number | |||||
related to | 0032537 | feedback | occ_siddhesh_nikam | Exception occurs after updating OCCT_7.2.0 to OCCT_7.5.0 |
|
If you would like 3 windows to appear at once, then you should probably setup 3 views (until V3d_View::SetWindow()) and show these windows on the screen afterwards (via WNT_Window::Map() or it's analog in MFC). |
|
Hello kgv, Thanks for the reply. I have done the same here. Is anything missing in the code? Viewer_1 = new V3d_Viewer(GraphicDriver); Viewer_2 = new V3d_Viewer(GraphicDriver); Viewer_3 = new V3d_Viewer(GraphicDriver); Window_1 = new WNT_Window(GetSafeHwnd()); Window_2 = new WNT_Window(GetSafeHwnd()); Window_3 = new WNT_Window(GetSafeHwnd()); View_1 = Viewer_1->CreateView(); View_2 = Viewer_2->CreateView(); View_3 = Viewer_3->CreateView(); View_1->SetWindow(Window_1); if (!Window_1->IsMapped()) Window_1->Map(); View_2->SetWindow(Window_2); if (!Window_2->IsMapped()) Window_2->Map(); View_3->SetWindow(Window_3); if (!Window_3->IsMapped()) Window_3->Map(); |
|
You call Map() after SetWindow() individually per view. What I suggest is calling Map() for 3 windows after all Views have been defined via SetWindow(). |
|
Dear kgv, I am little bit confused. could you please show a snippet here? Because if I remove "Map()" function from the code, still all three windows are displaying. |
|
This means that windows have been already displayed by MFC logic - you may try adjusting visibility of these 3 windows somewhere there. Note that V3d_View performs implicit window redraws in many places like V3d_View::SetWindow() or V3d_View::MustBeResized(). This behavior could be disabled by V3d_View::SetImmediateUpdate() flag (normally set right after V3d_View construction). |
|
Thanks kgv. I got your point. In V3d_View.cxx/SetWindow(), Redraw() has been called. "SetImmediateUpdate(FALSE)" doesn't work. Any other idea?? |
|
> "SetImmediateUpdate(FALSE)" doesn't work. If you are indeed using OCCT 7.2.0, then you need updating OCCT to a newer version (7.4.0+), where this particular bug in V3d_View::SetWindow() has been fixed. |
|
Thanks... I will do it. |
|
Thanks kgv for help. Issue is resolved by updating OCCT version. |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-08-12 14:17 | occ_siddhesh_nikam | New Issue | |
2021-08-12 14:17 | occ_siddhesh_nikam | Assigned To | => kgv |
2021-08-12 16:05 | kgv | Note Added: 0103156 | |
2021-08-12 16:06 | kgv | Severity | minor => just a question |
2021-08-12 16:43 | occ_siddhesh_nikam | Note Added: 0103157 | |
2021-08-12 16:50 | kgv | Note Added: 0103158 | |
2021-08-12 17:07 | occ_siddhesh_nikam | Note Added: 0103159 | |
2021-08-12 17:17 | kgv | Note Added: 0103160 | |
2021-08-12 17:57 | occ_siddhesh_nikam | Note Added: 0103165 | |
2021-08-12 20:31 | kgv | Note Added: 0103166 | |
2021-08-12 21:30 | occ_siddhesh_nikam | Note Added: 0103168 | |
2021-08-14 13:19 | occ_siddhesh_nikam | Note Added: 0103195 | |
2021-08-14 13:54 | kgv | Assigned To | kgv => bugmaster |
2021-08-14 13:54 | kgv | Status | new => feedback |
2021-08-14 13:54 | kgv | Resolution | open => no change required |
2021-08-14 13:54 | kgv | Target Version | => 7.4.0 |
2021-08-16 21:53 | kgv | Relationship added | related to 0032537 |
2021-09-03 13:38 | bugmaster | Status | feedback => closed |