|
Fetch some TCP sniffer and have a look at a dialog between Outlook Express and a commercial SMTP server. My guess is that you'll spot some significative difference with your interaction that will explain the problem.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I did that! (there don't seem to be many (good) (free) packet sniffers out there though).
I was doing this: (simplified)
char p_strCmd[]="200 Ok\r\n";
Send(p_strCmd, sizeof(p_strCmd), 0);
But sizeof(p_strCmd) includes the terminating null, which i'd forgotton. so i was actuially sending "\r\n\0". Which was screwing outlook up halfway through the mail process.
It works fine now. Pretty quick too, i've impressed myself
Thanks (again!) Joaquin!
Jon
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Can anyone help me figure out how to fix this syntax error. i am trying to transfer my Board Class to a MFC wizard generated application. the Board class was created before in another program but i decide to reuse it but it gives me this error:
fatal error C1010: unexpected end of file while looking for precompiled header directive
I know my class declaration and implementation is working fine. so i went and included my class to the CBoardView. but then it gave me this error. can anyone tell me ? what's wrong?
|
|
|
|
|
You forgot
#include "StdAfx.h"
|
|
|
|
|
Either include stdafx.h or tell VC to not use precompiled headers for your file.
Go to Project > Settings
Choose All Configurations
Select your file (board.cpp ?)
Select the C/C++ Tab on the right
Choose the category Precompiled Headers
Then select Not using precompiled headers
Hope I got that right
honk() if $you->love(PERL);
|
|
|
|
|
THANKS... I REALIZED THAT AFTER AWHILE..
|
|
|
|
|
It's beeter to use automatic use of precompiled files
Because with the other selecction when you make a liitle change the compiler recompile oll the file again, with the automatic choice the compiler don't do that...
Regards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
I created a ToolBar using TBSTYLE_LIST style.Used following code to add buttons and Icons. I want to place icon on the left of ButtonText, but the Icons cover the button text(cascade),why?
void CMyToolBar::AddSomeButton()
{
SetButtons(NULL,n);
GetToolBarCtrl().SetImageList(image);
for(int i=0; i< n ;i++)
{
SetButtonInfo(i, nID, TBSTYLE_AUTOSIZE|BTNS_SHOWTEXT, iImage);
SetButtonText(i, lpszText);
}
}
Thanx
|
|
|
|
|
If you use icon for regular CButton class it cover the button text,there is two solution
1.use CBitmapButton ,but its painful.
2.subclass CButton and draw it your self,like the buttons in CP,
I suggest you use one of buttons in CP,they are really perfect.
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
The button is not CButton, just a ToolBar button.
|
|
|
|
|
What styles are you using in creation of the toolbar? AFAIK, the BTNS_SHOWTEXT button style is only useful when the toolbar has the TBSTYLE_EX_MIXEDBUTTONS style; it is unnecessary if you want to display the set text for all your buttons.
farewell goodnight last one out turn out the lights Smashing Pumpkins, Tales of a Scorched Earth
|
|
|
|
|
I remove BTNS_SHOWTEXT flag,but it doesn't work also.
I want to create a toolbar like IE with adding button dynamicly.
|
|
|
|
|
Nothings coming to mind i'm afraid... Are you making sure to add all the buttons before the toolbar is first shown?
If you'd like to send me the code you're trying to use, i'd be happy to take a look at it.
farewell goodnight last one out turn out the lights Smashing Pumpkins, Tales of a Scorched Earth
|
|
|
|
|
Or must I use that from C Runtime Library.
I looked at lstr... functions in docs but didn't find any suitable.
|
|
|
|
|
What is wrong with using CRT ?
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
I am just trying avoid linking with static library whenever I can link with system DLL (the case of WinAPI functions). Static linking enlarges my exe file, and this is the only cause I am looking for equivalent.
|
|
|
|
|
To the best of my knowledge there's no equivalent API to strrchr (nor to strchr BTW). But writing your own versions to avoid linking the CRT is extremely easy.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
It's really easy if you use the CRT source code (strrchr.c)
Gavin
|
|
|
|
|
|
Where did this UFO come from? ...go MSDN to do some search... it's in the shell library! Good catch, Nish! The only caveat of this function is that its base line is Win95+IE4.0. For those who care about maximum platform support this could be a problem.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
|
Hi !
RPC is not realy supported under windows CE, but I need to create uuid (on desktop applications, I'm using UuidCreate).
How may I do ?
Emmanuel Derriey
|
|
|
|
|
Dear all,
I need to write an program just like the resources meter in Win 95, which will look on the system resource, include GUI heap, User heap, etc to get a rough estimation of the free system resources. Such program will be run on win9X.
Is there any API/Class can I use.
Thx.
Marco Hung
|
|
|
|
|
Hi.
I began and finished reading chapter 9 of Promise's book on MFC today. I believe I have reached a milestone in the journey to become a proficient...good MFC programmer.
Here is what I know.
MFC = application object->frame window->view->documents
Promise emphasized that documents as an abstract concept object including data. I interpret documents as dealing with the program's "purpose" i.e. program theme.
Nonetheless, I have not come to a complete understanding as to what comes first: view or documents. For example, as program designer and developers, we should always walk the steps of a program user. I am not completely sure as to where is the clear separation of view and documents, event though view is the program interpreter. View does the drawing according to the data from documents.
For example, let say I am working on a program that reads data from a file and puts it on a window in *binary* mode. Let say I create three classes using AppWizard and ClassWizard:
1) ConceptPro (mainframe window)
2) view
3) document
First, the classes above are MFC's generated classes.
Conception is the application object and it handles all the taskbar, menu, etc.
View draws the childframe, *binary* data from a file, etc.
Documents handles the data such as filename, file data, etc.
Is the description above valid? Please point out where I am "going off track" or "missed something important."
Lastly, let say I have other classes that manipulate the data in the file *before* outputing it. Where should I instantiate these classes in documents or in view? I am not completely clear as to rank of document and view.
Thanks,
Kuphryn
|
|
|
|
|
IMO I believe that the Document should be designed first. It is possible to create multiple views of the same document. In fact, each of these views can display some different aspect of your document. Therefore, because the Document is the item that all of the views have in common, the document is the object that should be designed first.
It may be useful however, to take into account what you want your view to display, this may give you some clues as to the types of data that may be required in your Document object, but may not be immediately apparent.
kuphryn wrote:
Lastly, let say I have other classes that manipulate the data in the file *before* outputing it. Where should I instantiate these classes in documents or in view? I am not completely clear as to rank of document and view.
Here is an attempt to create a quick diagram of a clean design for what you have described.
This is not an inheritance model, but a model of the owners of all of the objects. The arrows
point to the child objects that a parent object owns.
--------------------------------------------------
| |
| Main Window |
| |
--------------------------------------------------
| | | |
| | | |
| | | |
V | V V
------------ | ------------- --------------
| View 1 | | | View 2 | | Document |
------------ | ------------- | Mutator |
| --------------
|
V
----------------
| Document |
----------------
In this diagram, all of the objects are owned by the main window, the simply point to the document, and use the data in the document. View the Document as a piece of data with accessor functions.
With this in mind then you will need other classes that manage the data (document mutators), whether you edit it with an edit control or some other method. These items should be owned and controlled by the main window / main module. This allows the data to be separated from the implementation. This design would also allow you to reuse the document object that you created in a completely different app with a completely different front end (optimal code resue).
While I know that this is not always the final result in the practice of software engineering, it is a main goal of object oriented software design.
|
|
|
|