/// <summary> /// Before handling window messages, the sample framework passes incoming windows /// messages to the application through this callback function. If the application sets /// noFurtherProcessing to true, the sample framework will not process the message /// </summary> public IntPtr OnMsgProc(IntPtr hWnd, NativeMethods.WindowMessage msg, IntPtr wParam, IntPtr lParam, ref bool noFurtherProcessing) { // Give the dialog a chance to handle the message first if (!hud.MessageProc(hWnd, msg, wParam, lParam)) { if (!sampleUi.MessageProc(hWnd, msg, wParam, lParam)) { // Pass all remaining windows messages to camera so it can respond to user input camera.HandleMessages(hWnd, msg, wParam, lParam); } } return(IntPtr.Zero); }
/// <summary> /// Before handling window messages, the sample framework passes incoming windows /// messages to the application through this callback function. If the application sets /// noFurtherProcessing to true, the sample framework will not process the message /// </summary> public IntPtr OnMsgProc(IntPtr hWnd, NativeMethods.WindowMessage msg, IntPtr wParam, IntPtr lParam, ref bool noFurtherProcessing) { // Give the dialog a chance to handle the message first noFurtherProcessing = hud.MessageProc(hWnd, msg, wParam, lParam); if (noFurtherProcessing) { return(IntPtr.Zero); } if (camera != null) { camera.HandleMessages(hWnd, msg, wParam, lParam); } if (cursor3d != null) { cursor3d.HandleMessages(hWnd, msg, wParam, lParam); } return(IntPtr.Zero); }