|
No use chaning the font of the messagebox , coz we have litter control over it and other complication may come into the picture, Instead go for custom messagebox, i think it goes by the name XMessageBox here in codeproject.
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|
|
as i understood critical is used to control the access of different threads over a resource.
I performed the following experiment.
defined a critical section structure.
initialiaed the critical section
I then in a functino called
Entercriticalsection(...); followed by again
Entercriticalsection(...);
I thought it should threadlock in the second call, but its not locking the thread. am i missing something ?
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|
|
The critical section is already owned by the calling thread so the second call will slip trough.
Try it from two different threads instead.
And you must have a matching LeaveCritcalSection() call for each EnterCritcalSection().
/Magnus
- I don't necessarily agree with everything I say
|
|
|
|
|
Yeah figured it out, Thanx
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|
|
Friends, i hope that you are all aware of MSN messenger. There is an Edit Box in this application where we can type our nick. In this edit box we can also display Unicode characters.
So i just launched my Visual C++ 7.0 IDE and developed a dialog based application. I changed the settings from MBCS to UNICODE. Then i dropped a simple text box on it. Then i run the program.
But as such the text box is not accepting the Unicode characters. When i pasted the unicode characters on this dialog box, something like "??????" appeared.
Can anyone tell me how can i display unicode in edit box ?
|
|
|
|
|
They are called multilingual char not unicode char, unicode char supports multilingual chars. It depends on the language settings of ur machine to see the correct text.
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|
|
Friends,
I've a simple dialog based application. I dropped a Rich Edit control on a dialog. I run the program and it runs fine. As such the font typed in the rich edit box is the one provided by Windows as default font.
Now i want to display the text in rich edit box with my custom fonts settings. I got a routine to do so. And i want my font settings to be applied as default when the application runs. So i am calling my function of font change in OnInitDialog().
OnInitDialog()
{
m_myRichEdit.SetFont("Tahoma");
m_myrichEdit.SetFontSize(22);
}
But when i run my application, these settings are not getting applied Instead if i remove the code from OnInitDialog() and place it in OnOk() handler then it gets applied if the user presses the OK button.
But i want my settings to be applied immediately when the application runs i.e applied as default.
How can i do so ???
The routines are:
void CRichEditCtrlEx::SetFontName(CString sFontName)
{
CHARFORMAT cf = GetCharFormat();
ZeroMemory(cf.szFaceName, 32);
for (int i = 0; i <= sFontName.GetLength()-1; i++)
cf.szFaceName[i] = sFontName[i];
ZeroMemory(cf.szFaceName+ sFontName.GetLength(), 2);
cf.dwMask = CFM_FACE;
SetSelectionCharFormat(cf);
}
void CRichEditCtrlEx::SetFontSize(int nPointSize)
{
CHARFORMAT cf = GetCharFormat();
nPointSize *= 20;
cf.yHeight = nPointSize;
cf.dwMask = CFM_SIZE;
SetDefaultCharFormat(cf);
}
|
|
|
|
|
I take some picture round the sence,how can i combine these picture into panoramic image by programming .
xinhua xia
|
|
|
|
|
The best way to handle this is to give the user some intervention. Step-through each pair of images and display then side-by-side. Give the user an interface where they can click a point in picture #1 then click the corresponding overlap point in picture #2. Collect as many data points as you want to manipulate.
Then when you merge these two images, overlay those designated points, and weight the pixels surrounding those points so as to "stretch" or "shrink" those regions based on how close they are to the clicked points and how much stretching or shrinking you need to do. You can also adjust the transparency around those regions to blend the two images together. That usually helps with the transition.
Good luck. It's not as easy as just slapping 3 or 4 images next to one another.
|
|
|
|
|
I have an application running the background that shows an icon on tasktray, i am channing the icon depending on certain critaria but not always...
When the explorer is terminated using the taskmanager and restart the explorer the icons disapperar, but the application is running in the background.
is there any notification or message that will let me know to set the icon in the tasktray again?
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|
|
Mr.Prakash wrote:
is there any notification or message that will let me know to set the icon in the tasktray again?
Yup:
static const UINT SWM_TASKBAR_CREATED = RegisterWindowMessage(_T("TaskbarCreated"));
Listen for this message (in MFC, use the ON_REGISTERED_MESSAGE() macro in your message map), and re-add the icon when it is recieved.
How do you move in a world of fog, That's always changing things?
Makes me wish that i could be a dog, When i see the price that you pay.
|
|
|
|
|
Thank,
P.R.A.K.A.S.H
|
|
|
|
|
HI Prakash!
In one of the message U told that U have an application which runs in Background. I also need some program[Win32] to run in Background and monitors system activity. In exact word I should be able to know, when say user has started some exe (ex.Yahoo messenger executable). Right now I am using application which uses EnumProcess API to obtain the handle of all running process.
It should work for Win98 as well as for WinNT. Hence I think writing service is not a good idea.Any Suggestion.
And my god U are turning out to be answering machine. Whole page is filled with U. Great going chap.
Cheers!!
|
|
|
|
|
Yeah, i didnt make any service, all i made was a normal win32 application, created the window and hide the windows using ShowWindow(hwnd,SW_HIDE);
Thats it, the window monitors all the system messages, i dont know wheather you will get an event for file execution.
The hiden exefile works fine, except that it needs to started from the startup menu or by some other methods i.e entry in the registry (i dont know rite now)
Hope you got the ans.
bye.
P.R.A.K.A.S.H
|
|
|
|
|
hello friends
i am working with local speech engine project.
for this i want chopping and fading algorithms to
apply.If any one knows pls help me.
thanks in advance
|
|
|
|
|
Hello,
i have simple question, think of a common prototype like
int FuncName(int var);
now, what does it mean if i put a conclusive "=0" on it, like
int FuncName(int var) = 0;
Thanks in advance!
|
|
|
|
|
it gave me this error
error C2072: 'FuncName' : initialization of a function
this is declaration of a pure function of a class. that means that the implementation of the method is not in this class and must be implemented in the derived class.
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|
|
Thanks, but ..
let's think that it is already implemented in a derived class, i only want to know what i does!!
|
|
|
|
|
Its a way to declare that the base class will not implement the function the derived class have to do it before they make object of the class.
plus pure virtual functions in the base class means you cant make an object of the baseclass.
There are lot of other concepts behind pure virtual functions, read some good book on it to be more clear.
pure virtual functions are the foundations of COM
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|
|
Thank you for your help!
But, please delete your citation of Adolf Hitler, there's nothing good associated with Adolf Hitler! It my be funny if you tell the citation once, but it is absolutely wrong to use it as a footnote!
|
|
|
|
|
I agree he was worst living being ever walked on the earth, but you should agree with me that he was the Best leader ever walked on the earth to motivate his people,
Dont worry i will remove it soon I keep changing my sig every now n then.
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|
|
Mr.Prakash wrote:
...you should agree with me that he was the Best leader ever walked on the earth to motivate his people,
If you consider fear to be a motivator. A better leader uses love and compassion, never force. Hands down, the title of best-leader-ever-walked-on-the-earth-to-motivate-his-people goes to Christ Jesus.
|
|
|
|
|
DavidCrow wrote:
Hands down, the title of best-leader-ever-walked-on-the-earth-to-motivate-his-people goes to Christ Jesus.
correct.
Some ppl will say he never existed that depends on beliver and non beliver.
ok about Hitler
He alone cannot spread fear, He had loyal ppl to do that, and he motivated ppl to be loyal to him. Its well know that he could move ppl emotionally with his speech.
Fear was for nor german ppl.
P.R.A.K.A.S.H
|
|
|
|
|
Mr.Prakash wrote:
Its a way to declare that the base class will not implement the function the derived class have to do it before they make object of the class.
Though the base class can still provide an implementation that derived classes can use.
Mr.Prakash wrote:
pure virtual functions in the base class means you cant make an object of the baseclass.
Correct.
Kevin
|
|
|
|
|
Kevin McFarlane wrote:
Though the base class can still provide an implementation that derived classes can use.
are you sure about pure virtual functions ?
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|