Thanks guyz for helping. I have found a the solutions. The below code would solve my problem. BOOL MyPropPage::PreTranslateMessage(MSG* pMsg) { if( pMsg && (pMsg->message == WM_KEYDOWN)) { if (pMsg->wParam == VK_TAB) { CWnd* pNextControl = GetNextDlgTabItem(GetFocus(), (GetKeyState( VK_SHIFT ) & 0x8000)); if (pNextControl) GotoDlgCtrl(pNextControl);//pNextControl->SetFocus(); } } return CPropertyPage::PreTranslateMessage(pMsg); } Praveen
praveenpnayak
Posts
-
Problem by using Property Page as a Dialog -
Problem by using Property Page as a DialogI just wanted to reuse my code. I have the property page which I am adding it to the propertysheet in my app. I have commandline options for my app which will display only the property page as a dialog. Please let me know if you have any solution for this. Thanks :-). Praveen
-
Problem by using Property Page as a DialogHi, I am trying to use a property page as a dialog. When I bring up the property page using DoModal funtion, the controls in the property page do not get tabbed. TAB does not move the focus to the next control. Ex: CPropertyPage* pPage = new CPropertyPage(IDD_DIALOG1); pPage->DoModal(); If I use the same resource as a dialog, it works fine. I am able to tab to the next control in the dialog. Ex: CDialog* pDlg = new CDialog(IDD_DIALOG2); pDlg->DoModal(); Has anyone seen this behaviour before? Could I use property page as a dialog? Please let me know if you have any solutions for this. Thanks :-). Praveen
-
MessageBox from a service ...You should use SERVICE_INTERACTIVE_PROCESS in dwServiceType while creating the service (In CreateService()). (You can use also do this manually by going to services window and changing to property of the service and checking "Allow service to interact with desktop" under Log On As group. Praveen
-
FileSave dialog comes up with Default User settings when .exe is launched from a service using CreateProcess()thanks for the quick reply. But the problem here is that I do not have know who has logged in and what is his password. For CreateProcessWithLogonW, we need the username and the password. I thought of using CreateProcessAsUser. But there also I do not know how to get the token that represents the user. If you could help me in giving some piece of code, I would be greatful. Thanks again! Praveen
-
FileSave dialog comes up with Default User settings when .exe is launched from a service using CreateProcess()Hi, I have an exe being launching from a service using CreateProcess() call. As you know that the service is run in SYSTEM' (Default User') context and not in logged user' context. In my .exe, I have File Save option. When the FIle Save dialog comes up, it shows the desktop of the Default User and not of the user who has logged in. I want the File Save dialog to come up with the logged on User' profile (Desktop, My Documents, History, etc). Has anybody faced this problem earlier? Please let me know if you have faced this problem before and if you have solved the defect or if you have a workaround for this. Thanks. Praveen