|
I can't see anything that will help you in there.
Steve
-- modified at 7:26 Sunday 23rd April, 2006
|
|
|
|
|
Look at the reply by Pravin Kumar (the second one) ,
he mentioned several steps:
(i) You have to create a polygon region from the rotated vertices of the rectangle,
(ii) get its bounding rectangle using CRgn:: GetClipBox function,
(iii) create a compatible bitmap and attach it to a compatible memory DC,
(iv) paint the memory DC with the background colour of the window,
(v) draw region on memory DC using FillRgn and FrameRgn functions and finally
(vi) BitBlt the memory DC to the window DC. Detaching the bitmap from memory DC and deleting bitmap and DC go without saying
and the trick could be to create a polygon of the outcome rectangle, then copy it to memory dc after you clip it using RGB, then draw the memory dc back to window using bitblt....
this code be something right?
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
I can't see how this procedure does what you want. I think what you want is rotation around the x or y axis with perspective. This is beyond abilities of GDI.
Steve
|
|
|
|
|
ok then let's conclude this debate
Bottom line is that i need to use Open GL or DirectX to do so....
thanks again
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Yeah, I don't think were progressing the issue. Good luck.
Steve
|
|
|
|
|
I've sent you an oher sample in the mail, did u get it?
this time it does what i need but i have a drawing problem...
maybe u can help?
thanks
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Hi ,
I am infancy to socket programming .I need to connect to an external device through terminalserver4 and i should be able to send command & receive output. Using the following code, i am able to send data to the external device from the two send functions and able to receive data from only the first recv function.
The program is blocking at the second recv function. Please check the following code and help me if anywhere went wrong.
#define DEST_IP "10.10.1.1"
#define DEST_PORT 2001
void CSocktestDlg::process()
{
WSADATA wsaData;
if(WSAStartup(MAKEWORD(1,1),&wsaData)!=0)
{
AfxMessageBox("WSAStartup failed",MB_OK);
exit(1);
}
else
{
//AfxMessageBox("WSAStartup succeeded",MB_OK);
}
int sockfd;
struct sockaddr_in dest_addr;
//Establishing socket
sockfd=socket(AF_INET,SOCK_STREAM,0);
dest_addr.sin_family=AF_INET;
dest_addr.sin_port=htons(DEST_PORT);
dest_addr.sin_addr.s_addr=inet_addr(DEST_IP);
memset(&(dest_addr.sin_zero),'\0',8);
//For connecting
if(connect(sockfd,(struct sockaddr *)&dest_addr,sizeof(struct sockaddr))==0)
{
//AfxMessageBox("Connected to remote system successfully",MB_OK);
}
else
{
AfxMessageBox("Unable to connect to remote machine",MB_OK);
}
//For sending data
CString code= "2,76,69,68,77,73,44,73,77,68,69,73,77,68,69,0,217,105,3";
int len,bytes_sent,n,i;
CTokenEx CtlArraySpliter;
CStringArray strArray;
CtlArraySpliter.Split(code,",",strArray,TRUE);
for(i = 0; i < strArray.GetSize(); i++ )
{
//len=strArray.GetAt(i).GetLength();
n = atoi(strArray.GetAt(i));
bytes_sent=send(sockfd,(char *) &n,sizeof(int),0);
}
strArray.RemoveAll();
AfxMessageBox("Sent message through socket to remote IP",MB_OK);
Sleep(5000);
//For receiving data
char buf[50];
int p=recv(sockfd,buf,50,0);
CString s,readbuffer,soutput;
readbuffer=(CString)buf;
soutput = "";
for(i = 0;i < p;i++)
{
if (soutput == "")
{
s.Format("%d", (int)((unsigned char)readbuffer.GetAt(i)));
soutput = soutput + s;
}
else
{
s.Format("%d", (int)((unsigned char)readbuffer.GetAt(i)));
soutput = soutput + "," + s;
}
}
AfxMessageBox(soutput,MB_OK);
//second time sending......................
CtlArraySpliter.Split(code,",",strArray,TRUE);
for(i = 0; i < strArray.GetSize(); i++ )
{
//len=strArray.GetAt(i).GetLength();
n = atoi(strArray.GetAt(i));
bytes_sent=send(sockfd,(char *) &n,sizeof(int),0);
//m_myPortController.Write((char *) &n,0,0);
}
strArray.RemoveAll();
Sleep(5000);
char buf1[50];
int q=recv(sockfd,buf1,50,0);
readbuffer=(CString)buf1;
soutput = "";
for(i = 0;i < q;i++)
{
if (soutput == "")
{
s.Format("%d", (int)((unsigned char)readbuffer.GetAt(i)));
soutput = soutput + s;
}
else
{
s.Format("%d", (int)((unsigned char)readbuffer.GetAt(i)));
soutput = soutput + "," + s;
}
}
AfxMessageBox(soutput+" first port second time",MB_OK);
if (p == SOCKET_ERROR)
{
p = WSAGetLastError();
WSACleanup();
}
else
{
AfxMessageBox("Received data successfully",MB_OK);
}
//For shutting down the socket
int r=shutdown(sockfd,2);
WSACleanup();
if (r==0)
{
//AfxMessageBox("socket closed successfully",MB_OK);
}
if (r==-1)
{
AfxMessageBox("Unable to close the socket",MB_OK);
}
}
The program is blocking at the second recv() function.
Pl help me.
Thanks in advance!!
|
|
|
|
|
in general, each waiting function (such as recv()) should be put in a thread, because u don't know if or when other-side sends message to you.
so create threads for your waiting functions.
A special image tool for C++ programmers, don't miss it!
The world unique Software Label Maker is here for you and me ...
A nice hyper tool for optimizing your MS html-help contents.
|
|
|
|
|
here, i think there is no waiting problem.Because the external device sends message immediately after sending command code. Is there any other wrong in my code? For the first time it is responding immediately. For the second time not.
|
|
|
|
|
Hi,
Is there any utility that can return informations about the programming language used to create a specific EXEcutable file?
Regards,
sdancer75
|
|
|
|
|
since the program is compiled, you have no information about the programming language which has been used to generate it
|
|
|
|
|
An exe has (somewhere) things called "compiler signature" and "linker signature".
By interpreting these signatures, you can find out the compiler and the linker used to create the exe file.
They won't tell you the computer language, but the used compiler will give you a hint.
Google for "compiler signature" and "linker signature"
|
|
|
|
|
There is no one simple way but there are things you can look for. One is to have a peek at the import table. There are many tools that can help with this such as Depends[^]. If it imports "msvbvm60.dll" it is probability written using VB6 for example.
Steve
|
|
|
|
|
Hi,
Is there any utility that can return informations about the programming language used to create a specific EXEcutable file?
Regards,
sdancer75
|
|
|
|
|
LANGID GetUserDefaultUILanguage(void);
|
|
|
|
|
this is the speaking language of the UI, not the programming language
|
|
|
|
|
Sorry , I misunderstand it.
use FileInfo tool to detect programming language :
FileInfo[^]
or language[^]
-- modified at 6:21 Thursday 20th April, 2006
|
|
|
|
|
|
Hey Hello,
we are two students from Dresden (Germany) and we have to program some little code, but we have really no idea how to do this!
OK, lets describe.
We want to write a tool which makes it possible to show the ping and traffic. Our teacher said we have to use c++ @ LCC.
Our application is a dialog based windows application. There is a textfield where the user is able to enter the host which he or she wants to ping on. The result of Ping should be visualized by a diagramm @ real time. How can we reach this goal?
Tutorials of lcc win32 say, that there should be a header file called ping.h. We use the version 3.3 and there is no such file. What can we do now?
thx and have a nice way home
|
|
|
|
|
have a look at
http://www.scitools.com/examples/NetManager_html/583.html
You can find the ping.h file at the above location.
Vision is Always important and so is your ATTITUDE.
Wishes.
Anshuman Dandekar
|
|
|
|
|
i've got my program compiling with 0 errors or warnings, but sorry for sounding stupid but how do i output it to a .exe file now ?????
|
|
|
|
|
since you have 0 errors and 0 warnings an exe file has been created automatically for you. it should be located in the project directory under 'Debug' or 'Release' depending on the settings you have used to compile your project...
hope this helps
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Hello, everybody. Sorry to disturb you all.
Currently, I have a speech recording and playback software developed by Microsoft Visual C++ 6.0. The software is used to train children with speech problem and scores will be calculated and showed at the end of each practice session. The software is able to record and playback real-time.
Children use this software at home and save their practice records in a single floppy disk. Then, children will bring the floppy disk with practice records inside when they return to our centre. There are 20 wave files that must be saved in a single floppy disk. Due to space insifficiency, one floppy disk is 1.44M in capacity.
Total size of 20 wave files = 20*188k = 3,760,000 bytes
Total floppy disk needed = (3,760,000)/1,440,000 = 2.6 floppy disks
But, I must save all the 20 wave files into a single floppy disk
Our problem is we are not able to save all 20 wave files in a single floppy disk. We cant afford a CD-RW for each child and we must use floppy disk. The solution is we have to compress the wave file to save the files in a floppy and decompress the files back to wave file in order to listen to how the children practice at home.
I am totally new to this as the software is written by one of my previous friend who worked together with me in a voluntary speech rehabilitation centre. We need this software to train children in the centre. I work part time there.
But, my problem is how to call any CODEC dll into correct place into my current project platform without causing any bugs? Please forgive me if I have asked a very silly question, I am sorry. After I have added the cpp and h files into my current project paltform, I dont know what should I do next.
My final destination is to save all 20 wave files in a single floppy disk. I didnt restrict that I must use compression/decompression methods but I dont know what else should I use.
Hope you can give me some guidances on how to do it or you please link me to pages that help me to do so. I promise I can learn as independent as possible but I really need your guidance at this very beginning, please.
Please, I really appreciate all your help.
|
|
|
|
|
What about the PCM format? :
Mono or stereo?
44kHz or 22kHz or less?
16bit or 8bit per sample?
Could you use lees space changing this parameters without lost the quality of the voice of the childrens?
If NO, could you use some compress algorithm (like zip) instead mp3?
Have a nice code day
|
|
|
|
|
Hi, _Russell_, thanks for your reply, really appreciate.
I used PCM format, mono, 16kHz, 16 bits.
I can use any lossy compression algorithms, and I manage to search some source codes from website, but my main problem is I dont know how to call the CODEC dll from my software.
Can you please tell me how? Or if you can link me to the pages that provide details or tutorials on how to call CODEC dll from my software project platform?
Please, I really need some guidance and helps at this beginning stages. I promise to learn as independent as possible, please help at this very beginning.
|
|
|
|
|