|
but then how to select the correct one????
With Regards
Joseph R. Thomas
Have a Super Blessed Day!
-------------------------
For God has not given us a spirit of fear, but of power and of love and of a sound mind.
2 Timothy 1:7
|
|
|
|
|
Joseph_R_Thomas wrote:
but then how to select the correct one????
They are all correct. I will explain. Think about the case where there is a lan connected to one network adapter and a second network adapter is conected to the internet using a dsl modem. One ip adddress will work to talk to the other pcs on the lan. The other ip address will work for the internet.
I assume you mean the one connected to the internet?? I am not sure.
John
|
|
|
|
|
u see..in my school its al connected to lan so there is only one ip..
at my house however as i showed you in the first or second post..there are more than one IP Address....in this case i need the IP Address that connects to the internet...the one that is called IP Address not AutoConfiguration IP Address.....
so in school the codes work fine..but at home...i got prob since i need to select the IP Address not the Auto config IP Address....
With Regards
Joseph R. Thomas
Have a Super Blessed Day!
-------------------------
For God has not given us a spirit of fear, but of power and of love and of a sound mind.
2 Timothy 1:7
|
|
|
|
|
I might be on the wrong track here but when you call bind on a socket you can specify ADDR_ANY for the ip address. Then, windows will sort out which actual IP address to use based on routing information - this saves you having to manually determine which IP address you need to select.
Phil
|
|
|
|
|
I was thinking the same. It depends why he wants the address.
John
|
|
|
|
|
recently i work on oledb&sqlserver, for some reason , i use many unregular table name just like guid, for example: 4DACE4ED-55A9-4F9C-9270-CE73CBF067F3.
there is no problem on my computer at all, but yesterday i install the application on an other machine, it does not work anymore,so i debuged the program on that machine and found that creating table is ok, but error occurs while opening a table with such unregular name. can anyone please tell me what the reason?
should i need any aditional package?
many thanks
|
|
|
|
|
All right, I think I'm a little dense here! So, I'm going back to some basic questions.
When drawing objects on the screen, what is the best mapping mode?
When storing these objects (locations) in a file for sending, printing, and all the other goodies that you can do? What should be the best way to store. Locations. In logical or display?
When inputting text blocks (like edit or rich edit) how do we save the text so that when it is read back into a system that has a smaller resolution that is looks like it did with the bigger?
Any advise would help. Act like I'm a windows newbie (at this point asking these questions, I think I am! )
Thanks fellas
Larry J. Siddens
Cornerstone Communications
TAME THE DOCUMENT MONSTER
www.unifier.biz
|
|
|
|
|
for storing the object,I often use CFile class to write into disk,
or use IStorage and IStream.
dupengfei
|
|
|
|
|
Thanks PengFeidu,
I was wondering about the data locations. Do you draw them in MM_TEXT and save the MM_TEXT points or do you change them into logical and save that?
Larry J. Siddens
Cornerstone Communications
TAME THE DOCUMENT MONSTER
www.unifier.biz
|
|
|
|
|
This is probably a ridiculously easy question but I can't seem to find the answer in the documentation:
How do you make an application minimize without requiring the user to actually click on the minimize button or the system menu?
|
|
|
|
|
|
i created a dialog1 and a database. the CRecordset class have already been added and member variables added using m->pSet. how to link the dialog1 to the database such that the database dialog will appear when a button in dialog1 is clicked? is there any sample code for database using dialog coz i surf around and found samples for SDI (using formview/recordview) database only.
|
|
|
|
|
I'm unable to determine if you have two dialogs or just one. If two, then the button-click handler on dialog 1 will create an instance of dialog 2 and call its DoModal() method.
If, however, you are trying to associate a CRecordset with a CDialog , here are the steps:
1) Call the recordset's Open() method in the dialog's OnInitDialog() .
2) Create some sort of "UpdateControls" method that updates the dialog's controls with the current CRecordset values.
3) In this "UpdateControls" method, simply call SetWindowText() for each control, like:
m_Name.SetWindowText(m_set.FirstName);<br />
m_Addr.SetWindowText(m_set.Address);<br />
m_State.SetWindowText(m_set.State);
Make sense?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
i am using the following:
BOOL CDLGdb::OnInitDialog()
{
CDialog::OnInitDialog();
m_pSet->Open();
UpdateControls();
return TRUE;
}
void CDLGdb::UpdateControls()
{
m_AddressID.SetWindowText(m_pSet->m_AddressID);
}
i get errors of 'm_AddressID' : undeclared identifier and
left of '.SetWindowTextA' must have class/struct/union type
how to resolve this?
|
|
|
|
|
Is m_AddressID a CEdit control variable?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
yup it is my dialog editbox ID.
|
|
|
|
|
i am veri desperate to link my database to a dialog(no formview/record view) if possible, is there any good samples around of a dialog which pop the database? thanx!
|
|
|
|
|
Did this not help at all?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi,
I have a VB program and I would like to run it in VC++,
is that possible?
Ehsan Behboudi
|
|
|
|
|
If your VB program is a com dll/exe, then using it in VC++ is no different than using a com object written with VC++.
If it is a regular exe, then you can use the CreateProcess function (see MSDN for details).
My articles and software tools
|
|
|
|
|
yes, the VB objects are all COM objects.
I have a whole bunch of functions in VB,, which I would like to use in VC++.
They are all COM objects.
How can I use the functions, or include the .bas in my VC++ so I could just call the functions in VC++.
Ehsan Behboudi
|
|
|
|
|
mr2003 wrote:
How can I use the functions, or include the .bas in my VC++ so I could just call the functions in VC++.
You can't use the .BAS functions.
If you look up #import on MSDN, you should be able to call your VB COM objects from C++ easily.
Michael
'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879
|
|
|
|
|
I want to make a game of tic tac toe that will respond kinda like a real life person does in a game. I already have everything laid out and made it's just that I'm having difficulty making the comp respond. See, I added a seperate function for the comp move. I added also "if ( middle is blank then make a move their... then that's were everything goes blank... my board is set up by an array... matrix[3][3]... I would like the comp to check if there are any rows empty and if so then try to fill one up... also would like to check if the comp can block the user and if the user blocks the comp then try new colomn / row...
1 2 3
1 | |
---|---|---
2 | |
---|---|---
3 | |
Please Help!!!
<marquee>Universal Project... Soon to be a .net
|
|
|
|
|
Working with AI is like asking how a long a piece of string is. There is no definitive answer. However, the techniques used in games and indeed everywhere, construct their AI using a rule based methodology. You need to gradually develop rules that define the scope of consideration for the computer. If a player moves in a left column, then you need to do defensive checks first, for instance, to make sure the computer does not lose on the next move, before making an attacking move that will put the opponent in danger of losing. That is one rule that implements a defense before attack strategy (you may want to do something else). But that is the first basic strategy of the computer. You can then build on that, if I need to do a defense move, what should I consider etc. If you look a Bantumi on nokia phones, on easy mode, its possible to beat the computer with the exact same moves every time, because its a fixed rule based system (no random decisions), you may also want to incorporate random decisions further down the line (i.e. have a number of potential moves and instead of selecting the 'best' select one at random), this may make it easier and more human like . Obviously I can't code it for you cos that would take a fair amount of time, though not that much for a uni project Good luck.
Alan.
|
|
|
|
|
Hi,
In my SDI application, I have 2 tree controls in a formview, which can be selected by tab control. On tabchange(), I select the root of the tree in which I switched. But, as soon as I switch although it actually selects the root items of the trees, the whole tree becomes grayed and if I have to click on the tree control to see the items. Please help, following is the way I do it:
if (m_TabCtrl.GetCurSel( ) ==1 )
{
m_TreeCtrl2.SelectItem(NULL);
m_TreeCtrl2.SelectItem (m_TreeCtrl2.GetRootItem());
}
if (m_TabCtrl.GetCurSel( ) ==0 )
{
m_TreeCtrl1.SelectItem(NULL);
m_TreeCtrl1.SelectItem (m_TreeCtrl1.GetRootItem());
}
I have to deselect the item first and then select it, because this way my application works, that why using m_TreeCtrl1.SelectItem(NULL);
Binayak
|
|
|
|