Hide window
-
Dear all, I have dialog with two buttons(one is for automatic logon and one is for UI logon). when the user selects the UI logon the new dialog pops up with prompting username and password ,after user enter this data he clicks ok button to enter. But when press automatic logon ,i modified code to fill the default username and password (in username and password edit box),after this generate IDOK notification ,So that its logs automatically with out UI. But what i need is to hide this popup dialog(which prompts for username and password ) which comes when user press the automatic logon button( i tried to hide this window by using showwindow(hwnd,SW_HIDE) in WM_INIT notification (case WM_INITIALISE: ) in dialog procedure ,but this window flashs and disappears,Is their any way to HIDE this without showing this dialog to user when he press automatic logon)
Manjunath S GESL Bangalore
-
Dear all, I have dialog with two buttons(one is for automatic logon and one is for UI logon). when the user selects the UI logon the new dialog pops up with prompting username and password ,after user enter this data he clicks ok button to enter. But when press automatic logon ,i modified code to fill the default username and password (in username and password edit box),after this generate IDOK notification ,So that its logs automatically with out UI. But what i need is to hide this popup dialog(which prompts for username and password ) which comes when user press the automatic logon button( i tried to hide this window by using showwindow(hwnd,SW_HIDE) in WM_INIT notification (case WM_INITIALISE: ) in dialog procedure ,but this window flashs and disappears,Is their any way to HIDE this without showing this dialog to user when he press automatic logon)
Manjunath S GESL Bangalore
It would be cleaner if you could separate the logic of window creation from the logic of user input validation. This way, when automatical logging in, you only call the validation logic, without creating the window. I assume that you know the difference between instantiating a C++ window object and actually creating a window. If not, I'll explain more.
Best, Jun
-
Dear all, I have dialog with two buttons(one is for automatic logon and one is for UI logon). when the user selects the UI logon the new dialog pops up with prompting username and password ,after user enter this data he clicks ok button to enter. But when press automatic logon ,i modified code to fill the default username and password (in username and password edit box),after this generate IDOK notification ,So that its logs automatically with out UI. But what i need is to hide this popup dialog(which prompts for username and password ) which comes when user press the automatic logon button( i tried to hide this window by using showwindow(hwnd,SW_HIDE) in WM_INIT notification (case WM_INITIALISE: ) in dialog procedure ,but this window flashs and disappears,Is their any way to HIDE this without showing this dialog to user when he press automatic logon)
Manjunath S GESL Bangalore
Quickes way: Setup the dialog fields in OnInitDialog() and then call OnOk or OnBnClickedOk() ...it's a quick thing but i don't like it verry much. A better way is to process the login info in a method not depending on UI. Just pass the login fields as params to your method. In this method, display the dialog if you need to (ie: your user did not check the autologin option or something). The best thing about this is that you can call the same method in your UI validation procedure afterwards.