|
I use simple edit control.
How i can add event of the enter key.
I mean to when i click enter it jump to specific function.
|
|
|
|
|
|
i would like to know how to progamatically find the process ID for an TCP connection on a WIN2K system. Windows XP uses AllocateAndGetTcpExTableFromStack() for that purpose but this function call is undefined in Win2K.
But programs like tcpview, activeport is able to find the pid in Win2K also...
Does any1 know how to do it?
Thanx in advance...
|
|
|
|
|
I'm not new to coding completely, but I might as well be. All I know is HTML, but I figured it's a nice start. I got tired of just knowing HTML, so I figured I could try something new. I'm interested in learning C++ or Visual Basic, but I barely know anything about them. Can anyone let me know how to start or help me in getting started? Help would be appreciated!
|
|
|
|
|
I'd recomend starting with python actually.
http://www.python.org/
In particular see their beginners guide, which looks helpful.
http://www.python.org/moin/BeginnersGuide_2fNonProgrammers
There is nothing wrong with C/C++/C#, but they are all a but more complex than what you need. Also the compile-run cycle tends to be fairly long, while python is closer to instant. Most languages fall into the catagory of nothing wrong with them, but there is no one language that you should use for everything, so you will end up learning several if you get into programing. If you don't get into programing, python is well suited for the types of things people who rarely program want to write a program for.
There are many things wrong with visual Basic. The largest is that by being idiot friendly, idiots tend to use it, and thus a large protion of program written in Basic tend to be very bad from any standpoint. You can write okay programs with Visual Basic, but it gets in the way of your attempts. Unfortunatly most buisnesses run on VB so if you want a job there is a good chance you will need it. Start with something else though, hopefully the culture of "real" languages will influence you, and when/if you do use VB you aren't warped to the wrong way people tend to use it.
BTW, real programers do not consider HTML a programing language. HTML is a markup language, and completely different from a programing language. Art and programing are different skill sets, few people are any good at both. If you create beatiful web pages you might not have the mind to write good programs. Nothing wrong with that, I can't create beatiful web pages.
|
|
|
|
|
This is EthanEnie, I didn't feel like loggin in for a quick question. Since I am downloading Python, what kinds of things could I make with it?
|
|
|
|
|
Just about anything other than an OS, or a hard real time control system. And maybe even those...
Seriously, start with learning how to program. Language is just a syntax, good programers can learn any language quickly when they want to, but learning to program takes time. (Mastering a language takes time too, but I'd rather a great programer who is new to a language, than a master of some language who is a terribal programer)
What are your interestes. I know of several games written in python. Several buisness systems, some web tools, and so on.
|
|
|
|
|
HI,
I have my display set to 32bit True Color. But a recently added program does not
display it's icon correctly. All the others display correctly.
But in fact I do not think they display with all the colors they should. This particular icon should be a blue square with the temperature displayed in white numbers.
The numbers are there but the the blue square is only half blue, the top half. This icon is for the program from the Weather Channel, Desktop Weather Platinum.
Their support guy is the one who said he didn't think my Windows98SE was displaying enough colors in the SysTray. (I had sent him a bitmap of the SysTray).
Is there a program that would make the colors display correctly? Or perhaps a program that would change the registry to make this happen?
I found a webpage from The Code Project website that mentions this. But i am not a programer and did not understand the article.
Azdec
|
|
|
|
|
I'd like to know, how I can access an Visual C++ Extensibility object from within a Visual Studio 2003 C++ Addin. F.e., if I have a Project object how can I get the corresponding VCProject object ?
I tried QueryInterface and get_Extender, but both failed.
Eyk
|
|
|
|
|
Hello everyone
what is the difference between strcpy and lstrcpy?
Thanks.
-Freehawk
|
|
|
|
|
<br />
char *strcpy( char *string1, const char *string2 );<br />
<br />
LPTSTR lstrcpy(<br />
LPTSTR lpString1,
LPCTSTR lpString2
);<br />
- strcpy works with standard text. (1 byte per character)
- lstrcpy is portable. lstrcpy will copy standard text if you use standard character settings in your project, and will copy Unicode text if you use Unicode character settings. (2 bytes per character)
The "magic" behind this lies with the LPTSTR/LPCTSTR typedefs. When compiled under standard settings LPTSTR = char*, and therefore:
lstrcpy = char*(char* lpString1, const char* lpString2), which is the same as strcpy.
Using Unicode settings, LPTSTR = wchar_t*, and therefore:
lstrcpy = wchar_t*(wchar_t* lpString1, const wchar_t* lpString2), which is the same as wcscpy.
So if you're using lstrcpy in your project, and decide you want to use the Unicode settings, you don't have to change a thing. If you're using strcpy and decide to go Unicode, you would need to replace all your strcpy calls with wcscpy.
I think there's an article on the site about this, you should check it out.
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
|
|
|
|
|
Thank you very much.
It gave me a clear imagine.
-Freehawk
|
|
|
|
|
Aren't you getting _tcscpy() and lstrcpy() mixed up here? It has been a long time since I've used lstrcpy() so you may well be right.
Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
|
|
|
|
|
_tcscpy should do the same thing as lstrcpy. (text mapping wise) If I remember right, lstrcpy is the Win32 API version, whereas _tcscpy is the C runtime version.
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
|
|
|
|
|
Jack Rabbit wrote:
_tcscpy should do the same thing as lstrcpy.
While the net result may be the same, _tcscpy() resolves to either strcpy() , _mbscpy() , or wcscpy() , which are all part of the RTL. Using lstrcpy() , which is part of the Win32 API, produces smaller code.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I have a program getting input from a couple sensors, each on their own seperate thread. I also have a modeless dialog box which is supposed to display this data realtime, as it changes. Currently I am attempting to get a thread to update the dialog at a low thread priority setting. I am getting the data into the program, but is there a simpler means to get the dialog to update its information realtime than having a thread constantly update the data whether it has remained the same or changed.
How do you make user interface threads, I think that is where the problem lies. I have attempted doing so using the examples provided at this web site to no avail.
David
|
|
|
|
|
how about postmessage to the dialog itself? means you have to hand over its hwnd to whoever is getting the data
Bryce
---
To paraphrase Fred Dagg - the views expressed in this post are bloody good ones.
--
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
Our kids book :The Snot Goblin
|
|
|
|
|
I have a number of radio buttons. I want to enter their ID's in a std::map for later use. But I can't figure out how to set the correct button from it's ID. IOW, given a group consisting of 2 radio buttons and their ID's (IDC_R1, IDC_R2), does anyone know how to set which one is picked?
Jack
|
|
|
|
|
CButton * butt = (CButton *) GetDlgItem(IDC_R1);
CButton * head = (CButton *) GetDlgItem(IDC_R2);
Regards,
|
|
|
|
|
Thanks. That's what I was using but when I was doing the SetCheck, I forgot to uncheck the other controls so the program was aborting due to too many controls being enabled. I thought I was calling the control wrong.
Jack
|
|
|
|
|
I used to use the pointer method, and then one day I stumbled upon this function:
UINT IsDlgButtonChecked( int nIDButton ) const;
So, if you want to determine if the IDC_R1 button is checked, simply:
<br />
if (IsDlgButtonChecked(IDC_R1) != 0)<br />
AfxMessageBox("Checked");<br />
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
|
|
|
|
|
Thanks, I appreciate you mentioning that. But the problem I was having had to do with setting it, not checking if it was set. Turns out I was setting it correctly but I was also not un-setting the other radio buttons. It's working fine now.
Jack
|
|
|
|
|
Check out CheckRadioButton api on msdn.
Thank You
Bo Hunter
|
|
|
|
|
Hi,
I am creating an app that requires a lot of settings and im wondering what would be the best way to structure them. Is the best way just to create a dialog for each of them and hook everything up as a stub and then fill everything else in?
Im just trying to get a feel for how other people design their applications. I find the MFC framework a little constrictive when im trying to pass data around.
Im trying to minimise time in case I later want to use a list view control/tab style e.g. tools->options in FireFox for all settings rather than an a menu option for each dialog. If I just create a dialog
for each settings would it be easy to convert it to a tools->options style dialog later on?
What are peoples thoughts and how do you structure that inital GUI so it is more extendable later on?
|
|
|
|
|
Seperate the GUI out from the rest. Make it really easy for the Human Factors team (if you don't have one, pretend there is one who designs all the screens) to change anything.
That is your program just recognises settings from a simple interface. The setup can be easially changed because the screens know nothing about how the rest of the program works.
|
|
|
|