|
Hi..All
I want to remove menubar from my bitmap,
How can i overcome this probleb???
Thanks
There Is Nothing Right & Wrong
|
|
|
|
|
Hi,
I need to convert a UTF8 string to its equavalant unicode number.
For ex. for character ứ its unicode no. is 7913.
Can anybody suggest How to do that.
Regs
Vinet
Vineet Kumar Singhal
Sr.Software Engineer
Mumbai
Tough Time Never last, but Tough People do.
|
|
|
|
|
What string class are you using?
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.
|
|
|
|
|
WideCharToMultiByte()
MultiByteToWideChar()
helps to convert 1byte -> 2byte and other way round data representation things
|
|
|
|
|
Hi all
I have not found a suitable place to ask this quesion . pls excuse me if wrong :
How to delete RAS entries manually in WinXP PC ?
redindian
|
|
|
|
|
dharani wrote: RAS entries
|
|
|
|
|
Mr Intelligent
Thanks for telling me about google ...
wow ...I enter R A S and it shows me 100s of web pages .
Which page should I see now ?
Pls tell me ..I have short sight and long sight and also special sight which does not see things after 6 PM ....
redindian
|
|
|
|
|
People are not that stupid like you to have posted a question without googling. I can also see couple of your careless responses where you keep directing people to google. If you know the answer share it with them else keep your mouth shut and let others answer .
redindian
|
|
|
|
|
this is my signature... i didn't answered to you to google (if you're not that smart to figure it by yourself)
i asked you to give more precision, because you question is totally naked
oh also, as you are that smart, couldn't you simply edit your message instead of posting 2 ones at 3 minutes each
|
|
|
|
|
If you do not know what I meant by "RAS entries" its better you do not ask for clarification . Coz if a person does not have sufficient knowledge about Remote Access Server there is no use telling him about it in order to get an answer .
I hope you get the point .
redindian
|
|
|
|
|
you perfect idiot. i never intended to go against you. now, know that i won't try to answer your questions, the simpler they can be, because you seem to have some troubles to explain yourself. also, if you know the world better than anyone, how don't you know how to solve your bloody RAS problem ?
let me notify you about one thing mister "Deletion of RAS entries" ; ok, i didn't know about YOUR meaning of RAS, simply because it meant something different for me, and as i was sure at all about what it meant for you, i prefered ask for precision. and know that "Remote Access Server" is not a "must" for every applications, so, no need to know about the meaning of 3 damn letters.
now, good luck for finding someone to do your whole work without any starting information about what you already tried... you simply suck dude.
|
|
|
|
|
toxcct wrote: dharani wrote:
RAS entries
Hey tox, just google for RAS if you don't know what it is
Rage goes shelter himslef and waits for the stones
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
Have you tried netsh ras at a command prompt? There's all sorts of things you can do, including deleting entries.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi David
Thanks . I got it now
redindian
|
|
|
|
|
Hello to all,
I have my application developed is C++/MFC using Visual Studio 6.0. I am using a RichEdit Control (CRichEditCtrl), and this is a chat window when different users put in their chat messages.
and for some cases, i need to highlight the chat messages with the background set to RED, in case of certain special users only.
The problem i am facing here is that I am unable to set the background text to RED.
Initial code was developed using CHARFORMAT, and now I am using CHARFORMAT2.
But with this also, the background text doesnot get set.
And very surprising to note was that I was not able to set any additional parameters that are defined in CHARFORMAT2 over CHARFORMAT.
Any help would be highly appreciated.
Thanks and regards,
Anwar.
|
|
|
|
|
Use method AfxInitRichEdit2 instead of AfxInitRichEdit to initialize controls.
|
|
|
|
|
Try a couple of things:
1 - use the following message:
::SendMessage(
m_hwndText, //Handle to edit control.
EM_SETBKGNDCOLOR,
0,
clrBackground) ; //e.g., ULONG clrBackground = RGB(255, 0, 0) ;
2 - Also, I seem to remember some time ago having to first put some text into a rich edit before I could change the background. You first have to select the text using CHARRANGE, then use CHARFOMAT2 to format the text. I have a vague recollection of putting a single space character into the rich edit to get it to work, but you may not have to.
Scott
|
|
|
|
|
I have created Thread Using AfxBeginThread, to diaply continous text on dialog bar, while if I close entire application or interrupt the application i gets Memory leakage, please help.
|
|
|
|
|
Maybe posting your code will make our lives easier...
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.
|
|
|
|
|
How do you cancel the thread?
This doesn't seem to be a suitable solution for updating text.
Consider using a timer, CWnd::SetTimer(), to update the text.
--
Roger
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"No one remembers a coward!" - Jan Elfström 1998 "...but everyone remembers an idiot!" - my lawyer 2005 when heard of Jan's saying above
|
|
|
|
|
^^ yep if possible use a timer...
otherwise by using a thread:
load:
ThreadRef = AfxBeginThread(Thread, ¶ms, THREAD_PRIORITY_BELOW_NORMAL, 0, CREATE_SUSPENDED);
disable auto delete:
ThreadRef->m_bAutoDelete = false;
start Thread:
ThreadRef->ResumeThread();
then use a global variable to signalize the thread to exit (in Thread func)
if(params->pDlg->m_WantExit){<br />
return 1;<br />
}
and use a own method in the main function to clean up the threads, calld before ending, and also wait till they end.
do{<br />
Sleep(1);
GetExitCodeThread(ThreadRef->m_hThread,&ExitCode);<br />
}while(ExitCode == STILL_ACTIVE);
this makes sure that the thread gets canceled correct on end of the main function.
|
|
|
|
|
I suggested a timer in the same thread since you will eventually get a deadlock situation if you update GUI objects from other threads. The timer solution is also more straight forward.
Besides, your thread handling suggestion contains a lot of errors and bad solutions that should not be recommended someone.
1. You left out the information what 'params' really is. Usually you pass the 'this' pointer and call a static member function that converts the void pointer.
2. You set CWinThread::m_bAutoDelete to FALSE without deleting the object returned by AfxBeginThread which will create a memory leak.
3. You're calling GetExitCodeThread in a loop where you think your thread will terminate by a call to ::Sleep(), even if you set the priority of the thread below normal. It will terminate eventually, but your main thread has higher priority.
The comment that a call to ::Sleep() will execute your secondary thread is very wrong: there's no guarantee that your thread will be executed. Even the argument to ::Sleep() reveals a lot. The correct way to do it is to wait on the thread handle, CWinThread::m_hThread, with a call to e.g. ::WaitForSingleObject().
For more information about how to do multithreading, read here[^].
--
Roger
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"No one remembers a coward!" - Jan Elfström 1998 "...but everyone remembers an idiot!" - my lawyer 2005 when heard of Jan's saying above
|
|
|
|
|
Well I left several part out, thats true.
- I thought its well known whats able to fill 'params' with
- the Threadobject would be deleted after the loop jumps out, what happens when the thread has ended (I didnt write it, ok).
- that the Sleep() is no 100% secure statement for a threadchange ist true
- to secure the application for deadlocks, there are several locking mechanism possible so secure shared variables.
- WaitForSingleObject has the problem that it locks up the application that calls it if used tirect in a window creating code, thats why i used a loop.
Well Im not a code guru, dont think Im one and also theres every time someone that knows more than me
|
|
|
|
|
My first post I suggested an alternative design solution for the OP, since I'm under the impression that he had selected the wrong solution for the problem.
You don't paint the walls with a hammer.
In my second post I was really trying to help you to avoid troubles in your way of doing multithreaded applications.
spielehelfer wrote: - I thought its well known whats able to fill 'params' with
- the Threadobject would be deleted after the loop jumps out, what happens when the thread has ended (I didnt write it, ok).
Ok, so noted.
A word of caution though: don't assume that the person you're trying to help is aware of things you consider 'common knowledge'. In my opinion it's hard enough to help someone while guessing their level of expertise.
spielehelfer wrote: - that the Sleep() is no 100% secure statement for a threadchange ist true
True, in fact it might be quite the opposite: it's almost 100% wrong to use ::Sleep() in this situation. ::Sleep(0) would make a little more sense but it would still not be quite right.
Read the timing section [^] of Joe Newcomer's article and you will know why afterwards.
spielehelfer wrote: - to secure the application for deadlocks, there are several locking mechanism possible so secure shared variables
A "deadlock" and "corrupt data due to multiple threads accessing the same data" are two very different problems, but both are related to multithreading.
Protecting shared data is often called "thread synchronization".
You cannot prevent deadlocks by the use of thread synchronization; you may, however, cause a deadlock by improper use of thread synchronization.
spielehelfer wrote: - WaitForSingleObject has the problem that it locks up the application that calls it if used tirect in a window creating code, thats why i used a loop
If it's the blocking part you worry about I can tell you that your loop solution is worse. (Calling ::Sleep()!) :->
It really doesn't matter: you should use ::WaitForSingleObject(), or ::WaitForMultipleObjects(), for multiple reasons (the ones below at the top of my head):
1. you can set a timeout
2. the waiting function consumes a very small amount of CPU cycles
3. the calling thread's priority gets boosted temporarily when any of the handles waiting for reaches its signalled state
4. you really don't want to process messages during this time to prevent other problems with re-entrancy
If you want to read more about why it's wrong to use ::GetThreadExitCode(), have a look here[^].
spielehelfer wrote: Well Im not a code guru, dont think Im one and also theres every time someone that knows more than me
Quite allright!
However, I strongly advise you to read Joe Newcomer's articles about how to use worker threads here[^] and the other ones I suggested above from his MVP tips page, http://www.flounder.com/mvp_tips.htm[^].
Cheers
--
Roger
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"No one remembers a coward!" - Jan Elfström 1998 "...but everyone remembers an idiot!" - my lawyer 2005 when heard of Jan's saying above
|
|
|
|
|
what is the use/function of manifest file in WTL
|
|
|
|