|
I use mouse_event() function to write a script in windows. It worked well, but in many games, it didnt worked. How could I make it work in games (using DirectX, i think) ????
|
|
|
|
|
if static libary or import libary, it is easy.
how about dll that dynamicly loaded by API in runtime? in adding to search each piece of code ( it is error-easy )are there any way?
|
|
|
|
|
Hi i'm making a dvd database and i need some help on the coding.
If you could help that would be great
heres the link for the vb files that i've alrdy created.
http://rhys100.250free.com/dvddatabase.zip
I don't know how to set it up so that when i add a entry it adds it to the .dat file and when i want to search for it it indexes properly
thanks for any suggestions
'
rhys
|
|
|
|
|
I am developing a download manager in C#.NET. How do u find what is the current network bandwidth ?
|
|
|
|
|
Wrong forum!
Post it here (C# Forum[^])
Nibu thomas
Software Developer
|
|
|
|
|
Advance thanks for the suggestions.
Currently I am trying to port my 32-bit sample application (created and maintained for x86 platform) to Itanium machines. I am using the SDK to build it for itanium system.
Since i am not having Visual studio for my 64 bit platform, I am not able to debug in the Itanium machine.
Could u please guide me with the resources and links available along with your suggestins to debug in 64 bit environment.
Regards,
Prabhu elangovan
|
|
|
|
|
|
hi all,
i have successfully used CXImage class and i have loaded gif images in the array of Cximage class and now i am not able to show this image on picture box.
so please anybody know how to this image can show on picture box please answer mw ASAP and if anybody have source code for this please give me .
Bankey Khandelwal
Software Engineer
|
|
|
|
|
i have done this don't west ur time.
Bankey Khandelwal
Software Engineer
|
|
|
|
|
Hi
I am developing the application in VC++.net.
I have created the tab control on the dialog box. and i have two picture controls on it. The tab settings for picture control i have set it to 1 abd 2.
I have set the image to the picture control.Muy problem is that when I don't set the image to the picture control I can see the Tab Control but when the image is set I can't see the Tabcontrol.
Any kind of help is appreciated.
Cheers
"Peace of mind through Technology"
|
|
|
|
|
<vector>
what's the use of this in a code of programs?
i'm just asking because it was used in the code of magic square..
|
|
|
|
|
not insane yet! wrote: what's the use of this in a code of programs?
i'm just asking because it was used in the code of magic square..
Your question is not clear!
Are you asking about this keyword?
this pointer is a pointer that is accessible within member functions (that are not static) of a class. It denotes the object for which the member function was called.
Nibu thomas
Software Developer
|
|
|
|
|
this is legal only in a member function, and is a pointer to the object that the method is being called on.
You don't see it a whole lot in C++, however for some reason in C#, it seems to be the convention to use this. when accessing member variables.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
what is the use of #include<vecto>? thanks
|
|
|
|
|
The #include directive tells the preprocessor to treat the contents of a specified file as if those contents had appeared in the source program at the point where the directive appears. You can organize constant and macro definitions into include files and then use #include directives to add these definitions to any source file. Include files are also useful for incorporating declarations of external variables and complex data types. You need to define and name the types only once in an include file created for that purpose.
Look here[^] for more details.
Nibu thomas
Software Developer
|
|
|
|
|
Add in previous msg
The main advantage of #include is you can use one code in many programe without copying every time.
Regards,
Divyang Mithaiwala
|
|
|
|
|
hi everyone
I have a problem in this code. I have to write a program that reverses a given file that is it will start reading the first half of the file, and continue to read the second half and replacing it with the reversed first half. It will end the operation by going to the beginning of the file and filling the first half with the reversed second half
I am having problem with reversing the second half and filling it in the first half's position (the second part of the question)
following is what i have done till now
any help would be greatly appreciated!!
thanks for your time!
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
int main(){
int fh;
long pos; /* Position of file pointer */
char buffer[10];
char *d = new char[10];
char buffer1[10];
int a,b,end,middle,i,j,p,count,m;
fh = open("abf.txt", O_RDONLY,0);
/* Seek the beginning of the file: */
pos = lseek( fh, 0L, 0);
if( pos == -1L )
perror( "_lseek to beginning failed" );
else
printf( "Position for beginning of file seek = %ld\n", pos );
end = lseek( fh, 0L, 2 ); /*end of the file*/
if( end == -1L )
perror( "_lseek to end position failed" );
else
printf( "Position for end position seek = %ld\n", end );
middle = end/2;
printf("middle of the file is:%d\n",middle);
for(i=0;i
|
|
|
|
|
Can you not read the input file into a buffer, reverse the buffer (e.g., strrev() ), and then write it to the output file?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
here's the problem......at any given time only half of the file can be in memory and the other part in buffer, the buffer already has the first half, all it has to do is overwrite it with the reversed second half but instead the pgm is just overwriting it with the second half not the reversed second half
Thanks!
char buffer[10];
char *d = new char[10];
fh = open("abf.txt", O_RDONLY,0); /* Seek the beginning of the file: */
pos = lseek( fh, 0L, 0);
end = lseek( fh, 0L, 2 ); /*end of the file*/
middle = end/2;
printf("middle of the file is:%d\n",middle);
for(i=0;i {
p=lseek(fh,0L,0);
read(fh,buffer,middle);
printf("character read iin buffer is %c\n", buffer[i]);
}
count=lseek(fh,middle,0);
printf("buffer's characters are %c,%c,%c\n",buffer[0],buffer[1],buffer[2]);
i=2,j=0;
for(j=0;j
|
|
|
|
|
ashira khera wrote: ...only half of the file can be in memory and the other part in buffer...
Huh? Where else could the buffer reside if not in memory?
While it obviously wouldn't be the most efficient, how about using two variables: one to start at the beginning of the file, and the other to start at the end of the file? Read a character into each, swap them, write them back to disk, advance the two variables until they meet in the middle.
Another idea is something like:
void main( void )
{
char szBuffer[] = "ABCDEFGHIJKLMNOPQRS";
char *psTemp;
int x,
y;
psTemp = new char[strlen(szBuffer) / 2];
for (x = 0; x < 10; x++)
psTemp[x] = szBuffer[x];
for (y = 0, x = strlen(szBuffer) - 1; x >= strlen(szBuffer) / 2; x--, y++)
{
char c = szBuffer[x];
szBuffer[x] = psTemp[y];
psTemp[y] = c;
}
for (x = 0; x < strlen(szBuffer) / 2; x++)
szBuffer[x] = psTemp[x];
}
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I have a dialog-based MFC application. I create a prop sheet, add some pages to it, and display it. Everything works fine at first, but if I move focus away from the dialog (like alt-tabbing to another window or clicking on another window), if I try to view my application again it hangs. However, it will ONLY hang if I interact with the prop sheet (tab control) window. I play around all I want with dialog controls that aren't in the prop sheet or its prop pages, but the minute I touch anything having to do with the prop sheet, the dialog will hang in the manner I just described.
Some other random things I've noticed:
1) If I do anything with the prop sheet (even something as simple as switch tabs), then move focus back to the main dialog by clicking one of the non-propsheet controls, the program will still hang when it gets focus back.
2) The program works perfectly fine while as long as it has focus. It's just when I switch to another window and then return that it hangs.
3) If I hit break in VC++6 while the program is hung, 99% of the time the message that my window is attempting to handle is WM_ACTIVATE (surprise surprise).
Here's my main dialog's OnInitDialog function:
<br />
m_PropSheet = new CPropertySheet("Project Manager");<br />
<br />
m_ThreadProperties = new ThreadPropertiesPage;<br />
m_PropSheet->AddPage(m_ThreadProperties);<br />
<br />
m_TestSpec = new TestSpecificationPage;<br />
m_PropSheet->AddPage(m_TestSpec);<br />
<br />
m_MapProts = new MapPrototypes;<br />
m_PropSheet->AddPage(m_MapProts);<br />
<br />
m_PersistPage = new PersistPage;<br />
m_PropSheet->AddPage(m_PersistPage);<br />
<br />
m_ProjViewPage = new ProjectViewPage;<br />
m_PropSheet->AddPage(m_ProjViewPage);<br />
m_ProjViewPage->SetPMDlg(this);<br />
<br />
m_PropSheet->Create(this,WS_CHILD,NULL);<br />
<br />
m_PropSheet->SetWindowPos(NULL,10,27, 750,300,NULL); <br />
m_PropSheet->ShowWindow(TRUE);<br />
Nothin' much there.
Thanks much for your help.
|
|
|
|
|
Well, I've found that the dialog WILL in fact refresh itself if there's something new to display. For instance, if I'm debugging in visual studio, and I insert a breakpoint before a statement that does something to one of the controls in a property page (like,say, add a string to a listbox), the dialog refreshes itself without any problems. But if I'm debugging and I look at my source code and then try to look back at the window, I get the hang I was talking about before.
|
|
|
|
|
|
Hello. My name is Vegas and I am in dire need for help in a college programming class I have called File Structures in C++. I am having alot of trouble with this class and need it to graduate this semester. I was looking for a tutor in the Bay Area in California. I will pay per hour or per session. THanks alot for your time.
please email me at totyt4wrds@yahoo.com
|
|
|
|
|
I have not lived there for years, but if you post a code snippit here and what you do not understand, then someone may explane it to you.
Peaple here will not do your home work for you, but given a piece of code and an explination of what you do not understand, they will usualy give you an answer.
Good luck!
INTP
Every thing is relative...
|
|
|
|