|
Hi friends,
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.
regards
Girish
Software Developer
|
|
|
|
|
Port forwording is done by firewall automatically(u have to write rules).So what is ur purpose.
never say die
|
|
|
|
|
Hi,
I request u to kindly ans :
"How to place an edit box and dialog box on a window(SDI)( MFC based application)in VC++ dot Net-2003 version".
Thank you very much.
|
|
|
|
|
Change to Resource View, then change into the Dialog-Folder and edit the Dialog.
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
Hi
How can I get HWND from a process HANDLE?
|
|
|
|
|
Hadi Dayvary wrote: Hi
How can I get HWND from a process HANDLE?
You have to Enumerate all window on desktop and compare each Processs handle to that Enumerated Window Process Handle!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
So how to get process HANDLE from a HWND?
|
|
|
|
|
Hadi Dayvary wrote: So how to get process HANDLE from a HWND?
How about GetWindowThreadProcessId() ?
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
Use the following code
BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)<br />
{<br />
EnumInfo info;<br />
DWORD pid;<br />
EnumWin * enumWin =<br />
reinterpret_cast(lParam);<br />
GetWindowThreadProcessId(hWnd, &pid);<br />
<br />
if (pid == enumWin->m_pid)<br />
{<br />
if(GetParent( hWnd ) == 0)<br />
{<br />
enumWin->m_found = TRUE;<br />
enumWin->m_hwnd = hWnd;<br />
AfxMessageBox("handle found!");<br />
return FALSE; <br />
}<br />
}<br />
return TRUE;
}
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).
Appu..
"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.
Does anyone have any ideas?
Andy
|
|
|
|
|
No idea if that works, but you can try SetWorldTransform in the OnPaint event of your view, maybe in the frames.
|
|
|
|
|
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.
Andy
|
|
|
|
|
Hi,
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.
-- modified at 7:53 Wednesday 31st May, 2006
|
|
|
|
|
Do you use SetIcon
whitesky
|
|
|
|
|
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.
|
|
|
|
|
Please see Michael Dunn answer and my guess 16x16 icon
whitesky
|
|
|
|
|
change both be 32x32 and 16x16 icon.
in task bar 16x16 icon is displayed.
see your application exe in windows explorer both in Large icon setting and Small icon setting
Regards
Anil
|
|
|
|
|
|
have u changed both icons
i.e 16x16 and 32x32
it seems that u have changed only 32x32 icon
pls check it.
but u can see if u r viewing the file list as icons (not details view)
SaRath
"D on't blindly follow rules you read somewhere without verifying that it makes sense for your situation!"
|
|
|
|
|
Yes i changed 16x16 icon.now its working.Thanks a lot.
|
|
|
|
|
1.Copy the Icon,which u want to assign to res folder of u r application.Follow these steps
2.if u r using VC6 ,In the project click on File->Open,then change the Open As option to Text and open the .rc file of u r application.
if u r using Vc7 , right click on .rc file and open as Text file
3.Replace the
IDR_MAINFRAME ICON DISCARDABLE "res\\OldIcon.ico"
with
IDR_MAINFRAME ICON DISCARDABLE "res\\NewIcon.ico"
I have tested this.
Here it is working fine.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
Have you changed the function's parameter ,for example ,if you want show the new icon which ID is IDR_NEW on the dialog, you can modify the LoadIcon function .
CTestIconDlg::CTestIconDlg(CWnd* pParent /*=NULL*/)
: CDialog(CTestIconDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CTestIconDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
// modify this sentense m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
m_hIcon = AfxGetApp()->LoadIcon(IDR_NEW);
}
echozeng ----> nose nose i love you
|
|
|
|
|
Hi all
I have a VS2005 MSC project, consisting of many classes, but when I compile I get many warnings(in different .cpp files) of type :
warning C4996: wcscpy was declared depreciated c:\....cpp
How to disable this warning, for whole project ?
thank you.
-- modified at 7:52 Wednesday 31st May, 2006
|
|
|
|
|
|
In your stdafx.h file, add the following line:
#pragma warning( disable : 4996 )
Cédric Moonen
Software developer
Charting control
|
|
|
|