Click here to Skip to main content
16,005,491 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Context menu in CHtmlView question. Pin
Michael Liu14-Aug-02 6:35
Michael Liu14-Aug-02 6:35 
QuestionPressed Enter ? Pin
Hadi Rezaee14-Aug-02 5:09
Hadi Rezaee14-Aug-02 5:09 
AnswerRe: Pressed Enter ? Pin
Andreas Saurwein14-Aug-02 5:40
Andreas Saurwein14-Aug-02 5:40 
AnswerRe: Pressed Enter ? Pin
KingsGambit14-Aug-02 5:50
KingsGambit14-Aug-02 5:50 
QuestionListen a port using CSocket class ?? Pin
Cris14-Aug-02 4:52
Cris14-Aug-02 4:52 
AnswerRe: Listen a port using CSocket class ?? Pin
User 665814-Aug-02 5:39
User 665814-Aug-02 5:39 
GeneralRe: Listen a port using CSocket class ?? Pin
Cris14-Aug-02 7:21
Cris14-Aug-02 7:21 
GeneralRe: Listen a port using CSocket class ?? Pin
User 665814-Aug-02 7:50
User 665814-Aug-02 7:50 
If you have a dialog based app I suggest you to change CFrameWnd to CDialog. Then, e.g. in OnInitDialog() you simply call socket.SetParent(this);
One again, if you have a dialog you should replace all instances of "CMainFrame" to "CYourDialog" in the derived socket class.

Then you create the functions OnAccept, OnReceive and so on in your dialog class so that the Socket class can redirect the events to your dialog. (That's what ((CMainFrame*)m_pWnd)->OnReceive(); is for).

All you need to do before the Listen() call is to "Create()" your socket.

In the OnAccept() handler inside your dialog (or mainframe class) you simply call socket.Accept(...)

regards

modified 12-Sep-18 21:01pm.

GeneralRe: Listen a port using CSocket class ?? Pin
Cris14-Aug-02 9:20
Cris14-Aug-02 9:20 
GeneralRe: Listen a port using CSocket class ?? Pin
User 665814-Aug-02 9:46
User 665814-Aug-02 9:46 
GeneralRe: Listen a port using CSocket class ?? Pin
Cris14-Aug-02 10:21
Cris14-Aug-02 10:21 
QuestionListbox, how to make only full items visible? Pin
Anonymous14-Aug-02 4:21
Anonymous14-Aug-02 4:21 
AnswerRe: Listbox, how to make only full items visible? Pin
Anonymous14-Aug-02 15:54
Anonymous14-Aug-02 15:54 
GeneralDirection with MDI's Pin
NickOne14-Aug-02 3:58
NickOne14-Aug-02 3:58 
GeneralRe: Direction with MDI's Pin
Steen Krogsgaard15-Aug-02 4:05
Steen Krogsgaard15-Aug-02 4:05 
General2 Qs. (MFC basic level) Pin
RalfPeter14-Aug-02 3:56
RalfPeter14-Aug-02 3:56 
GeneralRe: 2 Qs. (MFC basic level) Pin
567890123414-Aug-02 4:47
567890123414-Aug-02 4:47 
GeneralRe: 2 Qs. (MFC basic level) Pin
Roman Fadeyev14-Aug-02 5:09
Roman Fadeyev14-Aug-02 5:09 
GeneralFormatting Large doubles Pin
gm_coll14-Aug-02 3:46
gm_coll14-Aug-02 3:46 
GeneralRe: Formatting Large doubles Pin
Tomasz Sowinski14-Aug-02 4:21
Tomasz Sowinski14-Aug-02 4:21 
GeneralVector Question Pin
Nick Parker14-Aug-02 3:38
protectorNick Parker14-Aug-02 3:38 
GeneralRe: Vector Question Pin
Shog914-Aug-02 3:46
sitebuilderShog914-Aug-02 3:46 
GeneralRe: Vector Question Pin
Nick Parker14-Aug-02 3:46
protectorNick Parker14-Aug-02 3:46 
GeneralRe: Vector Question Pin
Brian Delahunty14-Aug-02 3:45
Brian Delahunty14-Aug-02 3:45 
GeneralRe: Vector Question Pin
Nick Parker14-Aug-02 3:46
protectorNick Parker14-Aug-02 3:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.