|
check the input output strings in your program.
|
|
|
|
|
This is a very big project , and it is compiling and executing with no errors.
It is in maintenance phase, and iam new to this project. how can i know the input ,output strings in my project.
|
|
|
|
|
This is very big project( atleast for me and my company)and it is compiling and executing without errors.
Iam new to this and it is in maintenance phase.
how can i know the input and output strings in my project?
krishna
|
|
|
|
|
Krishnatv wrote: "Lines ending with only a carriage return have been detected. These will be modified to include a line feed"
My guess is that the source file comes from a Macintosh, running OS/9 (classic).
OS/9 uses a single Carriage Return for line breaks.
Krishnatv wrote: " This file contains invalid charracters that will be converted to ' . 's. "
I'm not sure about this message, but OS/9 uses a different character set, there can be character values that cannot be represented in Windows, hence the message.
Check all strings for dots and replace them with the correct charaters.
|
|
|
|
|
Have you checked if the files indeed have lines with only a carriage return at the end (Use a plain text editor to check for that, Scintilla being a good tool) ? Or is simply VC6.0 reading something wrong ?
My VC6.0 was one corrupted and displayed the same messages. It would also suppress the carriage returns when saving the files (which was very funny because the code was completely unreadable, but compilable). I had to reinstall it.
~RaGE();
|
|
|
|
|
AFAIK, VS tries to keep existing line endings in the files during editing.
This way, VS can be used to edit Unix-style files without problems.
(Unix uses a single Line Feed as line separator).
But VS gets into trouble when editing files with a single Carriage Return as line separator (Mac OS/9-style), that's why it inserts a Line Feed after each single Carriage Return.
|
|
|
|
|
Dear c++ friends,
in VB we have,
Dim MyChar
MyChar = Chr(65) ' Returns A.
MyChar = Chr(97) ' Returns a.
MyChar = Chr(62) ' Returns >.
MyChar = Chr(37) ' Returns %.
Do you know how to do the same thing by c++?
Thanks,
Joy Anne
|
|
|
|
|
char ch;
ch = 65;
ch = 97;
ch = 62;
ch = 37;
Nibu thomas
Software Developer
|
|
|
|
|
You can also give the character itself.
For eg.
char ch1 = 'A';
char ch2 = 'a';
char ch3 = '>';
char ch4 = '%';
- NS -
|
|
|
|
|
|
i want to calculate how long a debug takes to complete in VC++...and include it in da the coding of the same program...what should i use, timestamp or any other function??
-- modified at 0:01 Thursday 4th May, 2006
|
|
|
|
|
Take a look at QueryPerformanceCounter() .
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
sorry but i cant work on this any other idea.
|
|
|
|
|
LARGE_INTEGER start;<br />
LARGE_INTEGER end;<br />
QueryPerformanceCounter(&start);<br />
test();
QueryPerformanceCounter(&end);<br />
__int64 elapsedTime = end.QuadPart - start.QuadPart;
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Get system time at process start and again get system time before process termination and calculate the difference between them
Knock out "T" from CAN'T
You 'CAN' if you think you 'CAN'
|
|
|
|
|
ur idea is diffrent....show me a small hints in the coding..
|
|
|
|
|
see the code
#include <<ctime>> modify << & >> to < & > resp.
#include <<iostream>>
using namespace std;
time_t tmStart, tmEnd;
tmStart = time(0);
tmEnd = time(0);
cout << tmEnd-tmStart << " seconds (that was fast!)" << endl;
Knock out "T" from CAN'T
You 'CAN' if you think you 'CAN'
-- modified at 1:27 Thursday 4th May, 2006
|
|
|
|
|
Hi all,
I have created a Window using WINAPI. To make the window unmovable, this is what I have done:
LRESULT CMyFrameWnd::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)<br />
{<br />
LRESULT lr ;<br />
<br />
switch( uMsg )<br />
{<br />
case WM_CREATE:<br />
OnCreate( uMsg, wParam, lParam ) ;<br />
break ;<br />
<br />
case WM_SIZE:<br />
if( wParam == SIZE_MAXIMIZED )<br />
MessageBox(NULL, "sdfasd", NULL, 0 ) ;<br />
break ;<br />
<br />
case WM_WINDOWPOSCHANGING:<br />
MessageBeep( 0 ) ; <br />
break ;<br />
<br />
case WM_NCHITTEST:<br />
lr = DefWindowProc( hWnd, uMsg, wParam, lParam ) ;<br />
if( lr == HTCAPTION )<br />
{<br />
lr = HTNOWHERE ;<br />
}<br />
return lr;<br />
break ;<br />
<br />
case WM_NCDESTROY:<br />
OnFinalMessage();<br />
break ;<br />
} <br />
<br />
return DefWindowProc( hWnd, uMsg, wParam, lParam ) ;<br />
}
and its working fine. But overriding the HTCAPTION disables all clicks on the caption bar. Although, I don't want the Window to move, I would like to maximize its size by double clicking on the caption bar. Any ideas?
Also, How do I set the maximum size for a window and control the resizing of the Window?
Thanks.
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
TechyMaila wrote: But overriding the HTCAPTION disables all clicks on the caption bar. Although, I don't want the Window to move, I would like to maximize its size by double clicking on the caption bar. Any ideas?
You could handle WM_NCLBUTTONDBLCLK and maximise your window manually using ShowWindow() .
TechyMaila wrote: Also, How do I set the maximum size for a window and control the resizing of the Window?
Handle the WM_GETMINMAXINFO message.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Why u use HTCAPTION???
To set size handle WM_SIZE
|
|
|
|
|
Well the code below works with a dialog based application and creates an unmovable dialog. I haven't tested it with a frame window though...
CMenu* pSysMenu = GetSystemMenu(FALSE);
pSysMenu->RemoveMenu(SC_MOVE, MF_BYCOMMAND);
This fixes the dialog.
Nibu thomas
Software Developer
|
|
|
|
|
Sorry Nibu... I have posted the same answer accidently...
- NS -
|
|
|
|
|
If you really want to disable the window moving, you can do simply like as follows...
CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
pSysMenu->RemoveMenu( SC_MOVE, MF_BYCOMMAND );
}
GoodLuck
- NS -
|
|
|
|
|
I have to make a Static Text in ActiceX ATL Composite Control transprent. I have an image as background of ActiceX. I did call SetWindowLong() @ OnInitDialog() of control. But when i use the activeX in IE, The static text flicker every seconds or so...I am calling InvalidateRect to paint the static text from OnEraseBkGnd(). The OnEraseBkGnd() is calling everytime. The functions OnEraseBkGnd, Static Window Proc are given below
CustomStaticText(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
int x = 0;
HWND hParent = NULL;
DWORD ret = false;
HDC pDC = NULL;
PAINTSTRUCT ps;
switch(uMsg)
{
case WM_ERASEBKGND:
return (LRESULT)1;
break;
case WM_PAINT:
{
CLogFile::writeToFile ("CustomStaticText", "WM_PAINT");
hParent = ::GetParent(hwnd);
RECT Rect;
::GetWindowRect(hwnd, &Rect);
POINT P1;
POINT P2;
P1.x = Rect.left;
P1.y = Rect.top;
P2.x = Rect.right;
P2.y = Rect.bottom;
::ScreenToClient(hParent, &P1);
::ScreenToClient(hParent, &P2);
::MoveWindow(hwnd, P1.x, P1.y,1,1, TRUE);
pDC = ::BeginPaint(hwnd, &ps);
::SetTextColor(pDC, RGB ( 255, 0, 0));
::SetBkMode(pDC, TRANSPARENT);
HFONT font = CreateFont(5, 5, 0, 0,
FW_NORMAL, FALSE, FALSE, FALSE,
ANSI_CHARSET, OUT_DEFAULT_PRECIS,
CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
DEFAULT_PITCH | FF_ROMAN,
"MS Sans Serif");
SelectObject(pDC, font);
int txtLength = ::GetWindowTextLength(hwnd);
if ( txtLength > 0)
{
char *pString = new char [txtLength+1] ;
if ( pString != NULL )
{
::GetWindowText(hwnd, pString, txtLength+1);
TextOut ( pDC, 0, 0, pString, txtLength);
delete []pString;
pString = NULL;
}
}
::EndPaint(hwnd, &ps);
}
return NULL;
break;
default:
return ::DefWindowProc(hwnd, uMsg, wParam, lParam);
break;
}
}
LRESULT OnEraseBkGnd(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
if ( IsHandlerMessage( uMsg ) )
{
if ( m_spPicture )
{
BeginPaint( NULL );
RECT r ; GetClientRect( &r );
HDC hDC = GetDC();
HWND hWndChild =::GetWindow(m_hWnd, GW_CHILD );
while ( ::IsWindow( hWndChild ) )
{
if ( ::IsWindowVisible( hWndChild ) )
{
RECT rChild; ::GetWindowRect( hWndChild, &rChild );
ScreenToClient( &rChild );
ExcludeClipRect( hDC, rChild.left, rChild.top, rChild.right, rChild.bottom );
}
hWndChild = ::GetWindow( hWndChild, GW_HWNDNEXT );
}
PutPicture( m_spPicture, hDC, r );
ReleaseDC( hDC );
EndPaint( NULL );
::InvalidateRect(::GetDlgItem(m_hWnd, IDC_STATIC_TEXT), NULL, FALSE);
return TRUE;
}
}
bHandled = FALSE;
return FALSE;
}
|
|
|
|
|
You are calling invalidate rect in your OnEraseBkGnd handler? Why don't you just return 1 in OnEraseBkGnd and move everything into your OnPaint handler. If it still flickers, then do double buffering.
|
|
|
|
|