|
Hi all!
I connect to Internet by personal Computer though PSTN via a modem.
Does anyone know How to get the actual IP Address of such a computer like mine?(not get by localhost 127.0.0.01)
Thanks in advance.
NNH
|
|
|
|
|
http://www.codeproject.com/internet/ipenum.asp
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
If you don't want to do it through code, you just want to know for your reference, then use winipcfg (win9x) or ipconfig (NT/2k/xp)
Signature space for rent. Apply by email to....
|
|
|
|
|
|
you can try gethostname and gethostbyname.
1) call gethostname to obtain host name
2) call gethostbyname take host name as parameter
|
|
|
|
|
I want to change panels dynamicaly. I used the ctrlbars sample from the mfc-sample collection. The panel gets created but doesn't show up. I've followed the example though...
Situation:
- CDialog derived CMyDialog with:
* button IDC_SHOW_BUTTON
* CDialogBar* m_pCmdBar
- DialogBar template IDD_MY_BAR
I want to show IDD_MY_BAR when the showbutton is pressed.
void CMyDialog::OnShowButton()
{
m_pCmdBar=new CDialogBar();
m_pCmdBar->Create(this,IDD_MY_BAR,CBRS_NOALIGN,IDD_MY_BAR);
m_pCmdBar->Invalidate();
AfxGetApp()->OnIdle(-1);
}
Did I forget something?
using: [VISUAL STUDIO 6.0] [WIN98/2]
|
|
|
|
|
Is your app dialog-based?
Tomasz Sowinski -- http://www.shooltz.com
*** Si fractum non sit, noli id reficere. ***
|
|
|
|
|
yes. don't say you can't use cdialogbar with dialog based apps
using: [VISUAL STUDIO 6.0] [WIN98/2]
|
|
|
|
|
I don't know. Since CTRLBARS is doc/view sample, it probably uses CFrameWnd::ShowControlBar to display its bars. Check the DLGCBR32 sample which adds toolbar/status bar to dialog - maybe the solutions presented there will help you with CDialogBar as well.
OTOH, if all you need are panels within dialog, just use CDialog-derived class - dialogs can be embedded; this is how property pages are implemented. Don't forget to set 'Child' style in the dialog editor.
Tomasz Sowinski -- http://www.shooltz.com
*** Si fractum non sit, noli id reficere. ***
|
|
|
|
|
Tnx
I just didn't want to use the cdialog cause the create-function had to many params. A bit lazy, me...
using: [VISUAL STUDIO 6.0] [WIN98/2]
|
|
|
|
|
euh, cwnd's constructor that is...
drop it
using: [VISUAL STUDIO 6.0] [WIN98/2]
|
|
|
|
|
Ok, you probably can't
But I still want to change panels dynamicaly on a cdialog (not a cmainframe). What base-class do I use for that?
using: [VISUAL STUDIO 6.0] [WIN98/2]
|
|
|
|
|
Is there a way to keep a dialog box in the same (display) size regardless the resolutions?
|
|
|
|
|
You mean the size relative to screen resolution? You'd have to use GetSystemMetrics to get the resolution and call MoveWindow. What's displayed in your dialog?
Tomasz Sowinski -- http://www.shooltz.com
*** Si fractum non sit, noli id reficere. ***
|
|
|
|
|
My dialog box contains an ActiveX control which contains a graph. My dialog box doesn't have maximize/restore button because I want to keep my buttons' layout. I'm currently using 1024&768. When I switch to 800*600, everything becomes too big to fit on my 15" monitor.
|
|
|
|
|
I guess you should go for resizable dialog. There are classes implementing this right here on CP - try searching for CResizableDlg or browse through dialog section of the site.
Tomasz Sowinski -- http://www.shooltz.com
*** Si fractum non sit, noli id reficere. ***
|
|
|
|
|
Thanks a lot. I love this forum, always get reply within 5 minutes.
|
|
|
|
|
Hi ALL!
I would be very thankful if anyone could help me with my suddenly arised problem.
In my app I change screen resolution from 1280x1024 to 1024x768.
I use ChangeDisplaySettings() function and it really changes resolution but after that
standard Windows Taskbar is appeared far below the bottom of display.
The Question is: How to return Windows Taskbar to it original place (namely at the
bottom edge of display)?
Thank you.
|
|
|
|
|
read task bar topic on MSDN.
i think u need to change docking area also.
includeh10
|
|
|
|
|
WHy is it that both work:
CString x = "123";
int myNum = atoi(LPCTSTR(x));
and
int myNum = atoi(x)
Appreciate your help,
ns
|
|
|
|
|
Because casting LPCTSTR is not necessary.
CString defines an operator for LPCTSTR, and the atoi() function takes an LPCTSTR arg. So the compilers knows which functionality to use.
casting LPCTSTR is not really good programming practise... Getting compiler warnings can highlight problems before you spend hours debugging them.
Signature space for rent. Apply by email to....
|
|
|
|
|
CString class has LPCTSTR() operator defined.
Pavel
Sonork 100.15206
|
|
|
|
|
The LPCTSTR cast is totally unnecessary. CString provides one for you.
Tomasz Sowinski -- http://www.shooltz.com
*** Si fractum non sit, noli id reficere. ***
|
|
|
|
|
So is it true that any place I need a char*, I can use a CString directly? I'm not too sure about that ...
Appreciate your help,
ns
|
|
|
|
|
ns wrote:
So is it true that any place I need a char*, I can use a CString directly?
No. You can use CString directly whenever you need const char *. If you need char *, then use CString::GetBuffer.
Tomasz Sowinski -- http://www.shooltz.com
*** Si fractum non sit, noli id reficere. ***
|
|
|
|