You are using cwnd but it was never initialized....
The DC of which window do you want to get?
Is eng is part of that window?
If so , try using this code:
UINT CMy5CYLINDERView::ThreadFunc(LPVOID pParam)
YourWindow *wnd = (YourWindow *)pParam;// You should pass the handle of the window as pParam
CDC* pDC = wnd->GetDC();
I am popping a default mail client with an attachment for sending the mail in my application.I used a dll which inturn used Mapi.I could successfully popup the default mail client when Eudora,Outlook express are set as default mail clients but when i set MSOutLook 2003 as default i could not.
we try to use port forwarding concept in our application. freinds is their any software for port forwarding is available , so that we will use it in our application. or any sample code for port forwarding is available , so we will study that code and try to use in our application. If any links regarding port forwarding is ezists , provide us. frinds kindly give us reply.
you can use WaitForInputIdle(...) for the process to finish initializing before you try to find its HWND. this will not work with apps that start with a process and switch to another while excuting (e.g. mozilla fire fox).
"If you judge people, you have no time to love them."
I have an issue that requires either the rotation of the application (MFC Doc/View architecture - yes i know but it's a legacy application) or the screen (ATI Radeon). I've tried using the ChangeDisplaySettings API call (it does this already to set the required resolution, and yes I know this is a bad thing generally but this project requires the switching of two legacy applications both of which are EPoS and the operator is trained and paid to put up with it) and setting the rotation flag to DM_180 but I always get a DISP_CHANGE_BADMODE.
So I have a display on a hinge, and one application (the doc/view one) ends up being upside down. The ATI card has a tray application which lets the display be flipped, but I can't how to do it using API calls, or even calling into an ATI dll. (The ATI card isn't guaranteed to be used throughout the life of the project, it could well be replaced by another make/model). Unless some clever person out there can tell me how to rotate the display programically, the only other way is to add some code so that the output of the doc/view application is inverted.
Thanks, I gave that a go just now on one of the dialogs and managed to rotate the background but none of the controls on the dialog. I suspect I would have to override the onpaint events for absolutely everything, which for a new application could be a fun flag for the registry but for a crusty old legacy app it's not happening.
I want to change the icon of my application,so, i changed it in resource file and the exe created with new Icon itself.But my problem,after running the EXE, the system taskbar which shows the icon and application name...IN THAT THE ICON IS OLDER ONE.IT DOES NOT SHOW THE NEW ICON.
I dont know wat to do.The res file and ICON in the Workspace,all shows the new Icon only.Even my EXE in Debug file also shows new Icon.But in system taskbar shows the older one.
Till now i wont use SetIcon but the taskbar shows right icon,then now why it does not shows the new one.where the application takes the old icon.because i checked in all files there is no older icon.then how its possible?Pls clear my doubts.