Click here to Skip to main content
16,013,918 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: fatal error C1083: Cannot open include file: 'winmm.lib': No such file or directory Pin
WREY2-Jun-02 12:24
WREY2-Jun-02 12:24 
GeneralRe: fatal error C1083: Cannot open include file: 'winmm.lib': No such file or directory Pin
2-Jun-02 12:46
suss2-Jun-02 12:46 
QuestionHow to store my data? Pin
Steve L.2-Jun-02 8:22
Steve L.2-Jun-02 8:22 
AnswerRe: How to store my data? Pin
User 387462-Jun-02 15:22
User 387462-Jun-02 15:22 
QuestionGet char pos of RichEditControl ? Pin
dlhson2-Jun-02 6:10
dlhson2-Jun-02 6:10 
AnswerRe: Get char pos of RichEditControl ? Pin
Alexandru Savescu2-Jun-02 10:20
Alexandru Savescu2-Jun-02 10:20 
GeneralIntegration or Encapsulation :: MFC Pin
valikac2-Jun-02 5:23
valikac2-Jun-02 5:23 
GeneralRe: Integration or Encapsulation :: MFC Pin
Joaquín M López Muñoz2-Jun-02 5:30
Joaquín M López Muñoz2-Jun-02 5:30 
Others' opinion may vary, but mine is you should avoid accessing funtcionality thru Windows messages whenever possible. This introduces very strong dependencies on the overall architecture of the app, and makes it harder to eventually reuse some of the components you've written in other programs. In the very simple case you describe, unless your dialog box is strongly coupled to the whole application, it is better to pass it a "divider" object it can use for their dividing needs. Something like this:
class Divider
{
public:
  virtual int divide(int a,int b)=0;
  virtual ~Divider()=0{}
};
...
class YourDialogBox
{
public:    
  YourDialogBox(Divider& divider,...)
  ...
};
When launching the dialog, just pass a Divider-derived class that access the Doc and performs the required operation. This way you have a reusable dialog box with no particular dependencies on the rest of the app.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: Integration or Encapsulation :: MFC Pin
valikac2-Jun-02 5:34
valikac2-Jun-02 5:34 
QuestionHow edit seperate files in C++ Pin
2-Jun-02 4:38
suss2-Jun-02 4:38 
AnswerRe: How edit seperate files in C++ Pin
Joaquín M López Muñoz2-Jun-02 4:56
Joaquín M López Muñoz2-Jun-02 4:56 
GeneralConverting to VARIANT DATE type from time_t Pin
James Spibey2-Jun-02 4:18
James Spibey2-Jun-02 4:18 
GeneralRe: Converting to VARIANT DATE type from time_t Pin
Rama Krishna Vavilala2-Jun-02 4:21
Rama Krishna Vavilala2-Jun-02 4:21 
GeneralRe: Converting to VARIANT DATE type from time_t Pin
JT Anderson3-Jun-02 11:27
JT Anderson3-Jun-02 11:27 
Generalcreating start menu shortcuts... Pin
l a u r e n2-Jun-02 2:56
l a u r e n2-Jun-02 2:56 
GeneralRe: creating start menu shortcuts... Pin
Mike Nordell2-Jun-02 4:32
Mike Nordell2-Jun-02 4:32 
GeneralRe: creating start menu shortcuts... Pin
Brian Delahunty2-Jun-02 4:57
Brian Delahunty2-Jun-02 4:57 
QuestionHow to get IMAGE_OPTIONAL_HEADER of a running process? Pin
hwnd2-Jun-02 2:55
hwnd2-Jun-02 2:55 
AnswerRe: How to get IMAGE_OPTIONAL_HEADER of a running process? Pin
Rama Krishna Vavilala2-Jun-02 3:59
Rama Krishna Vavilala2-Jun-02 3:59 
GeneralRe: How to get IMAGE_OPTIONAL_HEADER of a running process? Pin
hwnd2-Jun-02 4:16
hwnd2-Jun-02 4:16 
GeneralRe: How to get IMAGE_OPTIONAL_HEADER of a running process? Pin
Rama Krishna Vavilala2-Jun-02 4:20
Rama Krishna Vavilala2-Jun-02 4:20 
GeneralFont in CStatic control Pin
Haakon S.2-Jun-02 1:45
Haakon S.2-Jun-02 1:45 
GeneralRe: Font in CStatic control Pin
l a u r e n2-Jun-02 2:52
l a u r e n2-Jun-02 2:52 
GeneralRe: Font in CStatic control Pin
Haakon S.2-Jun-02 6:59
Haakon S.2-Jun-02 6:59 
GeneralRe: Font in CStatic control Pin
Haakon S.2-Jun-02 8:26
Haakon S.2-Jun-02 8:26 

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.