|
What is the necessary style the a list box must have to display characters such as this correctly: å, ä, ö, Å, Ä
Or is it just a matter of Windows regional settings?
|
|
|
|
|
I think the only requirement is that you set its font to one that's capable of displaying these chars. Arial seems like a good bet, but I suspect Tahoma (the now-standard Microsoft font) would also work.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I want a button to be drawn fully red, do i need to create my own button class ? Owner-draw button is the way to go ? If so, can you point me too any good article that talks about it ?
Thanks
|
|
|
|
|
One solution is ownerdraw via WM_CTLCOLOR.
Kuphryn
|
|
|
|
|
You can also take a look here in CP at the Button articles in order to find out some classes already done... CButton ST is a good class...
HTH...
|
|
|
|
|
Hi,
I have a VC++ application that launches another application in Run Time
<br />
char* pszFileName = "c:\\NewApplication.exe";<br />
spawnl( _P_NOWAIT, pszFileName, pszFileName,NULL);<br />
It works fine, but I could not find another command to terminate that application (NewApplication.exe) in Run Time
Anyone can help me?
Thanks
|
|
|
|
|
Use TerminateProcess(HANDLE hProcess,UINT uExitCode);
|
|
|
|
|
skaanji wrote:
Use TerminateProcess(HANDLE hProcess,UINT uExitCode);
No, No, No, No, No, unless you want the user to loose all the work they've done.
To quote the MS Docs:
The TerminateProcess function is used to unconditionally cause a process to exit. Use it only in extreme circumstances.
Please be very carefull about what you you suggest to people here.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
Hi,
I am trying & still find the way to do right!
Thanks
ATC
|
|
|
|
|
Hi,
I am working on it & still find the way to do right!
Thanks
ATC
|
|
|
|
|
|
Hi,
I am working on it & still find the way to do right!
Thanks
ATC
|
|
|
|
|
Obtain the handle of the window. Pass a message to it to shut down.
If it's an app that requires saving before closing then it should ask
Example:
HWND hWnd;<br />
LRESULT lpResult;<br />
<br />
hWnd = FindWindow(NULL, winName);<br />
if (hWnd == NULL)<br />
{<br />
return 0;<br />
}<br />
lpResult = DefWindowProc(hWnd, WM_SYSCOMMAND, SC_CLOSE, NULL);<br />
Hope this helps
|
|
|
|
|
Hi,
I did try your suggestion, but when I compiled I had two errors:
---> hWnd = FindWindow(NULL, winName);
---> lpResult = DefWindowProc(hWnd, WM_SYSCOMMAND, SC_CLOSE, NULL);
error C2440: '=' : cannot convert from 'class CWnd *' to 'struct HWND__ *'
error C2660: 'DefWindowProcA' : function does not take 4 parameters
Do you know why?
Thanks for help
ATC
|
|
|
|
|
In Java, they got rid of the use of pointers, and most Java
programmers will tell you because the creators want to get
rid of the pointers headache for programmers. I wonder if it
is true? Is pointers a headache for you? And is it useful? If
you don't use pointers, what alternatives do you have?
(off topic) By the way, do you happen to know if there is a
Java forum that is similar to this site?
Thanks.
|
|
|
|
|
VW_Red_Jetta wrote:
By the way, do you happen to know if there is a
Java forum that is similar to this site?
Try the JDC Forums: http://forum.java.sun.com/[^]
- Mike
|
|
|
|
|
other people's use of pointers is evil, but pointers are wonderful.
To vote with no response is to follow the way of the coward.
|
|
|
|
|
Chris Losinger wrote:
other people's use of pointers is evil, but pointers are wonderful
I agree, I dont do c++ but do c, and once you grasp that everything is really just a number and passing-by-reference is complete bollocks, then it all makes sense to you.
<a TITLE="See my user info" href=http:
|
|
|
|
|
VW_Red_Jetta wrote:
Is pointers a headache for you? And is it useful? If
you don't use pointers, what alternatives do you have?
No.
Yes.
VB
Java people say that pointers are evil. C++ people say that not controlling when object destructors run is evil. *shrug*
--Mike--
Latest blog entry: *drool* (Alyson) [May 10]
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
C++ pointers are extremely powerful for both software design and implementation.
Kuphryn
|
|
|
|
|
I do not understand...
How can you get anything done without them.
and it is not a headache.
I think, the reason that JAVA is different from C (C++) in this respect, is security.
In C you can assign any number to a pointer and read and write any byte in memory, sometimes with disastrous results. Only hardware memory management can protect us from unauthorized access.
But then, I do not know JAVA.
Daniela
|
|
|
|
|
VW_Red_Jetta wrote:
Is pointers a headache for you?
No. I can't dream of a fairly large program without pointers.
VW_Red_Jetta wrote:
And is it useful?
See above.
VW_Red_Jetta wrote:
If you don't use pointers, what alternatives do you have?
I dunno.
Actually, I had to do a couple of small programs (one in VB, one in Java). I got really pissed off - with VB for the language and Java for lack of pointers. C++ is for me. I'm gonna learn C#, though.
Vikram.
-----------------------------
My site due for a massive update.
"Good lord you yanks are getting worse than a defensive VB developer at a C++ conference." - Paul Watson in the Lounge, 31 May 2003.
"Do not give redundant error messages again and again." - A classmate of mine, while giving a class talk on error detection in compiler design.
|
|
|
|
|
Pointers are one of the most useful parts of C++/C. Used well, they become one of the most powerful tools in a programmers toolkit - used poorly and they can make your life a living hell.
When I first started wiht pointers in the late 80's (in C), it took me a couple of months to understand the concept but now they are second nature.
Michael
'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879
|
|
|
|
|
As long as java exists, there's and endless discussion between C/C++ and Java programmers about which language to use.
I have some experience with java. I learn it at school, from my point of view, Java programmers are lazy thinkers(no offence) and C/C++ programmers are lazy writing!
Back to pointers, I use pointers as much as I can. They keep the mind sharp!
In Java they didn't get rid of pointers at all, they just hide them from the programmer. (Ever had a null pointer exception??)
|
|
|
|
|
First of all, my first misconception about java, was that there were no pointers. That misconception from a C++ point of view led me to believe that you just used copied objects everywhere.
Java is all about references -- which really are just smarter pointers. Smart would be pushing it, but smarter... I can't tell you how many hours I've spent debugging java code because it wouldn't release objects. {how smart can it be if you can still screw it up?}
I think of Java like I think of PASCAL. Remember PASCAL? It tries real hard to protect you from shooting yourself in the foot, but if you attempt anything too lofty, you will end up shooting yourself in the foot, but not realize it, and then you die a slow but somewhat painless death. Java makes a great teaching language -- as long as you don't really want to understand what's happening under the hood.
References live in C++ too, and but they don't do the auto-delete-referenc-counter thingy that java does. MS came out with this thing called COM. COM implements some java-like stuff in C++. Reference counting and smarter casting stuff...
My answer is: that I'd much rather use C++. I think it's the control-freak in me, but I know what I am getting with C++. {knowing assembly helps too} Java leaves you greatly at the whim of the person that developed the runtime...
The learning curve with C++ is higher. And java has some constructs that are missing in C++ (like "super" -- I love "super"). But I'd still pick C++ any day!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
Santa Cruz Networks
|
|
|
|