|
recvfrom is used with UDP to get the source socket address of a packet.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Thanks, Smith!
I also find that recvfrom can get more src address information.
It is another useful usage of recvfrom.
Cheers,
George
|
|
|
|
|
hello every1
-VC7: in the IDE open an exe/dll file to examine the resources
-i can see the resources tree (dialogs, icons etc.)
-i can edit/copy any resource but only staying within this tree
Question:
-how to insert one of these resources (for example a complex dialog to use it as a starting point for layout a similar one) into an existing project?
thanks in advance for any tip
best regards
|
|
|
|
|
In VC 6, resources were a text format which you could copy between projects. I dunno if this is still the case tho.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
lbc wrote:
hello every1
-VC7: in the IDE open an exe/dll file to examine the resources
-i can see the resources tree (dialogs, icons etc.)
-i can edit/copy any resource but only staying within this tree
Using VC++ I personnaly usually have both the current resource tree open, and I do a open file, adding the other .rc file in the open windows. Then I can select and copy a resource from one of the trees, and paste it to the other.
VC++7 does not change anything to this.
Now if you are using VC++7 with a managed C++ project, it's of course a different matter. You can't copy/paste resources from/to a .rc to a .resx
In fact, what you need is a VC add-in. But I wonder how many years you have to wait before someone comes with such a useful tool (which should have been provided by the way by MS). These days, people on Cp seem to love articles for instance explaining how to crack a url, even though at the end they just use ::InternetCrackUrl(). As long as we are stuffed with this kind of sh*t, I am afraid you are unlikely to see anything good for you or for the overall dev community.
Good luck!
Back to real work : D-16.
|
|
|
|
|
add the resource to ur project,copy those resource you require into your resource. It may give some error when you compile update the string table if required
hope it solves your problem
|
|
|
|
|
udayGovekar wrote:
add the resource to ur project,copy those resource you require into your resource. It may give some error when you compile update the string table if required
What do you mean ? Aren't you saying that although you can copy/paste resources from two projects, it won't work in the end ?
udayGovekar wrote:
hope it solves your problem
Not mine, eh.
Back to real work : D-16.
|
|
|
|
|
you copy and pasted the rsource but still it might give you a compilation error because of ID not defined.
I have done simillar kind of work in one of my projects, it gave compilation error.
Delete the resouce you have added for copying into ur current project
|
|
|
|
|
It might giving u error saying some resource not defined, chek for that and update your string table
If still there is a problem then tell me what exaclty the error message is
|
|
|
|
|
I have to disagree then. I have just done a test and when I pasted the dialog and menus from another project, all the missing resource IDs in resource.h have been created.
At least it works for dialogs and menus. What are the kind of resources which raised issues for you ?
Back to real work : D-16.
|
|
|
|
|
Thank you both guys
>>Using VC++ I personnaly usually have both the current resource tree open, and I do a open file, adding the other .rc file in the open windows. Then I can select and copy a resource from one of the trees, and paste it to the other. VC++7 does not change anything to this.
you are rigth, i have tried again and this time it works as advertised
for some strange reason the 'paste' action was grayed before on the resource tree inside my vc7 IDE
thanks again!
best regards
|
|
|
|
|
Does anyone know some simple SMTP client sample?
How to comunicate with SMTP server by socket functions.
Than you
|
|
|
|
|
|
Hi.
How can I acces for painting the client area of the main frame window (derived from CMDIFrameWnd) in multi-doc application?
Thanks in advance...
Juntek
|
|
|
|
|
you have WM_PAINT message, that you can use to paint the client area
|
|
|
|
|
I've checked it already and it seems to not work, I'm afraid...
thanks
|
|
|
|
|
use this in ur mainframe.cpp file, this is not a member function
long FAR PASCAL NewMDIClientProc(HWND hWnd,WORD wMesg,WORD wParam,LONG lParam)
{
switch (wMesg)
{
case WM_SIZE:
{
}
case WM_PAINT:
{
}
}
}
|
|
|
|
|
I used the SetCursor() function to change the cursor when the mouse pointer is on a button or on a notified picture,that I've been told, but there's something I'm doing wrong. Can anyone send me an example on how to do it???...Please in Win32 application..
|
|
|
|
|
BOOL CISSimpleViewerDlg::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
if (pWnd==(CWnd *)this)
{
if (nHitTest==HTCLIENT)
{
if ((message==WM_MOUSEMOVE) || (message==WM_LBUTTONDOWN) || (message==WM_LBUTTONUP))
{
if (m_bNeedGrabber)
{
if (m_hDIB!=NULL)
{
if (m_bMouseInImage)
{
if (m_bBtnDown)
{
SetCursor(AfxGetApp()->LoadCursor(IDC_CLOSEDHAND));
}
else
{
SetCursor(AfxGetApp()->LoadCursor(IDC_OPENHAND));
}
return TRUE;
}
}
}
}
}
}
return CDialog::OnSetCursor(pWnd, nHitTest, message);
}
A conclusion is simply the place where someone got tired of thinking.
|
|
|
|
|
Thank you for sending me that example, but i wanna do that in a Win32 application too... Could you please send another one in Win32???
|
|
|
|
|
sorry - i don't do Win32.
-c
A conclusion is simply the place where someone got tired of thinking.
|
|
|
|
|
|
I have been trying to do that for a while now too and I just figured it out, almost...I subclassed the windows/buttons where I want the cursor to be a different image and I process the WM_MOUSEMOVE message setting the cursor like so:
WM_MOUSEMOVE:
SetCursor(hCursor);
The only problem with this is that when I click on the button it changes into the arrow for a fraction of a second then back to a hand...that's the best I can do for now. If you do find something better than this (Win32 of course) please let me know I am also very curious...Email georgiek50@yahoo.com.
|
|
|
|
|
Anonymous wrote:
WM_MOUSEMOVE:
SetCursor(hCursor);
The only problem with this is that when I click on the button it changes into the arrow for a fraction of a second then back to a hand...that's the best I can do for now.
Call SetCursor(hCursor) in the WM_SETCUROSR message instead and that will alleviate this problem. WM_SETCURSOR gets called before every single mousemessage, whether it is mouse move, button click or whatever.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Chris Losinger wrote:
i don't do Win32
Are you fixed on MFC? Are you gonna be that rest of your life?
You scare me! Don't do that....
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|