|
hai all,
i want to no how to pack all my bitmap images into a dll by using Visual C++6.0,
do i need to follow any specific steps...
regards
expl
|
|
|
|
|
vc++ 6.0->Insert->Bitmap->Import
suhredayan There is no spoon.
|
|
|
|
|
I use a datagram socket to receive UDP message. Now a new requirement is to automatically reply to the messages senders. Application messages doesn't containt the IP address and the Port of the sender. How can I know who have I to reply ? Is it possible to retrieve the sender information with low level functions ? or have I to use a RAW socket ?
Thanks a lot.
|
|
|
|
|
I want to sort elements pointed by a double pointer and update the index of elements accordingly.
For example, I have elements pointed by the double pointer:
double ptr;
ptr[0] = -8;
ptr[1] = -9;
ptr[2] = 5.6;
ptr[3] = 3.4;
ptr[4] = 0;
I want to sort these elements and return the updated index:
ptr[0] = -9;
ptr[1] = -8;
ptr[2] = 0;
ptr[3] = 3.4;
ptr[4] = 5.6;
index[0] = 1
index[1] = 0
index[2] = 4
index[3] = 3
index[4] = 2
What library can I use?
Can I use qsort() to do this?
Thanks
|
|
|
|
|
I presume ptr is supposed to be declared as ptr[5] ? The closest I could come up with looks like:
struct _ptr
{
double d;
int n;
} ptr[5] = {{-8, 0},{-9, 1},{5.6, 2},{3.4, 3},{0, 4}};
int Compare( const void *p1, const void *p2 )
{
if (((_ptr *) p1)->d < ((_ptr *) p2)->d)
return -1;
else if (((_ptr *) p1)->d > ((_ptr *) p2)->d)
return 1;
else
return 0;
}
void main( void )
{
qsort(ptr, sizeof(ptr) / sizeof(ptr[0]), sizeof(ptr[0]), Compare);
return;
}
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
It seems not work.
What I want to do is to sort a double pointer which points to a array.
There is also an index pointer points to the index location, after I sort the data pointer, the index elements are rearrange according to the sorted data.
For example, I have a double pointer ptrdata.
double *ptrData = (double*)calloc(5, sizeof(double));
double *ptrIndex = double*)calloc(5, sizeof(double));
ptrData[0] = 3; ptrData[1] = 4; ptrData[2] = 2; ptrData[3] = 5;
ptrData[4] = 6;
ptrIndex[0] = 1; ptrIndex[1] = 2; ptrIndex[2] = 3; ptrIndex[3] = 4;
ptrIndex[4] = 5;
After sorting:
ptrData[0] = 2; ptrData[1] = 3; ptrData[2] = 4; ptrData[3] = 5;
ptrData[4] = 6;
ptrIndex[0] = 3; ptrIndex[1] = 1; ptrIndex[2] = 2; ptrIndex[3] = 4;
ptrIndex[4] = 5;
I know qsort can sort the elements quickly, but howcan I aso re-arrange the index with the use of qsort?
Thanks
|
|
|
|
|
I'm not sure if you even tried the code snippet that I provided but it does produce the answer you are after. Change main() to the following to verify:
void main( void )
{
cout << "Number Index" << endl;
cout << "------ -----" << endl;
for (int x = 0; x < 5; x++)
cout << " " << ptr[x].d << " " << ptr[x].n << endl;
qsort(ptr, sizeof(ptr) / sizeof(ptr[0]), sizeof(ptr[0]), Compare);
cout << endl;
for (x = 0; x < 5; x++)
cout << " " << ptr[x].d << " " << ptr[x].n << endl;
}
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
When I'm stepping through my c++ code with the Visual Studio .Net 2003 debugger, my Windows XP SP2 system quite often hangs. A college of mine has the same problem. Any one else experienced the same problem? Got a sollution?
|
|
|
|
|
Same here with Windows XP SP2.
suhredayan There is no spoon.
|
|
|
|
|
Yes, just recently had the same problem. For me it turned out to be Nvidia's NView program that manages windows. Turn this off completely and my problems went away. I'm running a Toshiba laptop so I couldn't upgrade to the newest version of Nvidia drivers, but I wasn't using it NView anyways so I just turned it off.
Hope this helps.
--
Joel Lucsy
|
|
|
|
|
The code that i have sent you is not doing any thing. It is only working to open a webpage.
We Believe in Excellence
|
|
|
|
|
Perhaps the file extension of the file you are opening is assocciated with internet explorer or the internet? If you posted your code for the ShellExecute we could probably help you.
|
|
|
|
|
Here is my code...
void CPrintDlg::OnBPrint()
{
ShellExecute(NULL, "print", "c:\\Print\\myfile.doc", NULL, NULL, 0);
}
We Believe in Excellence
|
|
|
|
|
What is the return value?
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|
Also, since you passed in NULL for a parent window, if the sytem DOES try to tell you what is wrong, you won't see it. Try debugging by passing in GetDesktopWindow()
ShellExecute(::GetDesktopWindow(), "print", "c:\\Print\\myfile.doc", NULL, NULL, 0);
and check the return value, as has been suggested.
Otherwise, check the registry and see if there is a file association for DOC files and a PRINT verb underneath its document handler.
|
|
|
|
|
i Create an arrow Control, i add this control to the web page , i used a logic to draw an arrow as mouse down starting drawing,and mouse up for ending of line i place the arrow tip at ending point.
but in design time i failed to draw exactly what i need.
because i want exactly the windows vb line control...
but any third party tool will take more edge points..
any one tried to get two points at design time..
plz help me, i wrote in vc++6.0 and i am trying to export to vc++7.0 .. so plz help me
surya
|
|
|
|
|
Hi, I have the servers i need to make this game, so dont think im trying to hard for a beginner, but im wondering could anyone give me a full, easy tutorial to follow on awesome grapic design. As long as its not too complicated and is awesome, AWESOME graphics, not just some flash game, better than runescape and final fantasy 11 online(because we have better programs than the ones used in those games, we just need coding and know how to make our own engine.) so PLEASE help me and my like 15 other friends, i BEG of you.
I like a lovely bunch of coconuts. Diddly-Dee.
|
|
|
|
|
|
hey im sry, the link didnt work man could u check it, and try sending it again? i really need this(btw if u have AIM or MSN that would be very helpful.)
I like a lovely bunch of coconuts. Diddly-Dee.
|
|
|
|
|
by the way, youre chrsitian, as i see your signature, thats awesome man, so am i. you may not think its a big thing, but many people i know are atheiasts and muslims :DDDDD
I like a lovely bunch of coconuts. Diddly-Dee.
|
|
|
|
|
I am sorry abt the last link.....itz been quite a while since have i have visited the site....i guess they just reorganized their site.....anyway here is the new link.....
http://www.gametutorials.com/[^]
i have done a little animation in win32.....so this is where it is in their site.....
http://www.gametutorials.com/gtstore/c-4-win32.aspx[^]
u will find lotz with the source code inem.....u can asjk questionz as well.....
herez one of my favorite project animation that they have put up in.....
http://www.gametutorials.com/gtstore/pc-140-4-animation.aspx[^]
they are very helpful also....u can get ur doubts cleared all abt gametheory there
have fun.....
Happy programmin.....
cheerz.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
welll....i guess they have charged their tutorialz.....thay werent so two monthz back.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
I am creating a combobox control on a dialog at runtime.
Works Fine. the only problem is i am unable to set the drop down height of the combo box.
Thanx
Rahim Rattani
Software Engineer,
Matrix Systems (Pvt) Ltd.,
Karachi - Pakistan
|
|
|
|
|
|
hi ,
I have dailog based application in that i have one ListControl
I want my own scroll bar and list control should disply the iteams
image and string
If anyone can help, I'd be very appreciative
thanks
leela mahesh
|
|
|
|