|
Post a message to the main thread and let it to do the stuff.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
please clarify , what mwessage and param that i used in Postmemessage
|
|
|
|
|
Typically you do something like
#define WM_MY_CHANGE_CURSOR (WM_APP+1)
In a header file included both by your main thread source file and by the worker thread one.
Then, when appropriate (whenever you need to change the cursor), send the message from the worker thread to the main one, for instance
PostMessage(hWnd, WM_MY_CHANGE_CURSOR, wParam, lParam);
Where hWnd is the handle of the main window and wParam, lParam meanings are freely choosen by you (e.g. wParam maybe the index of the intended new cursor).
Finally, you properly handle the message (to do the graphics stuff) in the main thread, for instance using MFC ON_MESSAGE mechanism (see [^]).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Hallo everybody,
I am working on a MDI Application with 2 Child windows. What I want is:
1. the first child frame is always shown in MAXIMIZED mode.
2. the size of the second child frame is set to be smaller than MDI Main Frame.
My problem is, if I open the first child frame in MAXIMIZED mode and then open the second child frame in NORMAL mode, the first child frame will be automatically restored.
Can I prevent it?
Actually I need a popup window with such features: always top-Most in z-dimension, dynamically resizable. and the first child window in background will not be resored when the popup window is displayed.
Can I still use MDI-Child frame, or I have to create a frame window dynamically?
thanks a lot!
with best regards,
Li
modified on Tuesday, March 11, 2008 7:35 AM
|
|
|
|
|
Hi all,
i m working on SDI type application of VC++2005.
in my application i m using a "Animation Control" for show video files.
and i m using MCIWnd Macros for playing video.
when i resize my application or it overlapped with any other dilog box or any thing else playing video is totally disappered. Although slider control moves,sound is also continue but only video not display.
Please anyone can help me for this.
Thanks in advance.
|
|
|
|
|
v.j wrote: and i m using MCIWnd Macros for playing video.
Who is the parent window of the MCIWnd ?
|
|
|
|
|
i cant understand ur questiom MCIWnd is a funtion of mci which are use for multemedia.
|
|
|
|
|
My question was while creating the MCI window ( using the MCIWndCreate() ), which window did u specify as the parent...? Actaully u should specify the handle of the view class..
|
|
|
|
|
i m using this statement for MCIWndCreate.
where: CString m_Path;//for input file's path.
CAnimateCtrl m_Screen;//variable of Animation control.
HWND m_Video=MCIWndCreate(m_Screen.GetSafeHwnd(),AfxGetInstanceHandle(),
WS_CHILD| WS_VISIBLE|MCIWNDF_NOMENU| MCIWNDF_NOTIFYALL| MCIWNDF_NOPLAYBAR,m_Path);
|
|
|
|
|
v.j wrote: CAnimateCtrl m_Screen;//variable of Animation control.
HWND m_Video=MCIWndCreate(m_Screen.GetSafeHwnd(),AfxGetInstanceHandle(),
Why r you using the CAnimateCtrl? more over a staement like CAnimateCtrl m_Screen will not create an animate control and because of that m_Screen.GetSafeHwnd() always returns 0. So instead of m_Screen.GetSafeHwnd(), pass the handle of the view class.
|
|
|
|
|
please tell me how can i get handle of view class.
here i m using a CFormView type of class.
|
|
|
|
|
v.j wrote: please tell me how can i get handle of view class.
From which class you are calling the MCIWndCreate() function. if it is from the Formview iteslf, you can get the handle using the GetSafeHandle() or simple use the m_hWnd variable( both this function and variable are members of CWnd and CFormView is indirectly derived from that class ). If you are creating the MCI wnd from some other class, get the view class pointer and the call GetSafeHandle() of that pointer.
|
|
|
|
|
Actully i have already try this but because of this video is play in my whole form and my problem is also occur.
i want to play video in selected window like, Window Media player,Winamp,Real Player,or VLC Player end so on.
|
|
|
|
|
i have noticed one more thing.
this problem is not occur in case of .avi files.
|
|
|
|
|
I never used mci for playing files, what about directshow or WMP activeX control.
|
|
|
|
|
i need the coding to implement dijkstra algorithm in vc++.......
|
|
|
|
|
Is this your homework?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</a>
|
|
|
|
|
|
Nice
|
|
|
|
|
|
Rajkumar R wrote: And I found a good prerequisite [^] recently.
You liked that?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Not Sure, But I don't have reason to dislike it.
|
|
|
|
|
Did you search on the Net?
|
|
|
|
|
Good Luck!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Hi all...
How can i change only day of week on button click??
I'm using DateTimePicker and in long date format i'm printing day with the help of "dddd"... How can i change day on button click??
i.e Increment by one day...
SendMessage(GetDlgItem(hdlg,IDC_DATETIMEPICKER6),DTM_SETFORMAT,(WPARAM) wParam,(LPARAM) (LPCTSTR) lpszFormat3);
and in "lpszFormat3" i'm writing this..
CHAR lpszFormat3[MAX_PATH] = "HH':'mm 'every'dddd";
I need to change "dddd" on button click...
How can i do this??
Thanks..
Ash..
|
|
|
|