On 22.05.2011 14:27, asif saeed wrote:

>> On Sun, May 22, 2011 at 1:55 AM, Albrecht Schlosser<...>
>>> wrote:
>>
>>> ...you can add something like this code to
>>>
>>> your main program (after your main() function):
>>>
>>> #include<Windows.h>
>>> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
>>>                               LPSTR lpCmdLine, int nCmdShow) {
>>>    return main(__argc,__argv);
>>> }
>>>
>>
> By the way, I guess a conditional compile-time inclusion of the above stub
> could be made in in the fltkdll.lib - the lib file that needs to be
> specified in Linker/Input setting before comctl32.lib. This way, the user
> would still get to write standard main(). Don't you think so?

Nice suggestion, but that wouldn't work (otherwise it *would* have
been done). The reason is that you can't call any part of the main
program from a dll, and as the comment in the FLTK code says, it is
not possible to have the program's entry point (WinMain) *in* a dll.

Albrecht
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to