|
Anyone know how to use the ip control?? Maybe get the current machine's ip as an example... I would appreciate it.
<marquee>Universal Project
|
|
|
|
|
Getting a machine's IP address and using the IP control are mutually exclusive things.
gethostname();<br />
gethostbyname();<br />
CIPAddressCtrl::SetAddress();
are what you need to look at.
|
|
|
|
|
Let's pretend that you are talking to somebody that does not know anything about the IP Control. Examples are really nice things you know.
<marquee>Universal Project
|
|
|
|
|
And they are plentiful!
http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=cipaddressctrl&btnG=Google+Search
|
|
|
|
|
1) DWORD addr;
((CIPAddressCtrl*)GetDlgItem(IDC_IPIDDRESS1))->GetAddress(addr);
2) BYTE b1,b2,b3,b4;
((CIPAddressCtrl*)GetDlgItem(IDC_IPIDDRESS1))->GetAddress(b1,b2,b3,b4);
If address is 212.176.73.161, b1=212, b2=176, b3=73, b4=161.
yiy
|
|
|
|
|
I have a dialog application which hosts several sub dialogs. I need to send a message from one of the sub dialogs which can be received by all of the other sub dialogs. What's the best way to do this in MFC?
Todd Smith
|
|
|
|
|
Are the dialogs modeless?
|
|
|
|
|
Yes, the dialogs are modeless.
Todd Smith
|
|
|
|
|
If they are all children of a certain window use CWnd::SendMessageToDescendants
John
|
|
|
|
|
Good call, John. I was cooking up something much harder for him.
|
|
|
|
|
My first thought was to save a list of hwnds... But then I remembered about child windows...
John
|
|
|
|
|
SendMessageToDescendants works great except that it sends the message to the current window as well as the children. Annoying but I worked around it.
thx
Todd Smith
|
|
|
|
|
Does anybody know the best way/tool to merge source codes when
you are working with a lot of programmer except VSS?
|
|
|
|
|
sdfdsfa wrote:
...working with a lot of programmer except VSS?
What does this mean? Are you wanting to merge the source code from several different programmers but you are not using VSS?
|
|
|
|
|
Hi,
How can I delete a saved bitmap using the dfile name??
Ehsan Behboudi
|
|
|
|
|
Use DeleteFile() , SHFileOperation() , or CFile::Remove() .
|
|
|
|
|
All of the above + _unlink
John
|
|
|
|
|
Is there a way to properly display the new "XP" transparent 32-bit bitmaps (24b color + 8b alpha channel) as "normal" masked 24-bit bitmaps in Windows 2000/98?
I would like to avoid having to create 2 versions of every bitmap (XP version, Win2000/98 version), however the result I get is that the transparent sections in the 32-bit bitmap are displayed as a black background in Windows 2000/89. I would like to be able to choose the color in which the transparancy is converted into.
|
|
|
|
|
Hi All,
I was wondering if someone could tell me the reason why my project builds every single file in my project everytime I try to execute the exe file? After i build the code, make no changes and hit the execute it says all the .obj file are out of date. It never did this before, but all of a sudden it is making me build all the .obj and exe twice.
I already did a clean and it still does it. I thought if i don't make any changes, the file would know this and not build them all again.
Many thanks in advance
|
|
|
|
|
Try generating a make file. If the same problem occurs with nmake, maybe you'll be able to spot the dependency loop in the make file.
Brad
|
|
|
|
|
This might sound like a stupid suggestion, but check the date/times on all the source modules. If any of them are in the future, this will happen. Happened to me once when someone screwed up the machine we used as a time server, when it got temporarily set to some time in 2007...
Steve S
|
|
|
|
|
Why Transparrent blt not works in following code:
works with usual ::BitBlt()
<br />
works:<br />
::BitBlt(di.hdcDraw,<br />
0,0,100,100,<br />
m_hMemDC,<br />
0,0,
SRCCOPY );<br />
<br />
<br />
::TransparentBlt(di.hdcDraw,<br />
0,0,100,100,<br />
m_hMemDC,<br />
0,0,100,100,<br />
RGB(0,0,128) );<br />
<br />
__________________<br />
<br />
m_hMemDC = CreateCompatibleDC(0);<br />
<br />
HANDLE hOLDBitmap;<br />
<br />
hOLDBitmap=SelectObject(m_hMemDC, hBitmap);<br />
... code at above<br />
<br />
:DeleteDC(m_hMemDC);<br />
<br />
|
|
|
|
|
I never could get TransparentBlt to work on win 9x, so I just use the true mask method which I found at http://www.codeguru.com/bitmap/CISBitmap.shtml[^]
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
|
Hi, I'm making a Dialog Based MFC app and need to initialize a variable that keeps track of how many times a certain button was pushed (OnButton1()). I tried initializing in in OnInitDialog(); but it still gives me an unidentified error when I try to manipulate it in the function. I can't initialize it in the function itself because then each time the function is called it will be reinitialized to 0. Should I create a member variable for the function? Any help would be great. Thanks.
|
|
|
|