Click here to Skip to main content
15,919,358 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: memory allocation issues Pin
Christian Graus29-Oct-03 15:52
protectorChristian Graus29-Oct-03 15:52 
Generalsockets and threads Pin
michael_cowan29-Oct-03 13:14
michael_cowan29-Oct-03 13:14 
GeneralWINS Pin
Jair29-Oct-03 13:06
Jair29-Oct-03 13:06 
GeneralRe: WINS Pin
Jair1-Nov-03 3:29
Jair1-Nov-03 3:29 
QuestionXP GetSysColor()??? Pin
alex.barylski29-Oct-03 12:17
alex.barylski29-Oct-03 12:17 
AnswerRe: XP GetSysColor()??? Pin
michael_cowan29-Oct-03 13:00
michael_cowan29-Oct-03 13:00 
GeneralRe: XP GetSysColor()??? Pin
alex.barylski29-Oct-03 15:17
alex.barylski29-Oct-03 15:17 
GeneralCalling a dialog from a dll question Pin
Steve Messer29-Oct-03 11:53
Steve Messer29-Oct-03 11:53 
I am calling a modal dialog from a dll. I have a button on my main application that when pressed calls a dialog from the dll. Note I am not saying this approach is correct but it is what I have.

void CHTPCCOREDlg::OnButton1()
{
PLUGIN.m_pPlugin->Initialize();
}

void CPlugin::Initialize()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
CPlugin dlg;
dlg.DoModal();
}

Which seems to work fine. Then in the dll when I want to return to the main application I have the following code.

void CPlugin::CheckKeyState() // called from a timer
{
if(IsKeyDown(VK_BACK))
{
Cleanup();
CDialog::OnOK();
}
}

All is fine and dandy the first go around. I start the app. I press the button to call the dll. The dll shows it's dialog as expected. I hit the Backspace key and the plugins dialog closes and all is fine. Well, until the press the button to initialize the plugin for a second time. The app just hangs. It appears that the dialog is attempting to display but it never does. I can then press the backspace key again then a press of the button to init the plugin works again.

Any pointers would be appreciated.







GeneralRe: Calling a dialog from a dll question Pin
igor196029-Oct-03 12:49
igor196029-Oct-03 12:49 
GeneralRe: Calling a dialog from a dll question Pin
Steve Messer29-Oct-03 14:35
Steve Messer29-Oct-03 14:35 
GeneralProblem with control arrays Pin
Stephan Poirier29-Oct-03 11:49
Stephan Poirier29-Oct-03 11:49 
GeneralRe: Problem with control arrays Pin
alex.barylski29-Oct-03 12:04
alex.barylski29-Oct-03 12:04 
GeneralRe: Problem with control arrays Pin
Joaquín M López Muñoz29-Oct-03 12:05
Joaquín M López Muñoz29-Oct-03 12:05 
GeneralRe: Problem with control arrays Pin
Stephan Poirier29-Oct-03 12:43
Stephan Poirier29-Oct-03 12:43 
GeneralRe: Problem with control arrays Pin
Stephan Poirier29-Oct-03 13:01
Stephan Poirier29-Oct-03 13:01 
GeneralATL 7 collection class Pin
Urban Olars29-Oct-03 10:45
Urban Olars29-Oct-03 10:45 
QuestionCan someone clarify some Windows' terms for me Pin
mwhannan29-Oct-03 10:38
mwhannan29-Oct-03 10:38 
AnswerRe: Can someone clarify some Windows' terms for me Pin
alex.barylski29-Oct-03 11:07
alex.barylski29-Oct-03 11:07 
GeneralRe: Can someone clarify some Windows' terms for me Pin
Blake Coverett29-Oct-03 11:12
Blake Coverett29-Oct-03 11:12 
AnswerRe: Can someone clarify some Windows' terms for me Pin
Blake Coverett29-Oct-03 11:10
Blake Coverett29-Oct-03 11:10 
AnswerRe: Can someone clarify some Windows' terms for me Pin
mwhannan29-Oct-03 17:10
mwhannan29-Oct-03 17:10 
GeneralLooking for products for relational and code generation Pin
mcgahanfl29-Oct-03 10:35
mcgahanfl29-Oct-03 10:35 
GeneralHelp !!! Pin
Guillermo Rivero29-Oct-03 10:19
Guillermo Rivero29-Oct-03 10:19 
GeneralRe: Help !!! Pin
Christian Graus29-Oct-03 15:06
protectorChristian Graus29-Oct-03 15:06 
GeneralCMDIChildWnd Scrollbars Pin
alex.barylski29-Oct-03 9:50
alex.barylski29-Oct-03 9:50 

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.