|
yes my edit box has the focus , but when I click other button its Onclick handler shouldnot execute as Is the Funtionality of the DoModal.i.e when we DoModal until we close the dialog no other function can be done on other windows.
I think you got my point
As I specified I have a main dialog box with two buttons.
On each button click iam invoking a DoModal Dialog Box.
When I click a button,Until I close the DoModal I cant click the Other button.
But for me I could click the Other button.
Today is a gift, that's why it is called the present.
|
|
|
|
|
can you please show a piece of code ? (don't forget to use the <pre> tag for code samples)
|
|
|
|
|
On one of the Button Click domodal dialog appears whose class is CCreateProfileDlg
void CCreateProfileDlg::OnBnClickedOk()
{
UpdateData(TRUE);
if(m_strProfileName.IsEmpty())
{
AfxMessageBox(_T("Profile Name must be Entered"));
GetDlgItem(IDC_EDIT_PROFILE_NAME)->SetFocus();
return;
}
---------
--------------
OnOK();
}
BOOL CCreateProfileDlg::OnInitDialog()
{
CDialog::OnInitDialog();
this->PostMessage(WM_MOVE_PROFILEDIALOG,0,0);
return TRUE;
}
LRESULT CCreateProfileDlg::OnMoveProfileDialog(WPARAM,LPARAM)
{
this->MoveWindow(275,325,400,280);
return TRUE;
}
-------------------------------------------------------------------
in my Maindialog class
in .h
CCreateProfileDlg m_profileSettingsDlg;
in .cpp
void CEFCHomeDlg::ClickedProfileCreate()
{
if(m_profileSettingsDlg.DoModal() == IDOK)
{
}
}
-------------------------------------------
On other Button Click also a domodal dialog appears whose class has similar code as of CCreateProfileDlg.
-------------------------------------------------
Actually iam using ActiveX controls in place of Buttons
<div class="ForumSig">Today is a gift, that's why it is called the present.</div>
|
|
|
|
|
narayanagvs wrote: if(m_strProfileName.IsEmpty())
{
AfxMessageBox(_T("Profile Name must be Entered"));
GetDlgItem(IDC_EDIT_PROFILE_NAME)->SetFocus();
return;
}
OnOK();
A better design would be to disable the OK button until m_strProfileName is non-empty.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I want to open file with my program using right click at that file.
(similar as when I want to scan virus,I just right click and select program from pop-up menu)
Anybody know how I write the code
|
|
|
|
|
You mean a "right click" on the file in the windows explorer view, where you can select "open with" or similar the application?
--> thats a registry "hack"
|
|
|
|
|
|
|
i know, but your link is written at the bottom of the article i provided...
you start reading by the beginning, don't you ?!
|
|
|
|
|
toxcct wrote:
you start reading by the beginning, don't you ?!
no he is chinese
<div class='ForumSig'>"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you </div>
|
|
|
|
|
Dear All,
I have a Dll that has one dialog box. I am calling this dialog box from an application.
once this dialog box comes up, i can not close it.
How can i close this ?
Thanks.
|
|
|
|
|
|
Do you want to close of your program?
|
|
|
|
|
Sakthiu wrote: How can i close this ?
Programmatically, or via the UI?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Sakthiu wrote:
once this dialog box comes up, i can not close it.
is it get hang after getting visibled
<div class='ForumSig'>"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you </div>
|
|
|
|
|
Hello,
Can anyone tell me how the coordinate system works for a dialog window. Is the origin at the upper left of the Dialog window?
I have an application that will require me to use X, Y coordinate data designed for a Dos window and apply it to a Dialog window, in a Dialog application.
Also, can you open multiple Dos windows within a Dialog application??... if so it may make it easier for me to use the older style code.
Jerry
|
|
|
|
|
The Co-ordinate for the dialog window has its origin at
the Left-Top corner of the dialog window(dialog box)
As far as i understand u will have to convert
the co-ordinates form Dos-window to Dialog Window.
Opening multiple window ? i dont know what u mean
Take care
Vikas Amin
EATON
PUNE
|
|
|
|
|
jerry1211a wrote:
Also, can you open multiple Dos windows within a Dialog application??...
Yes, you can have more than one command-prompt window open at the same time.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
Hi all.
I want to add number of strings in a list box plus a check box infront of each string.
How I can do this?
Thanks
Rakesh Thakur
|
|
|
|
|
Use CListCtrl instead and then call CListCtrl::SetExtendedStyle(LVS_EX_CHECKBOXES)
Hope this helps
|
|
|
|
|
use CCheckListBox class
nave
|
|
|
|
|
Did you search on codeproject I think I saw examples
|
|
|
|
|
Rakesh_Thakur wrote:
Hi all.
I want to add number of strings in a list box plus a check box infront of each string.
it is not possible in the Common CListBox class, unless and until you subclass it handle CheckBox or you can see reply by MR. BadJerry
<div class='ForumSig'>"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you </div>
|
|
|
|
|
I want to write reg value in HKLM in windows Vista. But RegOpenKeyEx() API is failing. I am using access rights as KEY_READ | KEY_WRITE. Please give some suggestion.
|
|
|
|