Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. win32 dialogbox

win32 dialogbox

Scheduled Pinned Locked Moved C / C++ / MFC
help
10 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    venkatesh52867
    wrote on last edited by
    #1

    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

    J _ 2 Replies Last reply
    0
    • V venkatesh52867

      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

      J Offline
      J Offline
      Jibesh
      wrote on last edited by
      #2

      Try this MSDN link[^]

      Jibesh V P

      1 Reply Last reply
      0
      • V venkatesh52867

        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

        _ Offline
        _ Offline
        _Superman_
        wrote on last edited by
        #3

        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.

        _Microsoft MVP (Visual C++) (October 2009 - September 2013)

        Polymorphism in C

        V 1 Reply Last reply
        0
        • _ _Superman_

          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.

          _Microsoft MVP (Visual C++) (October 2009 - September 2013)

          Polymorphism in C

          V Offline
          V Offline
          venkatesh52867
          wrote on last edited by
          #4

          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); }

          _ 1 Reply Last reply
          0
          • V venkatesh52867

            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); }

            _ Offline
            _ Offline
            _Superman_
            wrote on last edited by
            #5

            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.

            _Microsoft MVP (Visual C++) (October 2009 - September 2013)

            Polymorphism in C

            V 2 Replies Last reply
            0
            • _ _Superman_

              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.

              _Microsoft MVP (Visual C++) (October 2009 - September 2013)

              Polymorphism in C

              V Offline
              V Offline
              venkatesh52867
              wrote on last edited by
              #6

              hi, santosh thanks for reply .how to do that.please guide me.

              1 Reply Last reply
              0
              • _ _Superman_

                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.

                _Microsoft MVP (Visual C++) (October 2009 - September 2013)

                Polymorphism in C

                V Offline
                V Offline
                venkatesh52867
                wrote on last edited by
                #7

                santosh i set that parent windo it is not working. thanks venkatesh

                _ 1 Reply Last reply
                0
                • V venkatesh52867

                  santosh i set that parent windo it is not working. thanks venkatesh

                  _ Offline
                  _ Offline
                  _Superman_
                  wrote on last edited by
                  #8

                  Post the code please.

                  «_Superman_»  _I love work. It gives me something to do between weekends.

                  _Microsoft MVP (Visual C++) (October 2009 - September 2013)

                  Polymorphism in C

                  V 1 Reply Last reply
                  0
                  • _ _Superman_

                    Post the code please.

                    «_Superman_»  _I love work. It gives me something to do between weekends.

                    _Microsoft MVP (Visual C++) (October 2009 - September 2013)

                    Polymorphism in C

                    V Offline
                    V Offline
                    venkatesh52867
                    wrote on last edited by
                    #9

                    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

                    _ 1 Reply Last reply
                    0
                    • V venkatesh52867

                      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

                      _ Offline
                      _ Offline
                      _Superman_
                      wrote on last edited by
                      #10

                      The third parameter to DialogBox is still NULL - 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.

                      _Microsoft MVP (Visual C++) (October 2009 - September 2013)

                      Polymorphism in C

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups