[SOLVED]: Macro similar to AFX_MANAGE_STATE() Topic is solved

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4170
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

[SOLVED]: Macro similar to AFX_MANAGE_STATE()

Post by ONEEYEMAN » Sat Jul 30, 2005 7:07 am

Hi, ALL,
Is there a macro in wxGTK/wxWindows similar to AFX_MANAGE_STATE() in MFC?

Also, what else I should do besides the call to the InitXmlResource()? What if I want to store couple of dialogs, and want to call them one by one?

Thank you very much in advance.
Last edited by ONEEYEMAN on Tue Aug 16, 2005 12:22 am, edited 1 time in total.

Scorcher24
Earned some good credits
Earned some good credits
Posts: 128
Joined: Sat Sep 25, 2004 9:11 pm
Location: Nuremberg, Germany
Contact:

Post by Scorcher24 » Tue Aug 02, 2005 7:11 pm

What does this Macro do ???


You can just build the Dialogs on startup of your application and you use the Show() command when you want to show them (??). If you want to display them one by one, perhaps you want to use a wizard instead ???
Gimme some more input please :) ....
rya.
Scorcher24
OS: Windows 7 Ultimate 64bit
IDE: VC++ 2008 Professional
WX: 2.9.2
My Projects

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4170
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Post by ONEEYEMAN » Tue Aug 02, 2005 8:28 pm

Thank you for the reply, Scorcher24.
If the application has a DLL, this macro changes the order in which it looks for the resources. If you look at the MFC DLL codes first line of the exported function is call to this macro.
If this feature is not required in wxWidgets, just reply and say so.

Thank you in advance.

User avatar
Ryan Norton
Moderator
Moderator
Posts: 1319
Joined: Mon Aug 30, 2004 6:01 pm

Post by Ryan Norton » Mon Aug 15, 2005 6:22 pm

Oneeyeman, were you able to solve this on your own?
[Mostly retired moderator, still check in to clean up some stuff]

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4170
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Post by ONEEYEMAN » Tue Aug 16, 2005 12:21 am

Yep, sorry...

Thank you for the reminder.

User avatar
Ryan Norton
Moderator
Moderator
Posts: 1319
Joined: Mon Aug 30, 2004 6:01 pm

Post by Ryan Norton » Tue Aug 16, 2005 12:35 am

ONEEYEMAN wrote:Yep, sorry...

Thank you for the reminder.
How did you solve it? :)
[Mostly retired moderator, still check in to clean up some stuff]

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4170
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Post by ONEEYEMAN » Tue Aug 16, 2005 4:05 am

From "Inside Visual C++" by David J. Kruglinski 4th Edition
When mfc42.dll is loaded as part of a process, it stores data in some truly global variables. If you call MFC functions from an MFC program or extension DLL, mfc42.dll knows how to set these global variables on behalf of the calling process. If you call into mfc42.dll from a regular MFC DLL, however, the global variables are not synchronized and the efects will be unpredictable. To solve this problem, insert the line

Code: Select all

AFX_MANAGE_STATE( AfxGetStaticModuleState() );
at the start of all exported functions in your regular DLL. If the MFC code is statically linked, the macro will have no effect.
So, there is nothing required for the wxWindows program with the DLL to function properly.... :)

Thank you.

Post Reply