110 shellName +=
"_shell";
111 static SbBool done =
FALSE;
113 HBRUSH brush = (HBRUSH) GetSysColorBrush(COLOR_BTNFACE);
115 wc.style = CS_HREDRAW | CS_VREDRAW;
116 wc.lpfnWndProc = (WNDPROC)WindowProc;
119 wc.hInstance = ::GetModuleHandle(0);
120 wc.hIcon = ::LoadIcon(0, IDI_APPLICATION);
121 wc.hCursor = ::LoadCursor(0, IDC_ARROW);
122 wc.hbrBackground = brush;
123 wc.lpszMenuName = className;
124 wc.lpszClassName = className;
125 ::RegisterClass(&wc);
132 HMENU menuBar = CreateMenu();
134 {HMENU casc = CreatePopupMenu();
135 ::AppendMenu(menuBar,MF_POPUP,(UINT)casc,
"File");
141 {HMENU casc = CreatePopupMenu();
142 ::AppendMenu(menuBar,MF_POPUP,(UINT)casc,
"Etc");
148 "Set (G4) reduced wire frame");
150 "Set (G4) full wire frame");
152 "Visible mothers + invisible daughters");
154 "Visible mothers + visible daughters");
156 ::AppendMenu(casc,MF_STRING,
ID_ETC_STATS,
"Scene graph stats");}
158 {HMENU casc = CreatePopupMenu();
159 ::AppendMenu(menuBar,MF_POPUP,(UINT)casc,
"Help");
162 fShell = ::CreateWindow(className, shellName.c_str(),
163 WS_OVERLAPPEDWINDOW |
164 WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
165 CW_USEDEFAULT, CW_USEDEFAULT,
167 0,menuBar,::GetModuleHandle(0),0);
170 GetWindowRect((HWND)fShell,&wrect);
171 GetClientRect((HWND)fShell,&crect);
172 int ww = wrect.right-wrect.left;
173 int wh = wrect.bottom-wrect.top;
174 int cw = crect.right-crect.left;
175 int ch = crect.bottom-crect.top;
177 MoveWindow((HWND)fShell,wrect.left,wrect.top,width+ww-cw,height+wh-ch,
TRUE);
178 ::SetWindowLongPtr((HWND)fShell,GWLP_USERDATA,LONG(
this));
179 ::SetWindowText((HWND)fShell,shellName.c_str());
184 if(str!=0) wName = str;
189 const SbViewportRegion& vpRegion = fViewer->getViewportRegion();
193 fViewer->setSize(SbVec2s(width,height));
196 fViewer->saveHomePosition();
197 fViewer->setTitle(
fName);
204 fViewer->setTransparencyType(SoGLRenderAction::SORTED_OBJECT_ADD);