Re: Window creation in win32 dll

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Be aware that VS2003+ MFC build on ATL and now is very thing shell of API
opposite to previous version , I mean : worth to check using of it in your
app
Arkady

"Dinesh Ahuja" <DineshAhuja@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9AFB8647-4292-496B-811A-9FB98A83E2E0@xxxxxxxxxxxxxxxx
> Thanks a lot for your nice suggestion. It worked. Sorry for being late in
> replying as i was just going through MFC code.
>
>
> Regards
> Dinesh
> --
> Dinesh
>
>
> "Arkady Frenkel" wrote:
>
>> You have example how to do what you need - that MFC's C(Async)Socket
>> class.It create hidden window exactly for the same purposes , just take
>> code
>> from sokcore.cpp of the MFC
>> Arkady
>>
>> "Dinesh Ahuja" <DineshAhuja@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:97C6FBE4-38C7-4EF6-8E84-674A78FC223F@xxxxxxxxxxxxxxxx
>> > Hi All,
>> >
>> > I am trying to create window in a thread which is being spawned by a
>> > dll.
>> > The thread calls RegisterClass and CreateWindow. A call to
>> > RegisterClassEx
>> > succeeded but call to CreateWindow failed with below mentioned error
>> > "The system cannot find the file specified."
>> > I need to use winsock event model where i need to create hidden window
>> > for
>> > handling winsock events.
>> >
>> > I am using HINSTANCE as a handle to DLL module
>> >
>> > A pseude-code for Thread Function is as follows:
>> >
>> > WNDCLASSEX wcex;
>> > ZeroMemory(&wcex,sizeof(WNDCLASSEX));
>> > wcex.cbSize = sizeof(WNDCLASSEX);
>> > wcex.style = CS_GLOBALCLASS;
>> > wcex.lpfnWndProc = WinProc;
>> > wcex.cbClsExtra = 0;
>> > wcex.cbWndExtra = 0;
>> > wcex.hInstance = hInst; // hInst =
>> > (HINSTANCE)GetModuleHandle("DPSPublisher.dll");
>> > wcex.hIcon = NULL;
>> > wcex.hCursor = NULL;
>> > wcex.hbrBackground= NULL;
>> > wcex.lpszMenuName= NULL;
>> > wcex.lpszClassName= szClassName;
>> > wcex.hIconSm = NULL;
>> >
>> > RegisterClassEx(&wcex); // SUCCEEDED
>> > HWND hWnd = CreateWindow(szClassName, NULL, WS_CAPTION |
>> > WS_POPUPWINDOW,
>> > 0, 0, 0, 0, NULL, NULL, hInst, NULL); // FAILED
>> >
>> > Could anyone please guide me over this as how to create a hidden window
>> > in
>> > a
>> > thread spawned by dll. I tried to use this dll in console app and win
>> > app
>> > but
>> > in both cases it failed.
>> >
>> > Regards
>> > Dinesh-Ahuja
>> >
>>
>>
>>


.



Relevant Pages

  • Re: Firefox and Sound
    ... number of loads that app performed. ... only references to entry points in the dll. ... specified entry points in it can't be found, ... but the download manager said it was only 78.8 MB. ...
    (comp.os.os2.apps)
  • Re: New Delphi roadmap is coming: NO UNICODE PLEASE!
    ... Avoids DLL hell, because it ... The app is deployed and the user is getting an error. ... instances where upgrading .NET broke things that were working. ... Coming from Delphi, this isn't any big deal of course. ...
    (borland.public.delphi.non-technical)
  • Re: What programming language for Future
    ... usually when apps come with scripts, those scripts are for that version ... version of the app. ... Which is exactly the same as when the compiler is shipped with the app. ... for the sole reason that they can't rebuild a working dll. ...
    (comp.lang.misc)
  • Re: RPC_E_CANTCALLOUT_ININPUTSYNCCALL
    ... when trying to use an IDispatch pointer from another process. ... handler that is triggered by one of the SendMessage...functions. ... As the user interacts with the target process, the DLL will periodically ... notify the my app that it needs to take a look at the data. ...
    (microsoft.public.win32.programmer.ole)
  • Re: Building customized Setup.dll for installations
    ... In the C++ code of your setup DLL write some code that for example sends ... that is also registered by your app when it starts. ... I created a Visual C++ MFC DLL project to design the custom Setup.dll. ... >>> Everything works fine except on uninstall. ...
    (microsoft.public.dotnet.framework.compactframework)