|
hi,
In Win2000 there is ipconfig, in Win98 there is winipcfg . They can refresh the IP address without reboot .I am wondering that they act as dhcp clients and after they send out a dhcp broadcast message ,then the ip address is changed by the dhcp server .
So I think there would be one method to change the IP address without rebooting . In MSDN the SDK of IP helper is useful for config the network, but the functions seems to only work in Win2000 .And I also can't assign a IP address which I want to assign using those functions.
|
|
|
|
|
Hello, the codegurus around the world.;)
Well, I think that you are right as long as we set IP as DHCP checked in TCP/IP settings.
Because DHCP server assigns our client machine as the temporary IP address
on the view of the client and server.
However, on the other hand, we can assign the static IP address to our machine.
Actually, I use the static IP address for peer-to-peer network on my Windows 98s.
On this situation, I have to reboot my comp if I change my static IP address.
So, as long as we use DHCP support, and we know which IP address DHCP server has,
we can assign the dynamic IP address. However, if this IP address is assigned to
the other machine, the client and server will be screwed up?
We may need more to consider the code.
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
Hello
I want to compare two structures to find out whether they are identical or not.
What is the easiest way to do that?
thanks
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Assuming you're using C, not C++...
If the structure doesn't contain pointers, you can use
if( memcmp( &struct1, &struct2, sizeof( mystruct_t ) ) )
{
// different
}
else
{
// identical
}
This is fast, but assumes that a byte-by-byte comparison is valid (e.g. that padding elements will always match).
If there are pointers, you may wish to check the data they point to, instead of the pointer values themselves.
If you have nested structures containing pointers, this can get quite messy.
In C++, each data type can check for identicallity itself, so there's no problem.
|
|
|
|
|
What? In C++ each data type can check itself? Not true, not even close.
There's always the issue of a logical compare versus a bitwise compare.
Take something like
CString a = "Hi";
Cstring b = "Hi";
Depending on compiler settings (like string pooling) these may or may not point to physically different strings. In that case a bitwise compare would fail.
In C++ one way would be to have classes implement operator ==
But there are many different ways to approach this problem. It just depends on what you need.
--
Bryan
|
|
|
|
|
" What? In C++ each data type can check itself? Not true, not even close."
"In C++ one way would be to have classes implement operator == "
Should have been clearer - the == operator is what I meant. Then recursed classes are not the problem they are in C.
|
|
|
|
|
Ah, ok, my point back to gregor is that even if you implement operator ==, there is no magic, you still need to decide how your class is going to test for equality. And if your class has many memeber variables, you'll need to test all of them.
--
Bryan
|
|
|
|
|
In my MFC dialog app I need tooltips for items in a CListCtrl. My implementation is similar to that in Matt Weagle's 'Using the List Control' tutorial. E.g. I'm handling the LVN_GETINFOTIP message with
void CMyDlg::OnInfoTip( NMHDR * pNMHDR, LRESULT * pResult )
{
NMLVGETINFOTIP * pInfoTip = reinterpret_cast<nmlvgetinfotip *=""> (pNMHDR) ;
_tcscpy( pInfoTip->pszText, _T("Some tooltip text") ) ;
}
The tooltips appear BEHIND the dialog box (so only the end of the tip shows past the end of the dialog)
Can anyone help?
Thanks
Monty
I'm using NT4.0, and VC6
|
|
|
|
|
I had problem like this with treectrl in floating toolbar. You may try with this code - it makes tooltips the topmost window:
::SetWindowPos(
(HWND)m_yourListCtrl.SendMessage(LVM_GETTOOLTIPS),
HWND_TOPMOST,
0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE);
Note that you need to get listctrl tooltips using API - MFC doesn't have a wrapper for LVM_GETTOOLTIPS in VC6.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Thanks for your suggestion Tomasz.
It does bring the tooltip to the front, but when I move the cursor over a new item (without clicking on it), the tooltip vanishes for about 1 second (and the dialog box title shows that it is no longer the active window), and then it reappears OK.
Any suggestions gratefully received...
Monty
|
|
|
|
|
Adding the SWP_NOACTIVATE flag to the SetWindowPos call prevents this problem.
Thanks again for your help Tomasz.
|
|
|
|
|
how can i fill the testprintpage in VC++ ?anybody knows pl.. let me know about it with code
|
|
|
|
|
Hi,
I have created a class with CPropertyPage as its base.
I am then using the m_psp member to build a PROPSHEETPAGE structure which I pass to CreatePropertySheetPage function to create a property page I can add to a device's property pages.
The problem comes when in one of the routines for a button on my CPropertyPage I create an instance of a CDialog class I have and call DoModal()
The device manager crashes when this is run.
Any ideas why would be useful.
thanks
|
|
|
|
|
Hello!
I'm trying to create a MFC dll that makes use of MS WebBrowser activeX
component. Another application loads the library runtime and calls certain
function that creates a dialog box with an explorer control. When creating
the dialog box, however, the initialization of browser control fails,
reporting
CoCreateInstance of OLE control {8856F961-340A-11D0-A96B-00C04FD705A2}
failed.
>>> Result code: 0x800401f0
>>> Is the control is properly registered?
Warning: CreateDlgControls failed during dialog init.
In the dll initialization, I call AfxEnableControlContainer().
If I build an EXE that creates a simple dialog with explorer control, it
runs just fine, but if I try to use it in a DLL, things don't work out.
Any ideas how to make it work?
|
|
|
|
|
I'm not an MFC newbie and I'm still having the same exact problem with a different ActiveX control. I've been told that you also need to make a call to AfxOleInit() in the DLL initialization, but I've done that and it hasn't helped me a bit. Nobody so far has been able to help me solve this problem and it's really becoming frustrating. Let me know if you find a solution.
|
|
|
|
|
Hi Everybody
I need to create a CListCtrl of which one of the subitem is more than 300 characters - I found that the CListctrl by default limits its subitem's max lengh to around 260 characters. Even though i see the value in the debugger - it's truncatd when i view it on the screen. Any code would be of much help.
Thanks in advance.
regards
Sankar
|
|
|
|
|
I've seen the same problem and thought it was a bug in my code at first. It's pretty pathetic, really. 300 characters is not a sensible limit, if any limit is sensible in the first place.
Death to fixed-size buffers!
|
|
|
|
|
I want to fax some documents through my project which was doveloped in Doc\View.My system dosen't supprt Windows2000.it should work on only NT.can anybody help me to code it?this is very urgent...
|
|
|
|
|
What is a good, relatively simple (and *free* preferably) program to create
patches with?
I had experimented with BinPatch for a little bit, but the one thing I don't
like about that is that it always creates backups on the users computer of
the file(s) it patches. In the docs for it, it said that in the next
version, there would be a way to set backup to none, but apparently there
never was a "next version". Also I would love to have a GUI interface for
the patch creator, but the one for download (www.binpatch.com) is
corrupted...
Does anybody else know of a good program I could use?
Thanks!
Adam
cabadam@houston.rr.com
|
|
|
|
|
Try PCOM
All the crackers seem to use it.
http://huizen.dds.nl/~exed/
Cheers,
Peter
|
|
|
|
|
That download goes incredibly slow and disconnects constantly.
Anybody else have a suggestion?
Adam
cabadam@houston.rr.com
|
|
|
|
|
I am learning C++, and I am trying to make globber (Sample on MSDN CD) and it draws a SDI window and all of its functions are LRESULT. I am trying to make it into a Dialog application for easier use but I keep getting errors. Does anyone know how I should go about converting this. Thanks in advance.
-Matt Newman
|
|
|
|
|
I'm working on a program that can work with both NT and Win9x. I finish the NT version first, then try it in Win9x. I found that after doing output awhile or moving the window around, the font change!!!! And also the system change too (all system dialog box font changes..).....and if I did something....Win9x asks me to terminate the program too....(this dialog font has been changed too)
Moreover, when I do drawing......after the font change.....no colour can be displayed....only black and white.
My question is....do i have to do anything when I migrate the NT program to win9x. Are they different?
|
|
|
|
|
That sounds like you have a severe leak that's eating up GDI resources. Win9x still has old Win 3.1 memory limitations, so that's why you see the problems on 9x.
--Mike--
http://home.inreach.com/mdunn/
#include "buffy_sig"
|
|
|
|
|
Can you tell me what should I do??? Because i really have no idea how to fix the problem.
But thanks to telling me that.
|
|
|
|