|
Hi,
I want to develop application for internet (client /server) which will send file and data to each other on internet.
What are the Programatic problem that can occur while transfer data on internet ?
(means the difference between the application build for local network transfer and one build for Internet data transfer)
What are the steps to be consider to make it efficient and reliable for Internet ?
Thanks
Regards.
|
|
|
|
|
See:
CInternetSession , HINTERNET, InternetOpenURL,InternetReadFile
Cheers
"Peace of mind through Technology"
|
|
|
|
|
You can also use CSocket and CAsyncSocket for connections
Knock out 'T' from CAN'T ,
You 'CAN' if you think you 'CAN'
-- modified at 2:57 Thursday 18th May, 2006
|
|
|
|
|
zahid_ash wrote: What are the steps to be consider to make it efficient and reliable for Internet ?
remember sliding window protocol!
"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
|
|
|
|
|
Could you please refere to any sample application that is using sliding window protocol
Thanks
Regards.
|
|
|
|
|
which tool can create 16 and 32 bits bitmap?
I tried windows-paint, coreldwraw and photoshop, they can not create 16 or 32 bits bitmap.
thx
|
|
|
|
|
Is your question in vc? or applications
if vc see BITMAPINFO bminfo;
switch(bminfo.bmiHeader.biBitCount)->24,16,32
and ...
whitesky
|
|
|
|
|
Hi,
I have used the function DeviceIoControl in my application. One of its parameter is IOCTL_STORAGE_EJECTION_CONTROL, but when i compile the class, error shows : 'IOCTL_STORAGE_EJECTION_CONTROL' : undeclared identifier.
Please respond , which includes or libs , i have to add.
Velayudhan
|
|
|
|
|
Hi raj,
Include the following file
ntddstor.h
Knock out 'T' from CAN'T ,
You 'CAN' if you think you 'CAN'
|
|
|
|
|
|
Did you include Winioctl.h and ntddstor.h
whitesky
|
|
|
|
|
thanks for ur reply,
I have included WinioCtl.h
but do u know where ntddstor.h is found ?
|
|
|
|
|
|
The definition of the IOCTL_STORAGE_EJECTION_CONTROL is found in the winioctl.h Header which is provided with PlatformSDK of VS2003
Knock out 'T' from CAN'T ,
You 'CAN' if you think you 'CAN'
|
|
|
|
|
Ok guys, thanks for your respone,
I solved it by including winioctl.h in platform SDK 2003
Velayudhan
|
|
|
|
|
Hi,
I need draw a border color to static Frame control,
I have the code as below but it not work with my testing for static Frame and Window Dialog.
Please see the code and help me for this
void CTestDLLDlg::DrawFrameBorder(HWND hWnd,COLORREF refColor)
{
RECT stRect;
::GetWindowRect(hWnd, &stRect);
HDC hDC = ::GetWindowDC(hWnd);
HPEN hPen;
hPen = CreatePen(PS_INSIDEFRAME, 2* GetSystemMetrics(SM_CXBORDER), refColor);
HPEN hOldPen = (HPEN)SelectObject(hDC, hPen);
HBRUSH hOldBrush = (HBRUSH)SelectObject(hDC, GetStockObject(NULL_BRUSH));
Rectangle(hDC, 0, 0, (stRect.right - stRect.left), (stRect.bottom - stRect.top));
::ReleaseDC(hWnd, hDC);
SelectObject(hDC, hOldPen);
SelectObject(hDC, hOldBrush);
DeleteObject(hPen);
DeleteObject(hDC);
}
At initialize function I called as bellow:
BOOL CTestDLLDlg::OnInitDialog()
{
CWnd* pWnd = GetDlgItem (IDC_AVATAR1);
DrawFrameBorder(pWnd->m_hWnd,RGB(255,0,0))
return true;
}
But it seem to not draw the red border
Please help me
Thank in advance!
|
|
|
|
|
If this is code, it will not work!
I assume that you are talking about the GroupBox...
Because the in OnInitDialog you are trying to draw the border, but do you know that the window is hidden at that time. You have to write the drawing code in OnPaint, which is called every time the window needs to be repainted.
Moreover it is not good practice to draw the control from another window. So I suggest you that you should derive a class from CStatic and write the code to draw the border inside it. Then create the member variable from this new class.
- NS -
|
|
|
|
|
in onpaint it doesnt work
whitesky
|
|
|
|
|
Really? You mean whose OnPaint? CStatic or CDialog?
- NS -
|
|
|
|
|
I think maybe problem is OnInitDialog so i tested in onpaint
whitesky
|
|
|
|
|
Oh...
It could be due to, painting of the control is coming after that of the dialog...
- NS -
|
|
|
|
|
huutribk2001,
why dont use from one derived class
i write for button maybe it some helpful to you
void CButton::DrawItem(LPDRAWITEMSTRUCT lpDraw)
{
CDC dc;
dc.Attach(lpDraw->hDC);
...
...
and you can use Framerect or Fillrect and ... in dc
...
dc.Detach();
}
if you want to this way you should derived from your class in example CButton and set OwnerDraw in property from your control
whitesky
|
|
|
|
|
As WhiteSky says, the class is CButton, not CStatic. In my first answer it was mentioned as CStatic...
- NS -
|
|
|
|
|
Yah,
It work with CStatic now,
Mmany thank for help.
Tri
|
|
|
|
|
i have defined in stdafx.h header abt all the versions like win95 ,98 win xp and also winnt its working fine in every os except in WINNT
#ifndef WINVER
#define WINVER 0x0400
#endif
#ifndef _WIN32_WINNT
#define WINVER 0x0400
#endif
#ifndef _WIN32_WINDOWS
#define _WIN32_WINDOWS 0x0410
#endif
#ifndef _WIN32_IE
#define _WIN32_IE 0x0400
|
|
|
|