|
I have a problem to create a socket using WSA instead of MFC. I tried to include WSA functions, but it always fails saying unidentified function. I have included winsock2.h or I included it in my project ( using insert component ). Any idea how to solve this problem????
Thx in advance
Ivan
|
|
|
|
|
Maybe you didn't specify Ws2_32.lib .
rechi
|
|
|
|
|
Hi all,
I have a vague memory about seeing a document on how to add support for version control tools (like SourceSafe) in my own programs.
Apparently a few of the popular version control tools have a common interface.
I would love to get my hands on that document and the header file, but I can't find it anywhere.
Any ideas?
.Henrik
|
|
|
|
|
I have simple dialog box MFC application. I create modeless dialog box. But main dialog window is always drawn behind modeless dialog, even if main dialog has the focus. How to solve this ?
Thanks
rrrado
|
|
|
|
|
This is by design. If you make your modeless dialog a child of the desktop instead of your main dialog, then they will both claim the top position when clicked on. You do this by passing in NULL instead of this to the dialog constructor.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Thanks, thats what i was doing, but now i found the problem - passing NULL as parent in Create() does not set desktop window as parent !
It works only when i create dialog by this way :
m_dlg.Create(IDD_DLG,CWnd::FromHandle(GetDesktopWindow()));
rrrado
|
|
|
|
|
Then do it that way. What's the difference ( i.e. what happens differently, I always used NULL and it worked fine for me ) ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
I don't know, maybe different windows version, I use Win98.
rrrado
|
|
|
|
|
hi all,
i want to redirect IE to my own search engine...ex. www.abc.com in case it is unable to find a valid URL..as it does automatically and loads autosearch.msn.com...any help will be appreciated..please..
thanks..
Himanshu
|
|
|
|
|
this ought to be a simple one?
how do i get the active control in a window
ie the one that has focus currently.
----------------------------------------------------------
consider the following dialog app...
the dialog has 3 list controls
namely
Parent 1 ,
Parent2 , and
Child.
also one button "Add"
"Add" is suppoed to insert data into "Child" from either "Parent1" or "Parent2" depending on which is currently selected /focused....
----------------------------------------------------------
so how do i get the wnd pointer of the control that has current focus??
|
|
|
|
|
Neither will have the focus because your button will. You need to store the value seperately and change it whenever you click on either list.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
With WM_SETFOCUS you get the HWND of the window thar has just lost its focus.
You could save this one into a variable and use it in your OnClick() .
--
"My opinions may have changed, but not the fact that I am right."
Found in the sig of Herbert Kaminski
|
|
|
|
|
Hello, I now support user minidumps with my products, so I can debug their crashes if they have any. I now save pdb files with every release, and I want and need to save all the source files as well. I already do a full source backup every day. But it would be much better if I could have a full source backup of this release that included all used system and library header files as well as only the used header and source files of mine.
Is there such a utility that will take a list of source files, then search through them and gather all used header files, taking into account MSVC include directories and precendences? Ideally it would copy them to a specific place, or get a list of them, then I could back this minimal list of source and header files. Thanks for any advice.
|
|
|
|
|
|
VC++8. In the meantime, you're on your own, you need to hook those methods up by yourself.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Christian Graus wrote:
VC++8.
Really !! I mean are you saying this seriously??? Do microsoft have plans to include class wizard in next major version of Visual Studio ?????
|
|
|
|
|
I hope so, it's not hard to add ( they have the code ) and it makes a big difference.
Without it, MFC is almost unassailable for newbies, and I presume if they take it out they are herding us into the C# camp as fast as they can.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Read the help. Microsoft explains how to get by without using the class wizard. I actually like using the properties toolbar better.
Look Here...
Visual C++ Concepts: Porting and Upgrading
ah, i might as well just dump the information.
Where Are ClassWizard and WizardBar in Visual C++ .NET?
In previous versions of Visual C++, ClassWizard and WizardBar helped you develop your MFC application. ClassWizard and WizardBar have been removed in Visual C++ .NET. This topic discusses where ClassWizard and WizardBar functionality can be accessed in Visual C++.
WizardBar
To add a new class
In Class View or Solution Explorer, right-click the project node. On the shortcut menu, click Add and then click Add Class.
To add a function to a class
In Class View, right-click the class. On the shortcut menu, click Add and then click Add Function.
To go to a definition
Use the Navigation Bar, which is at the top of the text editor window. You can turn the Navigation Bar off from the General tab of the C/C++ folder, which is in the Text Editor folder of the Options dialog box (Tools menu).
You can also use the Object Browser. See Searching for Symbols: Objects, Definitions and References for more information.
ClassWizard
For more information about wizards that add code to a project, see Adding Functionality with Code Wizards.
To add a member variable
In Class View, right-click the class to which you want to add a member variable. On the shortcut menu, click Add and then click Add Variable.
For more information, see Adding a Member Variable.
To add a handler for a message
See Mapping Messages to Functions.
To add methods and properties to automation interfaces
In Class View, right-click an interface that supports automation. On the shortcut menu, click Add and then click Add Method or Add Property.
For more information, see Adding a Method or Adding a Property.
To add ActiveX events
In Class View for an ActiveX control project, right-click the class to which you want to add an event. On the shortcut menu, click Add and then click Add Event.
For more information, see Adding an Event.
To add a handler (function) for a user-interface item
Select the item in Resource View. For example, select a button. Press F4 to open the Properties window and click the ControlEvents button. Select a message in the left column and click Add from the right column. The function will appear in Class View.
For more information, see Adding an MFC Message Handler.
See Also
Ryan Baillargeon
Software Specialist
Fuel Cell Technologies Inc.
|
|
|
|
|
I know how the properties window works, but it only seemed to work for a narrow subset of messages, that is to say I could not link it to WM_ messages such as WM_MOVE or WM_CHAR.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
This may sound dumb, but does MFC under Visual Studio.NET run under the .NET Framework at all (i.e., does it support garbage collection, class framework....)? I was under the impression that it doesn't but my main focus has been with C# as of late. After looking at some of the things you can do with MFC in VS 6.0 I was beginning to think they had a nice library set. Just wondering if this is something that will continue to live from Microsoft.
Nick Parker
Not everything that can be counted counts, and not everything that counts can be counted. - Albert Einstein
|
|
|
|
|
At the moment MFC doesn't support .NET framework.
This is the big question that all MFC developers are asking, where do we go from here. Microsoft are being very quiet about a C++ Framework for .NET
I can't believe they won't do one - but I guess only time will tell.
Michael
Fat bottomed girls
You make the rockin' world go round -- Queen
|
|
|
|
|
As far as I understood it if you build something with the /clr option then your application will be in the form of IL. I presume that if you use MFC (at least in a shared library) then the MFC portion would still be unmanaged. I've only used MC++ once for an ASP.NET control so I don't remember entirely how it works -- it's a weird hybrid
I think that the whole WinForms model is nicer (much clearner design IMO) but at the moment VS.NET doesn't support forms designer for C++ (but it does in the Everett release) and the WinForms controls themselves are pretty basic. My guess is that given another year it'll really take off.
--
Paul
"If you can keep your head when all around you have lost theirs, then you probably haven't understood the seriousness of the situation."
- David Brent, from "The Office"
MS Messenger: paul@oobaloo.co.uk
Sonork: 100.22446
|
|
|
|
|
Hi --
Supppose I have a text string like:
char text[30] = This is a great day ;
(my string comes like this, i.e. a char text[30])
Does anybody know how would I read the words of this string into cells in a [5] array? That is, how would I read this into an array called, say, words[5], where word[0] = This, word[1]=is, etc etc..
Thanks
KBL
|
|
|
|
|
strtok will split it up for you. You'll find life easier if you use std::string and std::vector though.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Christian Graus wrote:
You'll find life easier if you use std::string and std::vector though.
Just to build off of CG, I assume (should I say expect ) he will make some comment about the following code soon.
vector<std::string> vect;
vector<std::string>::iterator vi;
std::string a, b, c, d, e;
a = "Hello";
b = "This";
c = "is";
d = "a";
e = "test";
vect.push_back(a);
vect.push_back(b);
vect.push_back(c);
vect.push_back(d);
vect.push_back(e);
for(vi = vect.begin();vi != vect.end(); vi++)
cout << vi->c_str() << " ";
cout << endl;
Ah well, hope this helps. Going to bed now, I need to .
Nick Parker
Not everything that can be counted counts, and not everything that counts can be counted. - Albert Einstein
|
|
|
|
|