|
Hi all...
(* long time no seen *)
For months and months I try to find out...
What is the formula behind the sinus,
because I want to do my own sinus function (Ex. double MySin(double) )
Please heeelp me...
Any kind of help will be greatly appreciated
=-=-=-=-=-=-=
The Server
|
|
|
|
|
|
Can someone tell me where I can find some good info, on packing structures and alignment. I have never quite understood the topic.
I have to pack some structures in my Windows application.
Thanks.
Jerry
|
|
|
|
|
Start with the #pragma pack() directive.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
|
Hai,
I'm using win32 vc++. I'm drawing the background for my button by subclassing.
But at no. of times I'm enabling and disabling the button in my dialog procedure(not in subclass proc). At those times how can I display the text in button as grey ie. how can I retrieve the text from the button and grey it?
Thanks a lot.
|
|
|
|
|
Does GetWindowText work??
"Fish and guests stink in three days." - Benjamin Franlkin
|
|
|
|
|
hai,
GetWindowText did'nt work. It's getting the caption of the button which there is none cause i'm displaying the text of the button using DrawText() inside the subclass procedure.
anyway thanks.
|
|
|
|
|
In that case, you should store a copy of the text displayed in a member variable inside the subclass. Then override the GetWindowText function (or define an other) that gives you acces to the caption of the button.
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
Hi,
I have a device driver for a USB device written in VC++.There is a function in it to Read /write data to the USB port.Now I want to write a a function in C++ so that users can write programs in C++ rather in VC++.
Since c++ doesnt recognise data types like DWORD,BUFFER etc..I am struck.
Is there anyway i can link C++ and VC++.Can i use pointers.
thanks
nev.
|
|
|
|
|
naveen_vi wrote:
Since c++ doesnt recognise data types like DWORD
From WinDef.h
typedef unsigned long DWORD;
naveen_vi wrote:
Is there anyway i can link C++ and VC++.Can i use pointers.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
Hi,
Thanks for ur reply.
So is it enough to include windef.h in my C++ program and write my own header file.
so with typdef can i convert all windows data and use them in my C++ file.
nev
|
|
|
|
|
nev, i don't want to insult you but this is all beginner C++ issues. You should probably take the time to study these basic language concepts so that you understand them before you attempt to implement your project.
But, that's just my opinion... I could be wrong.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
|
hi mike,
I have a USB chip.They have given me the device driver and thier function looks like this.
http://www.ftdichip.com/knowledgebase/d2xx/manual/userguide.htm
write function is:
FT_STATUS FT_Write ( FT_HANDLE ftHandle, LPVOID lpBuffer, DWORD dwBytesToWrite, LPDWORD lpdwBytesWritten ) .They actually imported functions from win32 api(kernell32.dll).
where FT_status is ULONG data type.
http://www.ftdichip.com/knowledgebase/d2xx/manual/userguide.htm
If i just want to write a C++ program to write my data into LPVOID lpbuffer.How do i di it.I want my function to look like
write(int addr,unsigned char data);
nev
|
|
|
|
|
Helloo sir,with all due respect,
could you give me useful pointer over smartcard api's
thanks
-----------------------------
"I Think It will Work"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Alok the programmer wrote:
could you give me useful pointer over smartcard api's
What kind of API. Are you talking about a smart card reader or the API of the card itself. The API's usually depend on the hardware being used to read the cards. Google is your best friend in these matters unless you know the manufacturer of your hardware/card.
Michael
CP Blog [^]
|
|
|
|
|
naveen_vi wrote:
Since c++ doesnt recognise data types like DWORD,BUFFER etc..I am struck.
DWORD, BUFFER etc are all Windows types. If you are writing a Windows application then these will be available in any C++ compiler. Most of these are defined in WINDEFS.H and map to standard C++ types.
Your question is a little vague. More information would allow us to help you better.
Michael
CP Blog [^]
|
|
|
|
|
Hi Everybody,
I would like to know how to find a substring in a string. finding should be done without case sensitive.
for example consider a string HomeWork.
I want to search wheather worK is there in the above string.
Let me know any function that perform this type of searching.
I tried strstr(), but it did not work because it is case sensitive.
Thanks in Advance.
|
|
|
|
|
|
DELIVER THE PROMISE wrote:
I tried strstr(), but it did not work because it is case sensitive.
So convert both to the same case and go from there.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
As DavidCrow said - probably the easiest way would be to make all strings the same case, and then compare. E.g., use strupr on the string and the substring, then do an strstr.
The other option is to write the search yourself. That actually would not be that hard to do, and perhaps that is the purpose of your homework anyway.
"Fish and guests stink in three days." - Benjamin Franlkin
|
|
|
|
|
Thanks for helping me out. I have converted both strings into lower and searched.
Thanks a lot
;););););););););)
|
|
|
|
|
I am writting to the Serial Port using m_port.Write(sBuf, 7); .
This writes 7 bytes stored in the array sBuf, which is an array of chars.
However, it only works for numbers upto 0x7f (127), anything more than that loses the upper bit. Any ideas for a fix?
Ali
|
|
|
|
|
What is the type of m_port?
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|