|
please show me the way to change the text color in the button.
thanks...
|
|
|
|
|
It might not be possible. MSDN states that it must have the BS_OWNERDRAW style. At that point, the button's owner can handle the WM_CTLCOLORBTN message. However, the text color of a push button applies only to its focus rectangle; it does not affect the color of the text. Make sense?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I've got this program that has a box that lists all the available serial ports on a computer. Right now, it is listing COM1, COM2, COM3, and COM4. The computer actually only has COM1 and COM2. I looked at the code a little and noticed that it is getting the available serial ports from "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports" in the registry.
I can easily get the program to build a list from "HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM" instead.
My question is... why are COM3 and COM4 listed in "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports"? WHat is the purpose of this key?
Also, is there another way you guys would construct a list of available serial ports?
Freiheit ist von Gott, Freiheiten vom Teufel.
|
|
|
|
|
waffleman wrote:
Also, is there another way you guys would construct a list of available serial ports?
I would be inclined to use the Win32_SerialPort class.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
COM ports in windows are very much a name given for serial communication by which application can communicate with the hardware using createfile(...) api.
for example when you connect a mobile phone to the computer using bluetooth on the USB, the bluetooth driver "exposes" the devices as a com port to the application. Similartly you must have been connecting some device to the pc. and that devices driver has created additional com port, in win2k i can assign my physical comport1 to COM25 or any other no but not greater than COM25.
I'll write a suicide note on a hundred dollar bill - Dire Straits
|
|
|
|
|
Weird aint it! I am not sure about modern Windows, but in the DOS/Win31 days; COM1 & COM3 mapped to the same address space (range), the same was true about COM2 & COM4. This may have something to do with you results.
INTP
|
|
|
|
|
kkkkfkkjlk
alert("hello");
|
|
|
|
|
Oh no, a script kiddy!
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
alert("not working here, try on some VB forum");
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I am trying to learn C and c++.I am okay at both.I am 13 and want to be a programmer for games but I do not know how to get started plus I am not that great of a programmer
(There are some things about programming you can't get from a book).I would like to know where to go to get started and where to get tutorials for programming.So if anybody knows any good sites I'd be hap[py to know.
K.G.
|
|
|
|
|
kyleiscool2004 wrote:
I am trying to learn C and c++.I am okay at both.
That's a broad request. What do you want to know about specifically?
kyleiscool2004 wrote:
I would like to know where to go to get started...
Didn't you earlier state that you were okay at both? It sounds like you've already started. Do you know how to declare variables and assign values to them? Do you know how to get input from the user? Do you know how to output (formatted) data to the screen? Do you know how to open/close files? Do you know how to create a function and have it return a value? Do you know how to create a for/while loop?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
DavidCrow wrote:
Didn't you earlier state that you were okay at both? It sounds like you've already started. Do you know how to declare variables and assign values to them? Do you know how to get input from the user? Do you know how to output (formatted) data to the screen? Do you know how to open/close files? Do you know how to create a function and have it return a value? Do you know how to create a for/while loop?
When I said: I would like to know where to go to get started...
I meant learning techniques in game programming?
I am okay at programming,Yes,But i want to know some advanced techniques.Such as how to change the way an image looks and how to make the charachters look as if they are alive.thanks.
kyle
|
|
|
|
|
kyleiscool2004 wrote:
I would like to know where to go to get started...
I meant learning techniques in game programming?
Understood. I should have read a bit closer. As I've never programmed games, I'm not much help. Maybe a walk-through of DirectX would prove useful.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
A good site would be
www.gamedev.net[^]
Check the Resources (for beginners)
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
http://nehe.gamedev.net/ - openGL
|
|
|
|
|
Thankd for showing me this website.It helped alot.
|
|
|
|
|
Glad to help
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
hi there,
you must first learn how to be a programer
1]get some stuuf in computer scince
a)http://computer.howstuffworks.com/
( to learn how computer hardware works)
b)get some free books in programming from
(http://www.maththinking.com/boat/computerbooks.html)
to learn about how to write a good algorith.
2]learn visual c++
3]get microsoft directx sdk,opengl sdk & some modern game design book.
after doing that you will be a great games programmer
|
|
|
|
|
kyleiscool2004 wrote:
There are some things about programming you can't get from a book
You are right! You have to learn to think like a programer, and that comes with understanding plus experience. There are some totorials at codeproject that may help, such as pointers.
One of the best ways I know of (when starting) is to take a look at the C library functions (strlen,strcpy,strtok,etc...) and try to write your own versions.
Example:
int MyStrLen(const char* pStr)
{
int i;
if( !pStr )
return 0;
for( i=0; pStr[i]; ++i ) {}
return i;
}
int MyStrLen(const char* pStr)
{
int i = 0;
if( pStr )
for( i=0; pStr[i]; ++i ) {}
return i;
}
int MyStrLen(const char* pStr)
{
char* pStart = pStr;
if( pStr )
for( ; pStr; ++pStr ) {}
return (pStr - pStart) / sizeof(char);
}
If you know why each of the above works, then you are well on your way!
As for game programming there are lots of sights where you can look, but none of them will do you any good unless you understand the language. Also, game programming is very math intensive; so you will need to be very good at mathmatics.
Well, have fun and learn all you can!
INTP
|
|
|
|
|
Any thoughts on the problem below will be a great help:
I am trying to use CFile in an MFC app. My thinking is that it should be available with no further includes as stdafx is included which includes windows.h? However vc++ tell me CFile is an undeclared identifier. CFile is declared in afx.h however I can't include afx.h by itself as the compiler complains that windows.h is being redeclared.
What am I missing...
Just another typist
|
|
|
|
|
By default, windows.h is not directly included in stdafx.h. You should have at least included afxwin.h. Others you might have are afxext.h and afxdtctl.h.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Many thanks!
This has pointed me on the right track. I have found similar posts and the answer seems to be afxwin.h.
Unfortunately I still can't compile:
_DllMain@12 already defined in HookFunc.obj
I have found a Microdoft specific knwledge base article describing this problem but that relates to specific modules that there is a problem with. I don't think that's what I'm seeing, more likely I'm just doing something dumb.
Just another typist
|
|
|
|
|
It appears that you have more than one instance of DllMain() in the project's .c or .cpp files.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
In a part of my project, I must compile many HTML files into a single file ,I decided to choose CHM file. But how can I do this using C++? I know HTML Help workshop,but it's only a tool. I didn't get much on MSDN.I am using Visual C++ 6.0. many thanks.
Alick
|
|
|
|
|
Why dont you use HTML Help workshop but using its comand lines, this way you'll compile by code, but by issuing the right command using CreateProcess or the likes.
Check in the help for the different command lines and the one you could need
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|