|
Hi,
I have this little part of code:
<br />
char* echoReply = new char[1024];<br />
int nRet;<br />
int nAddrLen = sizeof(struct sockaddr_in);<br />
sockaddr_in lpsaFrom;<br />
lpsaFrom.sin_family = AF_INET;<br />
lpsaFrom.sin_port = 0;<br />
<br />
nRet = recvfrom(s,<br />
(char*) &echoReply,<br />
1024,<br />
0,<br />
(sockaddr*) &lpsaFrom,<br />
&nAddrLen);<br />
<br />
if (nRet == SOCKET_ERROR)<br />
<br />
int error = WSAGetLastError();<br />
nRet (the return value of recvfrom) is 0xffffffff (SOCKET_ERROR)
but WSAGetLastError returns 0 (no error).
how can this be?
I don't think this is possible.
can anybody help me, please?
Thx
CND
|
|
|
|
|
I have a word file, with some text being bold, some
italic, etc., etc. Is their any way to open the
file and see the code behind the file? In latex, I
would see
\begin{bold}Bold text here\end{bold}
but I would like to see the code behind a ms word
doc file.
Please, any response any one can give me will be
greatly appreciated.
Sincerely,
Danielle (an overworked graduate student)
|
|
|
|
|
Word files are COM/OLE Compound Storage. This is what enables them to embed other office (say Excel documents) within them.
look at IStorage - Compound File Implementation
Beyond that Word markup is not publicly published to the best of my knowledge. However a cutdown version of Word markup called "Rich Text Format" is available and was published. It certainly has tags for basic font and paragraph control.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnrtfspec/html/rtfspec.asp
|
|
|
|
|
You might want to take a look at this page... download the doc links and take a look at them. hope this helps.
<url>http://www.wotsit.org/search.asp?s=text
-Tareq
|
|
|
|
|
Hi,
In my SDI application I want the following.
A splitter window splits the window in two parts.
In one part I have a FormView and in the other part I want to have a TreeView and a set of tabs at the bottom, allowing the user to toggle between 2 different TreeViews.
Should I add the CTabControl to the tree or, I’ll add the tab control first? How do I go about it? And do I need to have two separate treeviews, or, I can work with 1 treeview only?
Binayak
|
|
|
|
|
|
I have a couple questions about the CSettingDiaglog class at http://www.codeproject.com/dialog/csettingsdlg.asp[^].
I like to read through the source of projects to increase my knowledge and I had some questions about this source (especially since I'm an MFC genious by no means). What I want to know is if the author makes the assumption that whoever is going to use the class is going to have a dialog that has a button with an ID of IDAPPLY? It's used through out the code, but would only be used in a project that uses the dialog as modeless. I can't see how the code would compile if you didn't have the an IDAPPLY ID defined.
One other question. In the code header there is the following statement:
enum { IDD = IDD_SETTINGS_DLG }; I just want to know if that's how the program knows the dialog it should be showing when you open an instance of the CSettingsDialog class. For example if my dialog ID was IDD_CONFIG_DLG would I change the statement to say:
enum { IDD = IDD_CONFIG_DLG }; Thanks for any and all help/clarification.
I had one more question after posting. Could this code be used in a DLL or would you have to include the source in your project?
Thanks again.
- monrobot13
|
|
|
|
|
Hi
I am very new to MFC but I have some experience with win API and I am very eager to begin programming with MFC but I experiencing some difficulties. Is it possible to create a main frame window with only a dialog resource? So that when the window creates it will include all of the controls configured in the dialog resource. I thank you for any help.
Aidman » over and out
We haven't inherited Earth from our parents, instead we have borrowed her from our children; an old Indian saying.
|
|
|
|
|
do u mean a dialog based app?
select that option in the app wizard and voila!
"there is no spoon" biz stuff about me
|
|
|
|
|
Hello there,
I was looking at the Freeimage article by Markus Loibl. his MFC program works great but i was trying to test it myself using a small application. here is the code.
#include < iostream.h >
#include < stdlib.h >
#include < freeimage.h >
void main()
{
FIBITMAP *dib = FreeImage_Load(FIF_JPEG, "1.jpg", 0);
system("pause");
}
I know it does nothing but shouldnt FreeImage_Load(...) return something? VC says that it returns 0x000...
I have included the lib file in my project settings and it compiles ok. the jpg file is in the debug directory with the executable. Any comment would be welcome. Thanks.
-Tareq
|
|
|
|
|
check what return code signals a successful image load
usually 0 signals an OK i did it state
"there is no spoon" biz stuff about me
|
|
|
|
|
In Markus Loibl's code, it returns some value which is not 0.
-Tareq
|
|
|
|
|
Hi !
Well, I'll state my problem simply. It applies to Visual Studio .NET 2003 family.
I create a skeleton MFC app with database support through header files. Now, I go and create a form resource to function as my CRecordView-derived class' form. However, after I completed the form, I started binding it to a class. The only options available were the generic MFC classes CDialog, CFormView etc.
Now, is it possible to use the wizards to bind this resource to a CRecordView-derived class ? When I can't even add a CRecordView class manually into the Class View. The only available option is CDatabase, through the MFC ODBC Consumer option.
Thanks in advance,
Antti
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
I would like to make a program that connects to a server program, say mine, and would like to add a login, but I don't know even were to begin, can anyone help me with this problem, I would like to add username/password/register thingy.
<marquee>Universal Project... Soon to be a .net
|
|
|
|
|
So what part are you having trouble with? The network part or the user interface part or the login part?
- Mike
|
|
|
|
|
I guess with the network thing cause I already have the UI.
<marquee>Universal Project... Soon to be a .net
|
|
|
|
|
|
no see I was trying to say that I wanted a database of usernames and their passwords kinda like any login thing.
<marquee>Universal Project... Soon to be a .net
|
|
|
|
|
Well, that's something different entirely!
You should think of the process of logging in over the network as two individual parts: The network part (which concerns how the login/password is sent from the user interface to the server, as well as how the server responds), and the login ("authentication") part (where the server takes the username and password and verifies that it is valid). Instead of building the whole application at once, it is easier to build each piece individually so that if something goes wrong, you can test each part separately.
Getting back to your question, you're wanting to use a database to store the usernames and passwords. From your other post, I'm going to assume you're using MySQL to handle your database. To get started, you'll need to learn SQL, the language for talking to databases. A good interactive tutorial is here:
http://www.sqlcourse.com/[^]
Once you've got an idea of how a generic database works, you can progress on to actually creating a database in MySQL and interacting with it:
http://www.mysql.com/doc/en/Tutorial.html[^]
There, that should get you started.
- Mike
|
|
|
|
|
|
- Mike
|
|
|
|
|
I'm glad I have disabled the marquee-tag in my Mozilla Firebird
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I am building an edit control and i want this control to write Chinese characters even without setting the system language of the Windows to Chinese (same as MSN messenger does).
How can i do this?
Daed
|
|
|
|
|
I'm new to sockets can you give me good links on VC++ sockets.If I write a code in plain c sockets and port on VC++ will it work???
|
|
|
|
|