|
I try to download the file. But it's a webpage.
|
|
|
|
|
Yes it is a web page listing articles that contain sample/example Socket code. Please "READ" the web page.
led mike
|
|
|
|
|
Thanks for your help.
It's a stupid question.
I forget to login.><
|
|
|
|
|
Is your server/client system using SOCK_DGRAM or SOCK_STREAM. if you are using SOCK_STREAM then once the connection is accepted using the accept function there should be a socket variable that the client is connected to.
SOCKET server;
//assume already in listen state
SOCKET client = accept(server, ...);
use the client variable to send messages back to the client machine like the following:
send(client, ...);
Chipper Martin
|
|
|
|
|
I've got a standard MFC MDI app, and want to change the "MFC" icon to my own. In resource view, I've tried editing the icon (in VS) changing what file it points to, even deleting the "MFC" icon file - all make it look right in the resource view, but run the app and the "MFC" icon is still there. Is this called out explicitly in code somewhere?
Thanks
|
|
|
|
|
have you changed all the devices in the icon ?
a .ico file have several images of different sizes/resolutions, so if you don't change them all, you'll get strange behaviors ....
|
|
|
|
|
I totally deleted the IDR_MAINFRAME resource and icon file on disk. I then made a new icon by importing a .bmp... clean and rebuild... still the "MFC" icon (I think it's giving me the finger). It must be defined somewhere else or cached or something?
|
|
|
|
|
i think Explorer caches icons. at least, i've had the same problem you describe - the icon doesn't always update in Explorer after i've changed it in the EXE.
i'm not sure how to get it to recognize the new icon. maybe open a new Explorer window ?
|
|
|
|
|
I'm not as concerned about the icon displayed in explorer as much as the one in the upper left corner of the main window of my app...
|
|
|
|
|
the desktop is a part of Explorer.exe, too.
|
|
|
|
|
Did you also delete the project's .res file? In any case, doing a rebuild all should have accounted for the missing/changed .ico file.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Is there any simple way how to control mouse accross all windows.
I mean, move cursor and do click. (Some macro programs and tutorial presentatin
do so) Some SDK function?
Thank you
Viliam
viliam
|
|
|
|
|
the best way is to use windows hooks.
viliam wrote: (Some macro programs and tutorial presentatin
do so)
these programs mostly use the hooks.
see my article on hooking inside a process
http://www.codeproject.com/useritems/PickIconDlg2.asp[^]
for across process hooking see above article's messages at bottom.
Tanvon
the brain behind ...
I Blog here
|
|
|
|
|
I’ve created a composite control user control using C# (VS 2005). My control appears in the toolbox for all the VS 2005 languages with the exception of VS C++. I have tried adding the VS C++ project to the same solution that I used to build the control. The control shows up in the Choose Toolbox Items dialog under the .NET Framework Components tab. However, when I check the box along side the control name it doesn’t appear in the dialog editor. Please advise.
Thanks
Dave Ricketts
|
|
|
|
|
You probably have to create a managed C++ project to do that.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Does anyone know how to call SHBrowseForFolder (msdn link) from normal VC++ code? I've found an article describing how to call it using a MFC class but I don't want to go and learn how to use MFC classes I'd love to just call this function directly.
I'm not at a computer where I can test this but I'm just wondering if anyone else has wanted to open a browse for folder dialog from unmanaged c++ code. Or should I just bite the bullet and use
|
|
|
|
|
(i forget where i got this - Google search, most likely)
bool BrowseForFolder(HWND hWnd, char *buf)
{
LPMALLOC g_pMalloc;
if (!SUCCEEDED(::SHGetMalloc(&g_pMalloc)))
return false;
BROWSEINFO bi;
LPITEMIDLIST pidlMyComputer;
LPITEMIDLIST pidlBrowse;
if (!SUCCEEDED(::SHGetSpecialFolderLocation(hWnd, CSIDL_DRIVES, &pidlMyComputer)))
return false;
bi.hwndOwner = hWnd;
bi.pidlRoot = pidlMyComputer;
bi.pszDisplayName = buf;
bi.lpszTitle = "Select root folder";
bi.ulFlags = BIF_RETURNONLYFSDIRS | BIF_RETURNFSANCESTORS | 0x40;
bi.lpfn = BrowseCallbackProc;
bi.lParam = (LPARAM)buf;
pidlBrowse = ::SHBrowseForFolder(&bi);
bool result = (pidlBrowse != 0);
if (result)
{
if (!::SHGetPathFromIDList(pidlBrowse, buf))
result = false;
g_pMalloc->Free(pidlBrowse);
}
g_pMalloc->Free(pidlMyComputer);
return result;
}
|
|
|
|
|
|
How about this?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
The MSDN link gives an example of how to use it without MFC (that is, there is no MFC code in their example). You will have to use COM and some Win32 API calls, but that should have been expected.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Thanks for all the answers, guess I wasn't searching hard enough.
|
|
|
|
|
I'm trying to implement a copy ( to clipboard ) from a IWebBrowser2; this is what I'm doing, and it works on Win2K, but not on XP, especially SP2.
We generate HTML on the fly and "give" it to the browser, it's not based on a HTML file.
HRESULT hr;
hr = _Browser->ExecWB(OLECMDID_SELECTALL, OLECMDEXECOPT_DODEFAULT, NULL, NULL);
hr = _Browser->ExecWB( OLECMDID_COPY, OLECMDEXECOPT_DONTPROMPTUSER, NULL, NULL);
hr = _Browser->ExecWB( OLECMDID_CLEARSELECTION, OLECMDEXECOPT_DONTPROMPTUSER, NULL, NULL);
After Further reading ...
There is a new "Local Machine Zone Lockdown" setting that seems to restrict some operations, like the one above.
one suggestion from Microsoft that might be working for us ( I will try it ) is to add the "Mark of the Web" on the HTML, something like :
<!-- saved from url=(0014)about:internet -->
<!-- saved from url=(0020)http:
but I'm not sure this will work from HTML not from a "real" web page ...
Anyone with a clue ?
Thanks.
-- modified at 10:30 Wednesday 20th September, 2006
|
|
|
|
|
I found several things that "don't work" when you use the COM interface to write HTML to the control. In those instances I stopped using that technique and went to a temporary file solution.
led mike
|
|
|
|
|
That's one answer I did not want to hear.
still investigating.
Thanks.
|
|
|
|
|
Maximilien wrote: That's one answer I did not want to hear.
I understand, I felt the same way, but after I implemented it I felt much better about it.
Seriously, there are API's for working with temporary files so it is not that big a deal, really. I found performance negligible. I imagine the parsing of the HTML and loading of the DHTML DOM is a much bigger operation than file IO, and that must be performed either way.
led mike
|
|
|
|