Click here to Skip to main content
16,006,827 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalmessing with afxDump Pin
Scott H. Settlemier30-Jan-03 6:44
Scott H. Settlemier30-Jan-03 6:44 
GeneralRe: messing with afxDump Pin
mike_corrigan30-Jan-03 7:22
mike_corrigan30-Jan-03 7:22 
GeneralA problem updating FoxPro table. Pin
iluha30-Jan-03 6:11
iluha30-Jan-03 6:11 
GeneralChange Image in CListCtrl Pin
Marc Tompkins30-Jan-03 6:10
Marc Tompkins30-Jan-03 6:10 
GeneralRe: Change Image in CListCtrl Pin
Abbas_Riazi30-Jan-03 7:03
professionalAbbas_Riazi30-Jan-03 7:03 
GeneralDialog in dll Pin
dawo30-Jan-03 5:06
dawo30-Jan-03 5:06 
GeneralRe: Dialog in dll Pin
Abbas_Riazi30-Jan-03 7:09
professionalAbbas_Riazi30-Jan-03 7:09 
GeneralRe: Dialog in dll Pin
will138330-Jan-03 7:20
will138330-Jan-03 7:20 
Yes, create a Dll, and add in a dialog window and all the necessary stuff as you would for a normal exe. the catch is to add the exported methods (or functions or whatever you call them) to the out side user. here's an example of myddl.h with the exported create call:

//Flags for individual window features
#define SCROLL_VL 0x0001
#define SCROLL_VR 0x0002
#define SCROLL_HT 0x0004
#define SCROLL_HB 0x0008
#define TIC_VL 0x0010
#define TIC_VR 0x0020
#define TIC_HT 0x0040
#define TIC_HB 0x0080
#define STATUS_BAR 0x0100
#define ZOOM_BOX 0x0200
#define ORIGIN 0x0400
#define GRID_LINES 0x0800

//Conglomeration of some standard options
#define STANDARD_SCROLL 0x035A|ORIGIN
#define STANDARD_SCROLL2 SCROLL_VR|SCROLL_HB|TIC_VL|TIC_HB|STATUS_BAR|ZOOM_BOX|ORIGIN
#define STANDARD_VERTSCOPE SCROLL_VR|TIC_VL|TIC_HB|STATUS_BAR|ZOOM_BOX|ORIGIN
#define STANDARD_HORZSCOPE SCROLL_HB|TIC_VL|TIC_HB|STATUS_BAR|ZOOM_BOX|ORIGIN
#define STANDARD_SCROLL3 SCROLL_HB|TIC_VL|TIC_HB|STATUS_BAR|ZOOM_BOX|ORIGIN

//Flags used for cursor styles
#define DASHED_CROSS 0x0001
#define FULL_CROSS 0x0002

#ifdef __cplusplus
#define EXPORT extern "C" __declspec (dllexport)
#else
#define EXPORT __declspec (dllexport)
#endif

EXPORT BOOL CALLBACK CreateDisplay(HWND& hwnd,HINSTANCE hInstance,HWND parent_, int style, bool MDI_child);


Then in mydll.cpp I have this:

//******************************************************//
//Dll Entry point, no initialization needed //
//******************************************************//
int WINAPI DllMain (HINSTANCE hInst, DWORD fdwReason, PVOID pvReserved)
{
return TRUE;
}


EXPORT BOOL CALLBACK CreateDisplay(HWND& hwnd, HINSTANCE hInstance, HWND parent_, int style, bool MDI_child)
{
Display<double,double> *temp =
new Display<double,double>(hInstance,parent_,style,MDI_child);
hwnd = temp->GetHwnd();
the_displays[hwnd] = temp;
temp = NULL;
return TRUE;
}


Now my application uses template classes and my Display template class actually creates the Dialog window and attaches the Winproc, basically everything you normally do to create a normal windows app.

I hope this helps!

Dan Willis
GeneralMessage Timers Pin
Dov Sherman30-Jan-03 5:05
Dov Sherman30-Jan-03 5:05 
GeneralRe: Message Timers Pin
Jeremy Falcon30-Jan-03 8:00
professionalJeremy Falcon30-Jan-03 8:00 
GeneralDynamic Change Between Single/Multi select i CListCtrl Pin
Michael Olsen30-Jan-03 4:32
Michael Olsen30-Jan-03 4:32 
GeneralRe: Dynamic Change Between Single/Multi select i CListCtrl Pin
Navin30-Jan-03 4:53
Navin30-Jan-03 4:53 
GeneralRe: Dynamic Change Between Single/Multi select i CListCtrl Pin
User 665830-Jan-03 5:44
User 665830-Jan-03 5:44 
GeneralRunning one function but different paths for a number of menu items Pin
ns30-Jan-03 4:27
ns30-Jan-03 4:27 
GeneralRe: Running one function but different paths for a number of menu items Pin
HENDRIK R30-Jan-03 4:47
HENDRIK R30-Jan-03 4:47 
GeneralRe: Running one function but different paths for a number of menu items Pin
ns30-Jan-03 5:04
ns30-Jan-03 5:04 
GeneralRe: Running one function but different paths for a number of menu items Pin
HENDRIK R30-Jan-03 5:12
HENDRIK R30-Jan-03 5:12 
GeneralRe: Running one function but different paths for a number of menu items Pin
ns30-Jan-03 6:02
ns30-Jan-03 6:02 
GeneralRe: Running one function but different paths for a number of menu items Pin
HENDRIK R30-Jan-03 21:24
HENDRIK R30-Jan-03 21:24 
GeneralCannot open include file: 'iphlpapi.h' Pin
Anonymous30-Jan-03 4:16
Anonymous30-Jan-03 4:16 
GeneralRe: Cannot open include file: 'iphlpapi.h' Pin
Andreas Saurwein30-Jan-03 4:47
Andreas Saurwein30-Jan-03 4:47 
GeneralRe: Cannot open include file: 'iphlpapi.h' Pin
Anonymous30-Jan-03 21:28
Anonymous30-Jan-03 21:28 
GeneralRe: Cannot open include file: 'iphlpapi.h' Pin
Anonymous30-Jan-03 21:47
Anonymous30-Jan-03 21:47 
GeneralRe: Cannot open include file: 'iphlpapi.h' Pin
naradaji31-Jan-03 3:22
naradaji31-Jan-03 3:22 
QuestionCbitmapButton work as a checkbox ? Pin
Maximilien30-Jan-03 4:13
Maximilien30-Jan-03 4:13 

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.