|
thanx i think this is what i was looking for
i will try this and let u knw
thanx anyways
|
|
|
|
|
hello i tried the method u told me .. but its kindda not working for me.
i created event in Constructor (main thread)
intinally reset manualset true
::SetEvent[^] & ::WaitFOrSingleObject[^] before AfxBeginThread()
in threadProcFunction i called ::ResetEvent[^]
actually mine is GUI application (MFC) m able to stop all mouse and keyboard event by doing modelling of parent.
But in maximize and minimize view is being drawn again and again that i dnt want. thats why i want to wait my mainthread for a while. till worker thread does its work
plz help
thankx
|
|
|
|
|
I told you that it was no a good idea to use this technique in an MFC application.
_T("No name") wrote: But in maximize and minimize view is being drawn again and again that i dnt want. thats why i want to wait my mainthread for a while. till worker thread does its work
What do you mean by again and again ? Normally, in an MFC application, the window is only repainted on request (when a WM_PAINT message is sent). So if it is continuously repainting, you are doing something for that. If you want to stop the repainting, just stop doing that thing you are doing (sorry, can't be more accurate without seing any code).
And please, try to avoid txtspk and use correct phrase structures, your question will be much more understandable.
|
|
|
|
|
Hi,
i have a OK button click event..so when user clicked on OK i want to disable window (ie even user tries to press any other buttons or the same button it should not fire any events..)till the previous event is completed...
i used ..
GetDlgItem(IDOK)->EnableWindow(FALSE); in the brgining of the OK click event and
GetDlgItem(IDOK)->EnableWindow(TRUE); at the end of the event....
still im able to fire other events in between...
|
|
|
|
|
You are disabling only IDOK.
Disable the rest of the event buttons also.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Hello Pradeep,
Instead of disabling window controls, call LockWindowUpdate()[^] to freeze your window and once your operation is finished, call UnlockWindowUpdate()[^] to make it active again.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
ya even i have tried giving GetDlgItem(IDD_SELECTOR_DIALOG)->EnableWindow(FALSE); then im able to see error .....in BOOL CWnd::EnableWindow(Bool bEnable)
function in winocc.cpp..
error is Access violation reading location 0x00000020..
|
|
|
|
|
Hi,
I have created one application that will used play calls, i have developed this application using MCI (Media Control Interface). I am running my application on the machine which don't have sound cards, that time i am getting one error related MCI.
but that error message is not irrelevant, now i want to change that error message.
Or before starting my application i want to check whether that machine has sound cards installed or not.
Can any one help me out how to check about the sound cards.. It is very urgent requirement for me...
Thanks in advance...
|
|
|
|
|
|
Hi aks,
Thanks for your reply.. I have checked this function on my machine, which is having sound cards, i am able to get the return value is 6.
I have checked the same scenario on the machine which doesn't have sound cards, there i am getting the return value as 1.
I have tried to play mp3 song on that machine, but not able to play that.
I don;t know based on msdn help if no sound cards are enable,
this function should return 0 instead of non zero number...
Can you please explain me this scenario...?
Thanks in advance...
|
|
|
|
|
|
Hi to all,
1. I am developing a directshow filter in VC++ 2008 which will check loss of video/audio from input (which will be the output from MPEG-2 Demultiplexer filter). How can I check the loss or freeze of video/audio from input pid?
2. When there is no input to above filter, function "HRESULT Transform(IMediaSample *pMediaSample)" doesn't get called. In that case, how to transmit self-generated output from the filter? ex. If input video to filter is not present, I want to show error message on Video Renderer.
3. How to create a directshow filter in VC++ 2008 which will have (filter) custom events, such that filter user can use them?
4. DirectShow filter issues I am facing : a) I am not getting property page of "MPEG-2 Multicast Receiver" & "MPEG-2 Multicast Sender" filters in graphedit of my system. b) I am not getting video preview of first added "Video Renderer" filter in my system. Any solution to these issues?
I appreciate any and all comments and suggestions.
Thanks & Regards,
Aniket A. Salunkhe
|
|
|
|
|
Is there any compiler that gives more warnings then visual studio does
and i also want a software for Vc++ code indentation the Project is already built but want to indent its Source code properly so plz help.......
|
|
|
|
|
shaina2231 wrote: Is there any compiler that gives more warnings then visual studio does
Strange..
In visual studio itself if you change the warning level( in the project settings ), you can get more warning . Also there is Code Wizard[^] which can check your code aganist a set of rules such as rules in effective cpp and more effective cpp etc. Try it...
|
|
|
|
|
Plz tell me how to set highest warning level in project settings
|
|
|
|
|
ok i hv set warning level 4
|
|
|
|
|
Go into your project properties, "C/C++" category -> "General" -> "Warning level".
By the way, exploring hte properties of the project doesn't hurt, it will learn you a lot of things of what you can modify in the options of your project
|
|
|
|
|
char str[200];
GetData(str);
CString sTemp = str;
the CString assignment works fine here if first character of str is not empty.
If str[0] ='' str[1] = 'a' etc... then after assignment sTemp contains empty string why?
|
|
|
|
|
The constructor of CString only reads till the empty character, that's why.
You can however do
CopyMemory(sTemp.GetBuffer(count), str, count);
sTemp.ReleaseBuffer(count);
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
KASR1 wrote: str[0] =''
What do you mean with the above (i.e. it is NOT a valid statement, you know)?
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
[My articles]
|
|
|
|
|
str[0]='';
error C2137: empty character constant(vc6.0)
str[0]='\0'; is right
|
|
|
|
|
|
Hi,
I have a dialog based application. I have added the tree control on it. The tree implementation is done in separate class. I am getting the mouse click event in the class where I implemented tree control. I want the mouse click event to pass to dialog class i.e ..dlg to do some other operation. How to do this?
Thanks:-
Mike
|
|
|
|
|
You can insert below code to treectrl's mouse event function.
#include "YourDlg.h"
CYourDlg*dlg=(CYourDlg*)AfxGetMainWnd();
dlg->'Your function in your dialog class'
|
|
|
|
|
I define a class in a DLL(DLL1) and make a singleton using Loki library,for example:
class A
{
public:
......
void fun1();
void fun2();
.......
};
typedef Loki::<A> SingleA;
the singleton is used in DLL1.
I use SingleA::Instance() in another DLL(test dll) When I test DLL1,but all test failed.Why? How to resolve it?
|
|
|
|