Click here to Skip to main content
15,921,531 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to make? Pin
imran_rafique24-Oct-02 16:31
imran_rafique24-Oct-02 16:31 
GeneralSmall icon vs Large icon Pin
Paul Oss23-Oct-02 12:49
Paul Oss23-Oct-02 12:49 
GeneralRe: Small icon vs Large icon Pin
Paul M Watt23-Oct-02 13:18
mentorPaul M Watt23-Oct-02 13:18 
GeneralRe: Small icon vs Large icon Pin
Paul Oss23-Oct-02 16:45
Paul Oss23-Oct-02 16:45 
GeneralRe: Small icon vs Large icon Pin
Paul M Watt23-Oct-02 18:34
mentorPaul M Watt23-Oct-02 18:34 
GeneralRe: Small icon vs Large icon Pin
Michael Dunn23-Oct-02 13:30
sitebuilderMichael Dunn23-Oct-02 13:30 
QuestionVC++ 7 bug or what? Pin
Val Samko23-Oct-02 11:43
Val Samko23-Oct-02 11:43 
QuestionRaw Win32 API UI in a DLL...? Pin
dandy7223-Oct-02 10:27
dandy7223-Oct-02 10:27 
Hi all,

I have a set of EXEs and an ActiveX control (ATL DLL) that perform some processing when invoked (the EXEs are invoked as usual from the command line and the ActiveX is invoked through scripting on a web page). Neither of these have a UI.

I now need to show a simple dialog box (a few fields for the user to fill) under some conditions determined by code in the EXEs or ActiveX. I don't want to have to duplicate UI code, so the discussion I've been having with The Powers That Be are leading towards putting the dialog box and its associated code in a DLL and call it as needed from the EXEs and the ActiveX.

The EXEs were written with the raw Win32 API (no MFC, no library at all in fact, no message pump either as they don't have a UI), and the ActiveX uses ATL. Both would now need to call a single function exported from my new DLL to show a UI as needed.

What is the simplest way to accomplish this, considering these requirements:

a) My DLL must be as small as possible
b) Can't duplicate UI code, must produce a single DLL
c) Neither EXEs or ActiveX DLL are allowed to become dependent on MFC or any large UI library. In fact I'm not allowed to introduce any new dependencies at all apart from this new DLL itself.

Normally if I had to display a simple form with those restrictions I'd write a simple Win32 EXE, and stick with the raw Win32 API and write the UI code with nothing else. A dialog box and a message pump--simple enough.

Can I, however, have a DLL exporting one function which, when called, displays this dialog box...and can still be called both from the EXEs and the ATL-based ActiveX? This is where my knowledge on the internals of ATL is limited: will a Win32 message pump residing in my DLL cause any problem?

Actually, the more I think about it, the more I believe my question doesn't necessarily rely with ATL, but rather, can a raw Win32 API application and an ATL DLL both call a DLL that has a self-contained dialog box and its own message pump?

Argh, I don't don't even know if I'm making any sense anymore... Confused | :confused:
I hate this, this should be simple but it's just not the type of thing I'm used to writing...

AnswerRe: Raw Win32 API UI in a DLL...? Pin
Paul M Watt23-Oct-02 12:16
mentorPaul M Watt23-Oct-02 12:16 
GeneralRe: Raw Win32 API UI in a DLL...? Pin
dandy7224-Oct-02 3:47
dandy7224-Oct-02 3:47 
AnswerRe: Raw Win32 API UI in a DLL...? Pin
Mike Nordell24-Oct-02 4:06
Mike Nordell24-Oct-02 4:06 
GeneralRe: Raw Win32 API UI in a DLL...? Pin
dandy7224-Oct-02 8:56
dandy7224-Oct-02 8:56 
GeneralList/Array - finding items Pin
User 665823-Oct-02 10:19
User 665823-Oct-02 10:19 
GeneralRe: List/Array - finding items Pin
Dave Bryant23-Oct-02 10:27
Dave Bryant23-Oct-02 10:27 
GeneralRe: List/Array - finding items Pin
Daniel Turini23-Oct-02 10:35
Daniel Turini23-Oct-02 10:35 
GeneralRe: List/Array - finding items Pin
User 665823-Oct-02 13:14
User 665823-Oct-02 13:14 
GeneralUser breakpoint when trying to free memory. Pin
Anonymous23-Oct-02 9:50
Anonymous23-Oct-02 9:50 
GeneralRe: User breakpoint when trying to free memory. Pin
Daniel Turini23-Oct-02 9:57
Daniel Turini23-Oct-02 9:57 
GeneralRe: User breakpoint when trying to free memory. Pin
Stephane Rodriguez.23-Oct-02 10:14
Stephane Rodriguez.23-Oct-02 10:14 
GeneralMFC doc/view issue Pin
will138323-Oct-02 9:38
will138323-Oct-02 9:38 
GeneralRe: MFC doc/view issue Pin
valikac23-Oct-02 18:08
valikac23-Oct-02 18:08 
QuestionHow to change the background of a CHotkeyCtrl ? Pin
CAE23-Oct-02 9:12
CAE23-Oct-02 9:12 
AnswerRe: How to change the background of a CHotkeyCtrl ? Pin
Mike Nordell24-Oct-02 4:09
Mike Nordell24-Oct-02 4:09 
Generalhtml help workshop question Pin
Anonymous23-Oct-02 8:48
Anonymous23-Oct-02 8:48 
GeneralRe: html help workshop question Pin
Dominik Reichl23-Oct-02 9:15
Dominik Reichl23-Oct-02 9:15 

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.