|
while iam trying to debug my project iam getting this message.
'C:\....\....\ xxx.exe' does not contain debugging information.
Press Ok to continue.
what might be the reason ?
And my project is always crashing while debugging.
can any body help regarding this.
|
|
|
|
|
Can you be more specific exactly
whitesky
|
|
|
|
|
Krishnatv wrote: 'C:\....\....\ xxx.exe' does not contain debugging information.
You are running the Release Build
Krishnatv wrote: And my project is always crashing while debugging.
Crashing is usually caused by bugs.
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
You are running the Release Build:
ya IAm Running Release Build.
|
|
|
|
|
Krishnatv wrote: ya IAm Running Release Build.
I know, I already told you that.
Maybe... I don't know I'm just spit-balling here, if you want to debug you should run the debug build!
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
Krishnatv wrote: And my project is always crashing while debugging.
at which point of code or file!
"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
|
|
|
|
|
can i use random shuffle function in MFC application coding...i tried to use but it is not working...if anyone knows how to apply it please tell me..
<code>// coneverterDlg.cpp : implementation file
//
void CConeverterDlg::OnEnter()
{
// TODO: Add your control notification handler code here
CString str;
// char str[13];
cEdit.GetWindowText (str);
//AfxMessageBox(myStr);
//tmStart = time(0);
CTime time=CTime::GetCurrentTime ();
CString strttime= time.Format ("%Y%m%D%H%M%S");
cEdit2.SetWindowText (strttime+"\n");//;(str)
cEdit2.SetWindowText (strttime+"\n");
string line(str);
//line.c_str (),100);
//fin.open("data.txt");
// cout << str<<endl;
for (int i=0; i<500; ++i)
{
random_shuffle(line.begin(), line.end());
// File << "Randomised: " << line << endl;
// File << " : " << line << endl;
// File << " : " << line << endl;
// File << " : " << line << endl;
// File << " "<< endl;
// File << "Single Row: " << s << " " << s << " " << s <<" " << s << endl;
// File << " "<< endl;
CString cStr(line.c_str ());
cEdit1.SetWindowText ( cStr + "\n");
cEdit1.SetWindowText ("Randomised: "+ cStr + "\n");
//tmEnd = time(0);
}
CTime time1=CTime::GetCurrentTime ();
CString strtti= time1.Format ("%Y%m%D%H%M%S");
cEdit1.SetWindowText (str);
cEdit1.SetWindowText (strtti+"\n");
//cout << tmEnd-tmStart << " seconds " << endl;
}
</code>
-- modified at 2:25 Thursday 18th May, 2006.." menu item to system menu.
// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
CString strAboutMenu;
strAboutMenu.LoadString(IDS_ABOUTBOX);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
return TRUE; // return TRUE unless you set the focus to a control
}
void CConeverterDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
{
CAboutDlg dlgAbout;
dlgAbout.DoModal();
}
else
{
CDialog::OnSysCommand(nID, lParam);
}
}
// If you add a minimize button to your dialog, you will need the code below
// to draw the icon. For MFC applications using the document/view model,
// this is automatically done for you by the framework.
void CConeverterDlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // device context for painting
SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CDialog::OnPaint();
}
}
// The system calls this to obtain the cursor to display while the user drags
// the minimized window.
HCURSOR CConeverterDlg::OnQueryDragIcon()
{
return (HCURSOR) m_hIcon;
}
void CConeverterDlg::OnEnter()
{
// TODO: Add your control notification handler code here
CString str;
// char str[13];
cEdit.GetWindowText (str);
//AfxMessageBox(myStr);
//tmStart = time(0);
CTime time=CTime::GetCurrentTime ();
CString strttime= time.Format ("%Y%m%D%H%M%S");
cEdit2.SetWindowText (strttime+"\n");//;(str)
cEdit2.SetWindowText (strttime+"\n");
string line(str);
//line.c_str (),100);
//fin.open("data.txt");
// cout << str<<endl;
for (int i=0; i<500; ++i)
{
random_shuffle(line.begin(), line.end());
// File << "Randomised: " << line << endl;
// File << " : " << line << endl;
// File << " : " << line << endl;
// File << " : " << line << endl;
// File << " "<< endl;
// File << "Single Row: " << s << " " << s << " " << s <<" " << s << endl;
// File << " "<< endl;
CString cStr(line.c_str ());
cEdit1.SetWindowText ( cStr + "\n");
cEdit1.SetWindowText ("Randomised: "+ cStr + "\n");
//tmEnd = time(0);
}
CTime time1=CTime::GetCurrentTime ();
CString strtti= time1.Format ("%Y%m%D%H%M%S");
cEdit1.SetWindowText (str);
cEdit1.SetWindowText (strtti+"\n");
//cout << tmEnd-tmStart << " seconds " << endl;
}
</code>
|
|
|
|
|
how to get information the about type of file ( if even the extension is unknown)
Any tool is there?
|
|
|
|
|
There are thousands of file formats out there. I know of no one tool that will decipher them. There is this however: http://www.wotsit.org/[^]
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Hi
placing and fetching all the windows controls,active x controls and whenever i want to place these controls in different windows then how??
|
|
|
|
|
Do you mean that you want to produce the drag and drop effect for controls on the window?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi
i hv design the controls in a form view. i want to move all controls to the center alignment with a frame control.how to do these?
-- modified at 0:43 Thursday 18th May, 2006
|
|
|
|
|
it seems u have to calculate the width of the window and control and accordingly place it using MoveWindow function.
-Sarath
|
|
|
|
|
no There is one api with which we can move all the controls in a single instance do anyone know these?
|
|
|
|
|
raghuji.rao wrote: no There is one api with which we can move all the controls in a single instance
No there is not. You were given the correct answer before.
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"
|
|
|
|
|
Here's some code to do it. Call "CenterChildren" with a HWND.
-------------------------------------------------------------
BOOL CALLBACK MeasureChildrenBoundsProc(HWND hwnd, LPARAM lParam)
{
RECT *pRectUnion = reinterpret_cast<RECT*>(lParam);
RECT RectControl;
GetWindowRect(hwnd, &RectControl);
HWND hParent = GetParent(hwnd);
MapWindowPoints(NULL, hParent, reinterpret_cast<LPPOINT>(&RectControl), 2);
UnionRect(pRectUnion, pRectUnion, &RectControl);
return TRUE;
}
BOOL CALLBACK OffsetChildrenProc(HWND hwnd, LPARAM lParam)
{
POINT *pPoint = reinterpret_cast<POINT*>(lParam);
RECT RectControl;
GetWindowRect(hwnd, &RectControl);
HWND hParent = GetParent(hwnd);
MapWindowPoints(NULL, hParent, reinterpret_cast<LPPOINT>(&RectControl), 2);
SetWindowPos(
hwnd,
NULL,
RectControl.left+pPoint->x,
RectControl.top+pPoint->y,
0,
0,
SWP_NOZORDER|SWP_NOSIZE
);
return TRUE;
}
void CenterChildren(HWND hWnd)
{
// Calculate the bounding box around our children.
RECT rc = {0};
EnumChildWindows(hWnd, &MeasureChildrenBoundsProc, reinterpret_cast<LPARAM>(&rc));
// Move the children.
RECT RectParent;
GetClientRect(hWnd, &RectParent);
int ParentWidth = RectParent.right-RectParent.left;
int ParentHeight = RectParent.bottom-RectParent.top;
int ChildrenWidth = rc.right-rc.left;
int ChildrenHeight = rc.bottom-rc.top;
POINT offset = {(ParentWidth-ChildrenWidth)/2-rc.left, (ParentHeight-ChildrenHeight)/2-rc.top};
EnumChildWindows(hWnd, &OffsetChildrenProc, reinterpret_cast<LPARAM>(&offset));
}
Steve
|
|
|
|
|
thanx steve , i 'll try these
|
|
|
|
|
Hi All,
im resposting my problem.
im not getting the current scroll position in an ownerdrawn listbox.
could u pls u help me to solve this?
-Sarath
|
|
|
|
|
of course i test this function you test in another function
<br />
void CAnswer::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)<br />
{<br />
SCROLLINFO m_Scroll;<br />
GetScrollInfo(SB_VERT,&m_Scroll);<br />
CListBox::OnVScroll(nSBCode, nPos, pScrollBar);<br />
}<br />
<br />
whitesky
-- modified at 1:10 Thursday 18th May, 2006
|
|
|
|
|
What function are you using to get the scroll position, GetTopIndex()?
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Hi,
How to check whether a directory is write protected(not ready-only attribute) or not. I tried using _taccess_s but its not working for directories(MSDN confirms it). Is there any way to check it.
Thanks.
Adios,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
Use GetFileAttributes function
-Sarath
|
|
|
|
|
Hi,
GetFileAttribute doesnot retrieve the write-protection setting. Thats why I specifically mentioned "not read-only attribute" in my post.
Thanks.
Adios,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
See Access Control List
MSDN Security Glossary[^]
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
Thanks Mike,
I got it. Its a combination of APIs. Lot of code. But its working fine.
Adios,
Cool Ju
Dream Ur Destiny
|
|
|
|