|
Hi,
Thanks for reply. I think this will solve my problem.
Regards,
Hemant
|
|
|
|
|
Hi all,
I builded an application in VS2003 ,which was developed in Visual Studio 6.0, i'am facing a error called "error PRJ0019: A tool returned an error code from "Register OPC Server" " , can any one help me in solving this problem
Thanks,
mpk1979
1979
|
|
|
|
|
I want my console app program loop echo some number,until press a key as "Enter" or "Q".
cout<<"Please input the number:";
while(cin.get()==0x0a)//how to set the condition?
{
for(int i=1; i<=99999; i++)
{
cout.width(5);
cout<<i;
cout<<"\b\b\b\b\b";
="" }
}
thanks!=""
<div="" class="ForumSig">The name is Sand, BlueSand!
|
|
|
|
|
I have been trying all night to get this working, but it just doesn't want to budge. I am overriding WM_NCPAINT to draw custom borders to the non-client area of my window. My new borders come from 8 bitmap images and may not straight lines. To paint them, I create 8 Regions (from transparent pixels in the images) and apply this to the clipping region of a DC retrieved from GetWindowDC(). The painting works exactly as I want. To handle the WM_NCHITTEST, I need to call PtInRegion() to check if the cursor is over a border, the problem is I am unable to correctly map the POINT retrieved from the lParam of WM_NCHITTEST to give an accurate result.
The following gives the correct value for the top and left borders, but the right and bottom values are within the client area. Infact they are offset from the 'real' border by 2 times the width of the new width I gave in the WM_NCCALCSIZE handler.
case WM_NCHITTEST:
pt.x = LOWORD(lParam);
pt.y = HIWORD(lParam);
RECT rc;
GetWindowRect(hWnd,&rc);
pt.x -= rc.left;
pt.y -= rc.top;
return HitTest(pt);
If in WM_NCCALCSIZE I set the borders to 0 width, the above works, but this defeats the object of painting borders in the non client area rather than the client area.
Could somebody please help me out with this?
|
|
|
|
|
Your HitTest() function takes coordinates relative to what?
|
|
|
|
|
relative to the top left corner of the window (the non client area).
|
|
|
|
|
WM_NCHITTEST looks ok but the system has the wrong window rect as you know.
What's going on in the WM_NCCALCSIZE handler?
|
|
|
|
|
I found the problem. Before the WM_NCPAINT handler does any drawing, it passes the required size (from GetWindowRect) for the required images, which in turns builds the regions. I had left an old WM_SIZE handler in there which was effectivly resizing/positioning the regions to the client area. So even though the borders drew ok, their regions were being changed before a hittest.
|
|
|
|
|
waldermort wrote: I found the problem
Awesome
|
|
|
|
|
I created a MFC Extended dll with CView,It works fine ,but when I created a ActiveX control in View ,It Appended an assert error! I could not find the problem, help me!
-----
ZESON
|
|
|
|
|
Hi All,
In Visual Studio 6.0 ATL Windows Service program , I can edit _twinmain() function and i can do coding inside _twinmain() function.
But In Visual Studio .NET 2003 ATL Windows Service , I can not edit source inside _tWinmain() function.
Why this is happening?
I want to edit source of _tWinmain() in VS .NET 2003.
How do i do this ?
Thanks in Advance.
|
|
|
|
|
Dear C++ Gurus,
I need to read a string from console without echo. I need to use C++ not C. In C there are functions, but couldn't find a similer in C++. Please help.
Regards,
Jijo.
________________________________
Yesterday is history,
Tomorrow is a mystery,
But today is a present.
|
|
|
|
|
Jijoraj wrote: ...read a string from console without echo.
What exactly does this mean?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I assume when keys are pressed he wants to read them in and process them without them being displayed on the screen.
Steve
|
|
|
|
|
If that is so, then getch() is a possibility.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
How to use this WNetAddConnection in the client side so that no program should be installed in the server side and the data should be transferred successfully. Plz give me a quick reply for this
|
|
|
|
|
Hi,
This function should be use only to provide compatibility with 16-bit apps. In win32 you should use WNetAddConnection2 or WNetAddConnection3.
DWORD WNetAddConnection2(
LPNETRESOURCE lpNetResource,
LPCTSTR lpPassword,
LPCTSTR lpUsername,
DWORD dwFlags
);
It can be e.g.:
NETRESOURCE nrNetRC = { '\0' };
nrNetRC.lpRemoteName = _T( "\\\\Machinename" );
DWORD dwFlags = NULL;
WNetAddConnection2( &nrNetRC, sPassword, sUserName, dwFlags );
But I'm wondering what exactly do you mean by "data should be transferred" - I mean what kind of data ?
-----------
Mila
|
|
|
|
|
Hi,
I want to place dynamically two CButtons on a web browser control in my GUI.
But it appears always as disabled.
how can I solve this issue..?
|
|
|
|
|
The best way is to simply add two <input> elements on the HTML page and reference window.external from their onclick handlers -- assuming I understand your intent properly.
Steve
|
|
|
|
|
|
Hi
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
Bye
|
|
|
|
|
hi i want to change the color of the tab control
i am using the following code that work fine withe other objects like edit box and etc but not work fine with tab control
here IDC_RESPONSES is the ID of Tab Control
HBRUSH CResponsesDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
if(pWnd->GetDlgCtrlID() == IDC_RESPONSES)
{
pDC->SetBkColor(RGB(0,0,0));
}
return hbr;
}
kindly help me in this porblem
|
|
|
|
|