|
I seem to recall that this is a problem/limitation/bug/whatever with the texture. It's a fixed size, so if your window is bigger than that size, the texture has to be tiled.
|
|
|
|
|
|
I'm developing a program,which makes more than one person chat in the one holl. I want to using multicast.but i find that it seems that most of the routine do not surpport multicast, although i only want to send one paceage to others,I must send it for each one!
Somebody how should I do would be more effient?Thanks
|
|
|
|
|
kcynic wrote: i find that it seems that most of the routine do not surpport multicast
What routines?
Are you using sockets?
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
My English is so poor,please excute me,thanks.
I mean that I want to using multicast achitecture to develop a multi-pepole chat program,which makes all the chater could chat using words or sound.
But i find that not all the router surpport multicast in the internet.
How should I dow now?
Thanks
|
|
|
|
|
To use true multicast then yes, you'd need multicast-capable hardware.
You can simulate multicast with sockets - the drawback being you multiply the bandwidth
requirement by the number of recipients.
You just need to keep track of all the destination addresses.
With UDP it's fairly simple since you can use sendto() to send to each destination.
With TCP, each destination connection needs a connected socket so it's slightly more complicated
(not much).
For a chat program where everyone talks to everyone, it may be simpler to have a "server" app
that everyone connects to. All messages go to the server which forwards them to all users.
That keeps the bandwidth requirement low for each user but the server needs good bandwidth.
For sound, the server could take all the incoming sound samples and mix them, then forward the
single mixed stream to all the connected users.
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Hi all,
I want to write a code to send mail from one domain to another domain.
My problem is i want to use STARTTLS command...
When i send STARTTLS i get 220 2.0.0 ready to start TLS but after this i m not getting the way to proceed.
can anybody help me in this
Thanks in advance
|
|
|
|
|
Hello Friends;
I want to use a web service (it has also a method) in c++.
I am using .NET and if i open CLR project i can use this web service methods but If i open a regular command c++ project and then i add web reference into it, i cannot use webservice's methods.
A link, document or any idea is good for me.
Thanks For Your Helps
Best Regards
|
|
|
|
|
Tyler45 wrote: i cannot use webservice's methods
More Information needed, be more specific.
Maybe this will help so long[^]
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Thanks for your reply but this link is related with clr programming. As i said first post i did connection using this method but i need exactly c++ project (without clr) and i want to connect in webservices
Is there any example?
|
|
|
|
|
Hi all,
I m trying to make a linked list. in which three items are present...
when i display the item only last item is displayed and it runs infinetly....
i Suppose all the three items are written at one memory location..
the code is as follows..
struct node
{
char str[23];
node *nxt;
};
node *start_ptr ;
void insert();
void display();
int main(int argc, char* argv[])
{
insert();
return 0;
}
void insert()
{
node *temp = new node;
start_ptr = temp;
for(int i = 0;i<3;i++)
{
cout<<"\n enter the name ";
cin>>temp->str;
temp->nxt = temp;
temp = temp->nxt;
}
}
void display()
{
node *temp2 = start_ptr;
while(temp2->nxt != NULL)
{
cout<<"\n Name = "<<temp2->str;
temp2 = temp2->nxt;
}
}
can anybosy help me in this
thanks in advance
|
|
|
|
|
The problem is that you create only one node and you make it point to itself for the next element. You need to create 3 nodes and make them point to each other.
Another problem is when you display your list afterwards: the nxt pointer of the last element is never initialized to NULL so if you fix the first problem, you'll probably get a crash.
You may also consider using std::list for that purpose
|
|
|
|
|
MOdified: according to Cedric Moonen the next of the last node has to be set to NULL.
You linked a node to itself. Change the function
neha.agarwal27 wrote:
void insert()
{
node *temp = new node;
start_ptr = temp;
for(int i = 0;i<3;i++)
{
cout<<"\n enter the name ";
cin>>temp->str;
temp->nxt = temp;
temp = temp->nxt;
}
}
into:
void insert()
{
node *temp;
node *prev = NULL;
for(int i = 0;i<3;i++)
{
temp = new node;
if ( prev )
{
prev->next = temp;
}
else
{
start_ptr = temp
}
cout<<"\n enter the name ";
cin>>temp->str;
prev = temp;
}
temp->next=NULL;
}
I have NOT made a test, but it should work...
-- modified at 8:26 Friday 30th March, 2007
-- modified at 8:29 Friday 30th March, 2007
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
thanku very much it solved my problem
now i want to display all the three items also..
thanks in advance
|
|
|
|
|
That was the second problem I described. Just add a temp->nxt = NULL; just after temp = new node; in your insert function.
Even better: provide a default constructor for your node structure and in there, initialize tmp to NULL so that you never forget to do that .
|
|
|
|
|
thanku very much it solved my problem
|
|
|
|
|
neha.agarwal27 wrote: I m trying to make a linked list. in which three items are present...
hmmm. looks like you only add one item.
node *temp = new node;
start_ptr = temp;
After that, the for loop is pretty much much non-sense.
Try to think it over and do your analysis on paper, draw boxes (for the node) and arrows for the next pointers.
|
|
|
|
|
At risk of stating the obvious:
This is obviously homework. That's fine, you've tried to do it yourself and asked for help, which is what the site is for. But, while I think everyone should write a linked list class, and a dynamic array class, at a minimum, once you've done that, for any code you write, you should use std::list and std::vector as your containers. You should write them to understand how they work, and what their relative cost is, and their strengths and weaknesses are. So, once you've learned from writing this class, don't make the mistake of using it for any future projects
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
what abt using std::list try http://www.cppreference.com
|
|
|
|
|
I have the written the following method for disabling some controls:
void RecordImageWindow::SetImagePanelEnabled(HWND hDlg, bool enable){<br />
SendMessage(GetDlgItem(hDlg, IDC_TXTIMAGEFILELOCATION), WM_ENABLE, (WPARAM)enable, 0);<br />
SendMessage(GetDlgItem(hDlg, IDC_COMBOIMAGEFILETYPE), WM_ENABLE, (WPARAM)enable, 0);<br />
SendMessage(GetDlgItem(hDlg, IDC_CMDIMAGEFILELOCATION), WM_ENABLE, (WPARAM)enable, 0);<br />
<br />
}
I've checked the LRESULTs and called GetLastError and there are no problems, however none of the controls get disabled (the enable parameter is false). The text box gets greyed out but input can still be typed into it and the other controls are still usable.
Is WM_ENABLE the correct flag to send in order to disable Dialog controls? or should i be using something else...
|
|
|
|
|
use EnableWindow Function
GetDlgItem(hDlg, IDC_TXTIMAGEFILELOCATION)->EnableWindow( FALSE );
WM_ENABLE message is actually a notification send by windows when a window is enabled or disabled.
nave
|
|
|
|
|
The Solution:
void RecordImageWindow::SetImagePanelEnabled(HWND hDlg, bool enable){<br />
EnableWindow(GetDlgItem(hDlg, IDC_TXTIMAGEFILELOCATION), enable);<br />
EnableWindow(GetDlgItem(hDlg, IDC_COMBOIMAGEFILETYPE), enable);<br />
EnableWindow(GetDlgItem(hDlg, IDC_CMDIMAGEFILELOCATION), enable);<br />
}
Thanks for your help, mate.
|
|
|
|
|
gunner_uk2000 wrote: The Solution:
Seems like I have asked the question
How ever your code will create compilation error.
you need to modify it as
GetDlgItem(hDlg, IDC_TXTIMAGEFILELOCATION)->EnableWindow( enable );
or
::EnableWindow(GetDlgItem(hDlg, IDC_TXTIMAGEFILELOCATION)->m_hWnd, enable);
nave
|
|
|
|
|
It compiles and runs fine.
GetDlgItem returns a handle to the dialog item, so it can be passed in as the parameter for the EnableWindow method.
You can't call Enable window from it as HWND is just a handle and had no Enable window method.
Ian.
|
|
|
|
|
hoo i thought u have called the CWnd::GetDlgItem function
nave
|
|
|
|