|
Make a dialog box as you want. Now create this dialog using DoModal() in a thread function. Just initiate that thread when you want to show that dialog and kill the thread when you want to make the dialog disappeared.
Good luck
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
for this purpose i think you need to create your dialog instead messagebox
whitesky
|
|
|
|
|
See here.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Dear all,
I am doing a list box project but it need to show non-english word such as Japanese and German. How can the list box support on it???? Because it show "$de2&" now... THx a lot
|
|
|
|
|
Unicode .... :->
Maxwell Chen
|
|
|
|
|
Add unicode support for your application
|
|
|
|
|
|
my word is unicode already.....I don't know why it can't display in the list box????
|
|
|
|
|
How you use them?
whitesky
|
|
|
|
|
hi
i want to know that how spin control can be attached to its buddy that is some edit control
and i want to know that CWnd *pParent is used in dialpog based. if we use pParent in pWndbuddy in followng statement:
m_spin.SetBuddy(CWnd *pWndbuddy)
then it gives error so tellme wat can i use here.
Ashish Dogra
MCA
Noida
|
|
|
|
|
You can set the buddy for the spin control as
//m_spinCtrl is variable for the spin control and m_editctrl for edit box
m_spinCtrl .SetBuddy (m_editctrl.GetWindow(IDC_EDIT1));
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
sir thanks for reply
but it does not work as i use this in oninitdialog function
m_spin.SetBuddy(m_edit.GetWindow(IDC_EDIT2));
whwre m_spin is variable of spin control
and m_edit is variable of edit control.
Ashish Dogra
MCA
Noida
|
|
|
|
|
You need to override the function for OnDeltaposSpin1:
void CTestDlg::OnDeltaposSpin1(NMHDR *pNMHDR, LRESULT *pResult)
{
LPNMUPDOWN pNMUpDown = reinterpret_cast<LPNMUPDOWN>(pNMHDR);
CString s;s.Format ("%d",pNMUpDown->iPos );
m_edit.SetWindowText (s);
*pResult = 0;
}
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
sir where is this OnDeltaposSpin1 function
as this is not in the classwizard or message handler
Ashish Dogra
MCA
Noida
|
|
|
|
|
In message map add
ON_NOTIFY(UDN_DELTAPOS, IDC_SPIN1, OnDeltaposSpin1)
//add in the header file
afx_msg void OnDeltaposSpin1(NMHDR *pNMHDR, LRESULT *pResult);
and copy and paste the code for the implementation of the function as in my above post.
You can right click on the spin control if you are working with an MFC Dialog based application and then go to property window to implement this function.
Declaring functions/definitions are more error prone if they are done by hand and are not recommended.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
thanks sir
can we use this methode to add function
and why this function is not in the message handler
Ashish Dogra
MCA
Noida
|
|
|
|
|
Yes we can use this method to add a function but it is not recommended as with this method there are more chances of committing an error and then creating troubles.You can't remember the prototypes for all the handler's etc.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
When you Rclick in Spin control and use Event HAndle then you can see UDN_DELTAPOS
whitesky
|
|
|
|
|
hi can explain clearly ..
and if u r using the exact code in ur program then it won't work,
remove the CWnd* and use pWndbuddy alone
|
|
|
|
|
ya thanks
as in many function that include CWnd pointer
and i check in application the CWnd pointer is *pParent
what when i use this one it gives error
Ashish Dogra
MCA
Noida
|
|
|
|
|
I have SetWinEventHook for my MFC application, but the WinEventProc is not getting called?
g_hWinEvent = SetWinEventHook(EVENT_MIN,
EVENT_MAX,
NULL,
(WINEVENTPROC)WinEventProc,
GetCurrentProcessId(),
GetWindowThreadProcessId(hWnd,0),
WINEVENT_SKIPOWNPROCESS);
Thanks in advance,
Abhishake Lahare.
|
|
|
|
|
See Here[^] maybe it is some helpful to you
whitesky
|
|
|
|
|
If I want to limit the maximized size of a window (dialog based) while the user clicks the Maximize button, which WM_ message or CWnd member can I use? Thanks!
Maxwell Chen
|
|
|
|
|
Maxwell Chen wrote: If I want to limit the maximized size of a window (dialog based) while the user clicks the Maximize button, which WM_ message or CWnd member can I use? Thanks!
WM_GETMINMAXINFO
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Nibu babu thomas wrote: WM_GETMINMAXINFO
Thank you!
-- modified at 5:23 Friday 14th July, 2006
Thank you! It's working.
Maxwell Chen
|
|
|
|