|
Are you looking for a toool or code?
for information about ports, you can use "tcpview" tool from sourceforge.net
Just google it.
anyway the task you specified will not work with an API or two
Daniel Kanev wrote: what data (binary) the processes send via the ports
especially this one! look for some sniffers.
SaRath.
"Do Next Thing..."
My Blog | Understanding State Pattern in C++
|
|
|
|
|
|
|
How to change Group box background color???
|
|
|
|
|
and use WM_CTLCOLOR
whitesky
|
|
|
|
|
I dont know what do you need but see here i write this ocde for you i check this code with a GroupBox and in GroupBox i have radio buttons and...
<br />
CMyStatic m_GroupBox;<br />
<pre><br />
class CMyStatic : public CStatic<br />
{<br />
DECLARE_DYNAMIC(CMyStatic)<br />
<br />
public:<br />
CMyStatic();<br />
virtual ~CMyStatic();<br />
<br />
protected:<br />
DECLARE_MESSAGE_MAP()<br />
public:<br />
afx_msg void OnPaint();<br />
};<br />
<br />
<br />
IMPLEMENT_DYNAMIC(CMyStatic, CStatic)<br />
CMyStatic::CMyStatic()<br />
{<br />
}<br />
<br />
CMyStatic::~CMyStatic()<br />
{<br />
}<br />
<br />
<br />
BEGIN_MESSAGE_MAP(CMyStatic, CStatic)<br />
ON_WM_PAINT()<br />
END_MESSAGE_MAP()<br />
<br />
void CMyStatic::OnPaint()<br />
{<br />
CPaintDC dc(this);
CRect rect;<br />
GetWindowRect(rect);<br />
ScreenToClient(rect);<br />
dc.FillSolidRect(rect,RGB(0,0,200));<br />
<br />
dc.SetBkColor(RGB(0,0,100));<br />
dc.SetBkMode(0);<br />
CString str;<br />
GetWindowText(str);<br />
dc.FrameRect(rect,&CBrush(RGB(255,255,255)));<br />
dc.SetTextColor(RGB(255,255,255));<br />
<br />
dc.DrawText(str,rect,DT_TOP);<br />
}<br />
whitesky
|
|
|
|
|
If i don't want to install the MSDN for the second time, what should i do?
It says that my system is installed on C: and all files of MSDN are installed on D:, after i reinstall my operating system, of course, all registry infos of MSDN were gone. But all files are still exist on drive D:, and i don't want to install MSDN again, what should i do for my purpose?
Nobody trust it, but it is true.
|
|
|
|
|
I strongly suggest you to re-install MSDN.
Actually document explorer is loading the help collection. the exe will be available at Microsoft Shared folder.
The command line information for the the exe is as follows.
"C:\Program Files\Common Files\Microsoft Shared\Help\dexplore.exe" /helpcol ms-help://MS.MSDNQTR.2004OCT.1033
Try this way but im not sure whether it will work properly or not
SaRath.
"Do Next Thing..."
My Blog | Understanding State Pattern in C++
|
|
|
|
|
Thanks, but i am just wanna know that if there is a way to use the data files of MSDN, all data file(*.chm) is on the disk, why we can't use?? Why we must re-install the MSDN, that's so boring to re-install it! If we can do it, just copy all data file to a disk and invoke these data at wherever we want, don't you think that's great? such as, win98,win2k,winXP and so on.
I mean if you setup multi OS on your PC, and you need only install MSDN for one time, and then can use it under any OS you installed.
Can this become true?
Go go go, enemy sighted! Roger that!
|
|
|
|
|
Hi,
I can able to create controls for a dialog box at run time. But how to create controls that are created automatically when scrolled. The help i need is that i will create some 10 buttons in a dialog while in its initialization. All the 10 buttons each will have one edit box beside. On clicking one button some text will get displayed on its associated edit box. Initially the scroll bar will be disabled. But if one button is clicked, the scroll bar should get enabled, and one more button and edit box have to be created (that is, 11th button and its edit box...). Please help me in this!!
Thanks in advance,
Sangeetha.
|
|
|
|
|
It is better to over ride a class of a button (usually from CButton) which has an Edit control as its memvber. when the control initializes, create the control and show it when click over (OnLbuttonDown message of Button). Using a custom class, you can create the control dynamically by calling "Create" function after creating an instance of this class.
SaRath.
"Do Next Thing..."
My Blog | Understanding State Pattern in C++
|
|
|
|
|
Thank you very much for your reply. Can you give me one example, please...? I can understand your suggestion. In that, you asked to create one overrided class of a CButton. I will create. But while the scroll bars is moved up and down all the buttons that are created should be displayed. It means for our first view of the dialog some 10 buttons will be displayed initially. At that time, scroll bar will be disabled. Because there are no more buttons to scroll and see. If i click any one of the button among that 10 buttons, then the 11th button should be automatically gets created, as well as the scroll bar will get enabled. That is, the scroll bar allows us to scroll down and see the newly created 11th button. The condition is that we can see only 10 buttons at once. If we want we have to scroll and see the other buttons. Can you get me..?
Thank you a lot,
Sangeetha.
|
|
|
|
|
|
I am creating buttons in a dialog.
Sangeetha.
|
|
|
|
|
|
You may have to put some effort on the source code, since you are creating controls dynamically.
I think, it is better to have a container dialog for button creation. thus you modify its height or width according to the number of control.
Create the container in the main window.
The nest way is to follow the scroll child example.
SaRath.
"Do Next Thing..."
My Blog | Understanding State Pattern in C++
|
|
|
|
|
I am creating buttons in a dialog. I gone through the link you had shown. In that the controls are already there. And we are scrolling and seeing the hidden ones. In my case, there will be no hidden controls (that is, there will be no 11th button. Only 10 buttons i will create initially). If i click any of the 10 buttons a new button should be created only after that just below the bottom most button in the dialog. And because the newly created button cannot be viewed without scrolling, the scroll bar is enabled. The best example is CAM software. In that for importing gerber data, one dialog will be displayed for importing gerber files, if we select FILE - IMPORT - GERBERDATA. In that only 15 buttons are there associated with a edit box each. And there will be a scroll bar which is disable for the first time. If we click on any of that 15 buttons and selected one gerber file, then the scroll bar will get enabled to scroll and see the newly created 16th button and its edit box.
Sangeetha.
|
|
|
|
|
Dear sangeetha,
I understood your problem. Currently I dont have any time to do a feasibility as you said that is why I have given the path.
You may have to do some work for the dynamic creation of controls and resizing the container window to accomodate new controls.
You can see whether the scrollbar need or not in WM_WINDOWPOSCHANGED Notification or you can have your own calculation on the same. if it bigger than the main window you should enable the scrollbar. you can get whether scrollbar enabled or not from the window style. call GetWindowLong to get the current style and & the result WM_VSCROLL (or the scrollbar you want to check it
Then you can set or remove using ModifyStyle function
e.g if(GetWindowLong(hwnd, GWL_EXSTYLE) & WS_VSCROLL)
1. Hope you understood that you need to dynamically calclate the size of your container
2. Hope you need to place the container in a dialog.
3. Hope you know that scroollbar should enabled or disabled should be calculated according the main window size and container size
You are only needed to work on the 3rd point I have mentioned.
Just google at CP. You will get some inputs for it
SaRath.
"Do Next Thing..."
My Blog | Understanding State Pattern in C++
|
|
|
|
|
Thank you a lot and i will work on it and let you know the result. Thank you for spending your time in giving tips to solve my problem.
All the best,
Sangeetha.
|
|
|
|
|
|
how to set background color to the Dlg??
|
|
|
|
|
Hello
In MFC application,we can call SetDialogBkColor() member at application InitInstance !
good luck!
|
|
|
|
|
Example
// AppWizard implements the InitInstance overridable function
// according to options you select. For example, the single document
// interface (SDI) option was chosen for the AppWizard code created
// below. You can add other per-instance initializations to the code
// created by AppWizard.
BOOL CMyApp::InitInstance()
{
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
SetDialogBkColor(COLORREF clrCtlBk = RGB(192, 192, 192), COLORREF clrCtlText = RGB(0, 0, 255) ); // Set dialog background color to gray
LoadStdProfileSettings(); // Load standard INI file options (including MRU)
// Register the application's document templates. Document templates
// serve as the connection between documents, frame windows and views.
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CMyDoc),
RUNTIME_CLASS(CMainFrame), // main SDI frame window
RUNTIME_CLASS(CMyView));
AddDocTemplate(pDocTemplate);
// create a new (empty) document
OnFileNew();
if (m_lpCmdLine[0] != '\0')
{
// TODO: add command line processing here
}
return TRUE;
}
|
|
|
|
|
Since SetDialogBkColor is obsolete in new MFC, it has no effect. In order to change the background colour, I think the WM_ERASEBKGND notification has to be processed. The simplest handler can look like this:
BOOL CMyDialog::OnEraseBkgnd(CDC* pDC)
{
pDC->FillSolidRect(0, 0, 32000, 32000, RGB(0, 0, 255));
return TRUE;
}
-- modified at 4:39 Monday 26th June, 2006
|
|
|
|
|
You can use WM_PAINT instead OnEraseBkgnd
whitesky
|
|
|
|