Click here to Skip to main content
15,891,607 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: MS Visual Studio 6.0 - Build problem Pin
David Crow19-Nov-07 3:42
David Crow19-Nov-07 3:42 
AnswerRe: MS Visual Studio 6.0 - Build problem Pin
Syamlal S Nair19-Nov-07 3:47
Syamlal S Nair19-Nov-07 3:47 
GeneralRe: MS Visual Studio 6.0 - Build problem Pin
Matthew Faithfull19-Nov-07 3:46
Matthew Faithfull19-Nov-07 3:46 
QuestionProblem in scrolling a dialog. Pin
chandu00419-Nov-07 3:09
chandu00419-Nov-07 3:09 
AnswerRe: Problem in scrolling a dialog. Pin
Nelek19-Nov-07 3:46
protectorNelek19-Nov-07 3:46 
GeneralRe: Problem in scrolling a dialog. Pin
chandu00420-Nov-07 3:48
chandu00420-Nov-07 3:48 
QuestionBAD_POOL_HEADER Pin
Kerem Guemruekcue19-Nov-07 2:51
Kerem Guemruekcue19-Nov-07 2:51 
QuestionHow do I subscribe to events in a class? [modified] Pin
arnold_w19-Nov-07 2:26
arnold_w19-Nov-07 2:26 
I have some problems that are a little hard to explain, but I will try my best. I am trying to write a dll that will be called by an Excel VBA macro. The dll communicates with a barcode scanner and generates an event when a reading has completed. All communications between the VBA code and the dll are working perfectly. The manufacturer of the barcode scanner provided a sample mfc stand-alone (NOT dll) application with source code and I am now trying to convert that source code into a dll with no GUI. The main code (the event handling, the communications with the scanner, etc) resides within a class that inherits a CDialog. Begin message map looks like this:

BEGIN_MESSAGE_MAP(CBarcodeScannerDemoDlg, CDialog)
ON_BN_CLICKED(IDC_ReadCodes, OnReadCodes)
ON_WM_DESTROY()
ON_MESSAGE (WMU_NEW_CODE_AVAILABLE , OnNEW_CODE_AVAILABLE)
ON_MESSAGE (WMU_START_THREAD , OnSTART_THREAD)
ON_MESSAGE (WMU_STOP_THREAD , OnSTOP_THREAD)
ON_MESSAGE (WMU_KILL_THREAD , OnKILL_THREAD)
END_MESSAGE_MAP()

Thus, when the IDC_ReadCodes button is pressed, OnReadCodes is executed. Since I want a GUI-less dll, I really don't need to inherit the CDialog, but what should I inherit instead? If I just create new a class to put the main code in, what should I replace CDialog with in the BEGIN_MESSAGE_MAP macro above? I am a beginner C++ developer, please have that in mind when replying. If you need further information or clarifications, please don't hesitate to reply. Any help would be greatly appreciated.
GeneralRe: How do I subscribe to events in a class? Pin
Matthew Faithfull19-Nov-07 2:55
Matthew Faithfull19-Nov-07 2:55 
GeneralRe: How do I subscribe to events in a class? Pin
arnold_w19-Nov-07 3:58
arnold_w19-Nov-07 3:58 
GeneralRe: How do I subscribe to events in a class? Pin
Matthew Faithfull19-Nov-07 4:27
Matthew Faithfull19-Nov-07 4:27 
GeneralRe: How do I subscribe to events in a class? Pin
arnold_w19-Nov-07 4:38
arnold_w19-Nov-07 4:38 
GeneralRe: How do I subscribe to events in a class? Pin
Matthew Faithfull19-Nov-07 5:03
Matthew Faithfull19-Nov-07 5:03 
GeneralRe: How do I subscribe to events in a class? Pin
arnold_w19-Nov-07 22:11
arnold_w19-Nov-07 22:11 
QuestionBeginner Pin
john563219-Nov-07 2:09
john563219-Nov-07 2:09 
AnswerRe: Beginner Pin
Kerem Guemruekcue19-Nov-07 2:40
Kerem Guemruekcue19-Nov-07 2:40 
AnswerRe: Beginner Pin
Johpoke19-Nov-07 2:44
Johpoke19-Nov-07 2:44 
AnswerRe: Beginner Pin
chandu00419-Nov-07 3:02
chandu00419-Nov-07 3:02 
AnswerRe: Beginner Pin
Hamid_RT19-Nov-07 3:48
Hamid_RT19-Nov-07 3:48 
QuestionHow do I call an instance method from an exported method in a MFC DLL? Pin
arnold_w19-Nov-07 0:24
arnold_w19-Nov-07 0:24 
GeneralRe: How do I call an instance method from an exported method in a MFC DLL? Pin
Matthew Faithfull19-Nov-07 0:32
Matthew Faithfull19-Nov-07 0:32 
GeneralRe: How do I call an instance method from an exported method in a MFC DLL? Pin
arnold_w19-Nov-07 1:02
arnold_w19-Nov-07 1:02 
QuestionRe: How do I call an instance method from an exported method in a MFC DLL? Pin
Matthew Faithfull19-Nov-07 1:07
Matthew Faithfull19-Nov-07 1:07 
AnswerRe: How do I call an instance method from an exported method in a MFC DLL? Pin
arnold_w19-Nov-07 2:09
arnold_w19-Nov-07 2:09 
QuestionAbout Socket Buffer Pin
manish.patel19-Nov-07 0:12
manish.patel19-Nov-07 0:12 

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.