win32 dialogbox
-
i am calling win32 dialogbox from dll using dialogbox() method but it behaves like modeless dialog how can solve this problem and how can initialize maximise dialogbox in win32
-
i am calling win32 dialogbox from dll using dialogbox() method but it behaves like modeless dialog how can solve this problem and how can initialize maximise dialogbox in win32
-
i am calling win32 dialogbox from dll using dialogbox() method but it behaves like modeless dialog how can solve this problem and how can initialize maximise dialogbox in win32
Why do you say that it behaves like a modeless dialog? Are you able to switch back to the parent dialog when the modal dialog is shown?
«_Superman_» _I love work. It gives me something to do between weekends.
-
Why do you say that it behaves like a modeless dialog? Are you able to switch back to the parent dialog when the modal dialog is shown?
«_Superman_» _I love work. It gives me something to do between weekends.
i am calling that dialogbox from windows7 login screen by clicking one tile image .then it displays .but if i click out side the dialog then it goes to back.i don't want that please help me i past code HRESULT PasswordResetCredential::SetSelected(BOOL* pbAutoLogon) { *pbAutoLogon = FALSE; //Ilantus fetchPortalURL((WCHAR)""); return S_FALSE; } void fetchPortalURL(WCHAR username) { DialogBox((HINSTANCE)g_hinst, MAKEINTRESOURCE(IDD_DIALOG1),NULL, InputBox_WndProc); }
-
i am calling that dialogbox from windows7 login screen by clicking one tile image .then it displays .but if i click out side the dialog then it goes to back.i don't want that please help me i past code HRESULT PasswordResetCredential::SetSelected(BOOL* pbAutoLogon) { *pbAutoLogon = FALSE; //Ilantus fetchPortalURL((WCHAR)""); return S_FALSE; } void fetchPortalURL(WCHAR username) { DialogBox((HINSTANCE)g_hinst, MAKEINTRESOURCE(IDD_DIALOG1),NULL, InputBox_WndProc); }
The third parameter which is the parent is given as NULL. Set the parent to the desired window to make it modal.
«_Superman_» _I love work. It gives me something to do between weekends.
-
The third parameter which is the parent is given as NULL. Set the parent to the desired window to make it modal.
«_Superman_» _I love work. It gives me something to do between weekends.
hi, santosh thanks for reply .how to do that.please guide me.
-
The third parameter which is the parent is given as NULL. Set the parent to the desired window to make it modal.
«_Superman_» _I love work. It gives me something to do between weekends.
santosh i set that parent windo it is not working. thanks venkatesh
-
santosh i set that parent windo it is not working. thanks venkatesh
Post the code please.
«_Superman_» _I love work. It gives me something to do between weekends.
-
Post the code please.
«_Superman_» _I love work. It gives me something to do between weekends.
hi , please check this code; Thanks venkatesh // // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A // PARTICULAR PURPOSE. // // Copyright (c) 2012 Ilantus Technologies Pvt. Ltd.. All rights reserved. // // #ifndef WIN32_NO_STATUS #include #define WIN32_NO_STATUS #endif #include #include "PasswordResetCredential.h" #include "guid.h" #include "resource.h" // Added by Suren & Gopi #include #include #include #include #include "ax.h" extern HINSTANCE hInstance; typedef int (WINAPI * PFRUNGATEFRAMEWORKPWDRESET) (HWND, PWSTR, PWSTR, PWSTR); // PasswordResetCredential //////////////////////////////////////////////////////// //venkat //HMODULE hInst; char IB_res[10]; double defaultValue = 0; HWND hwebf; bool loaded, has_clicked, isquit=false; INT_PTR CALLBACK InputBox_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch(msg) { case WM_INITDIALOG: { char url[1024] = {0};//venkat come HKEY keyHandle = 0; DWORD size = sizeof(url); DWORD type=0; ///////// ShowWindow(hwnd,SW_SHOWMAXIMIZED); HWND hk = GetDlgItem(hwnd,IDC_CUSTOM1); RECT rc = {0}; GetClientRect(hwnd,&rc); SetWindowPos(hk,0,0,0,rc.right,rc.bottom,SWP_SHOWWINDOW); //HINSTANCE hInstance1; // HICON hIcon; //hIcon =(HICON)LoadImage( hInstance1, // MAKEINTRESOURCE(IDI_ICON1), // IMAGE_ICON, // GetSystemMetrics(SM_CXSMICON), // GetSystemMetrics(SM_CYSMICON), // 0); // if(hIcon) // { // SendMessage(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)hIcon); // } ///////// HWND hX = GetDlgItem(hwnd,IDC_CUSTOM1); SendMessage(hX,AX_INPLACE,1,0); LONG ret = RegOpenKey(HKEY_LOCAL_MACHINE,L"SOFTWARE\\Ilantus\\PMP", &keyHandle); if(ret == ERROR_SUCCESS) { RegQueryValueEx( keyHandle, L"url", 0, &type, (BYTE*)url, &size); } RegCloseKey(keyHandle); IWebBrowser2* wb = 0; SendMessage(hX,AX_QUERYINTERFACE,(WPARAM)&IID_IWebBrowser2,(LPARAM)&wb); if (wb) { wb->Navigate((BSTR)url,0,0,0,0); wb->Release(); } return TRUE; } //case WM_RBUTTONDBLCLK: // { // ShowWindow(hwnd,SW_SHOWMAXIMIZED); // return TRUE; // } case WM_LB
-
hi , please check this code; Thanks venkatesh // // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A // PARTICULAR PURPOSE. // // Copyright (c) 2012 Ilantus Technologies Pvt. Ltd.. All rights reserved. // // #ifndef WIN32_NO_STATUS #include #define WIN32_NO_STATUS #endif #include #include "PasswordResetCredential.h" #include "guid.h" #include "resource.h" // Added by Suren & Gopi #include #include #include #include #include "ax.h" extern HINSTANCE hInstance; typedef int (WINAPI * PFRUNGATEFRAMEWORKPWDRESET) (HWND, PWSTR, PWSTR, PWSTR); // PasswordResetCredential //////////////////////////////////////////////////////// //venkat //HMODULE hInst; char IB_res[10]; double defaultValue = 0; HWND hwebf; bool loaded, has_clicked, isquit=false; INT_PTR CALLBACK InputBox_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch(msg) { case WM_INITDIALOG: { char url[1024] = {0};//venkat come HKEY keyHandle = 0; DWORD size = sizeof(url); DWORD type=0; ///////// ShowWindow(hwnd,SW_SHOWMAXIMIZED); HWND hk = GetDlgItem(hwnd,IDC_CUSTOM1); RECT rc = {0}; GetClientRect(hwnd,&rc); SetWindowPos(hk,0,0,0,rc.right,rc.bottom,SWP_SHOWWINDOW); //HINSTANCE hInstance1; // HICON hIcon; //hIcon =(HICON)LoadImage( hInstance1, // MAKEINTRESOURCE(IDI_ICON1), // IMAGE_ICON, // GetSystemMetrics(SM_CXSMICON), // GetSystemMetrics(SM_CYSMICON), // 0); // if(hIcon) // { // SendMessage(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)hIcon); // } ///////// HWND hX = GetDlgItem(hwnd,IDC_CUSTOM1); SendMessage(hX,AX_INPLACE,1,0); LONG ret = RegOpenKey(HKEY_LOCAL_MACHINE,L"SOFTWARE\\Ilantus\\PMP", &keyHandle); if(ret == ERROR_SUCCESS) { RegQueryValueEx( keyHandle, L"url", 0, &type, (BYTE*)url, &size); } RegCloseKey(keyHandle); IWebBrowser2* wb = 0; SendMessage(hX,AX_QUERYINTERFACE,(WPARAM)&IID_IWebBrowser2,(LPARAM)&wb); if (wb) { wb->Navigate((BSTR)url,0,0,0,0); wb->Release(); } return TRUE; } //case WM_RBUTTONDBLCLK: // { // ShowWindow(hwnd,SW_SHOWMAXIMIZED); // return TRUE; // } case WM_LB
The third parameter to
DialogBox
is stillNULL
-DialogBox((HINSTANCE)g_hinst, MAKEINTRESOURCE(IDD_DIALOG1),**NULL**, InputBox_WndProc);
You need to specify the handle to the parent window here.«_Superman_» _I love work. It gives me something to do between weekends.