|
hi...
My file Location is "D:\paul.txt
i have a button. if i click the button , aove file should be open.
how can i open? can anybody help me?
thank you.
paulraj
|
|
|
|
|
Do u want it to be open in the notepad editor or wanna get its handle?
Come online at:-
jubinc@skype
|
|
|
|
|
|
Then u can do the following:-
1. Use fopen(): It is a CRT function.<br />
2. Use CreateFile (): It is a Win32 API
Come online at:-
jubinc@skype
|
|
|
|
|
ok... thank you..
paulraj
|
|
|
|
|
Hi
here is my code
CDedJed d(this); //passes through constructor and member functions as well
d.Domodal(); // goes into the windows files wincore.cpp dlgcore.cpp dbgrpt.cpp
gives out debug assert error at the following lcation
->!::PeekMessage(pMsg, NULL, NULL, NULL, PM_NOREMOVE)
-> VERIFY(RunModalLoop(dwFlags) == m_nModalResult);
-> domodal();
FYI: resource IDs which are loading properly..checked with resource.h
help on this regard
Neel
|
|
|
|
|
Debug more into the RunModalLoop(dwFlags) function.
Come online at:-
jubinc@skype
|
|
|
|
|
thanks for ur reply i use gtalk, got no skype setup/accnt.
iam online urneel@gmail.com
FYI: This error occur only in debug mode but not in release mode.
here is debug details
VERIFY(RunModalLoop(dwFlags) == m_nModalResult);
ASSERT(ContinueModal());
// pump message, but quit on WM_QUIT
if (!AfxPumpMessage())
{
AfxPostQuitMessage(0);
return -1;
}
BOOL AFXAPI AfxPumpMessage()
{
CWinThread *pThread = AfxGetThread();
if( pThread )
return pThread->PumpMessage(); // here i end up with debug assert error
else
return AfxInternalPumpMessage();
}
regards
Neel
|
|
|
|
|
Could u write the declaration of the class CDedJed?
Come online at:-
jubinc@skype
|
|
|
|
|
CDed.h file
-----------------
class CDedJed : public CDialog
{
// Construction
public:
CDedJed(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CDedJed)
enum { IDD = IDD_DED_JED_DLG };
//}}AFX_DATA
// Overrides
//{{AFX_VIRTUAL(CDedJed)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
public:
void XX(); void YY();
public:
int m_TT;
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CDedJed)
virtual void OnOK();
virtual BOOL OnInitDialog();
afx_msg void OnWindowPosChanged(LPWINDOWPOS lpWndPos);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif // !defined(AFX_DELETEJED_H__20D49F0D_8F35_4A61_A493_1F332F85A293__INCLUDED_)
CDedJed.cpp file
------------
/////////////////////////////////////////////////////////////////////////////
// CDedJed dialog
CDedJed::CDedJed(CWnd* pParent /*=NULL*/)
: CDialog(CDedJed::IDD, pParent)
{
//{{AFX_DATA_INIT(CDedJed)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CDedJed::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDedJed)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDedJed, CDialog)
//{{AFX_MSG_MAP(CDedJed)
ON_WM_WINDOWPOSCHANGED()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
|
|
|
|
|
Comment out OnWindowPosChanged() . What happens in OnInitDialog() ?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I removed windowpos function , Oninit function has local variables initialization nothing other than that.
FYI:
I found all reource IDs have been duplicated from other workspace to current work space and trying to display the dialog. could this be a probelm ?
|
|
|
|
|
Neels wrote: Oninit function has local variables initialization nothing other than that.
What does it look like?
Neels wrote: could this be a probelm ?
I suspected that until you showed that DoDataExchange() was empty.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
No resource is not causing the problem...
what could be the case which asserts in debug but no in release???
my work fully stopped with this bug.
|
|
|
|
|
Neels wrote: what could be the case which asserts in debug but no in release???
Assertions do not exist in Release mode.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
No...... resource is not causing the problem...
what could be the case which asserts in debug but no in release???
my work fully stopped with this bug.
|
|
|
|
|
when i press retry option it gives the follwing message:
Unhandled exception at 0x1b97d783 (mfc71d.dll) in graf.exe: User breakpoint.
|
|
|
|
|
I'm trying to incorporate Vipul Lal's "Easy! reports" into my own application. It is available here:
http://www.codeproject.com/KB/miscctrl/easyreports.aspx[^]
The classes essentially work by drawing onto a CScrollView (at least that's the view used in the example). The classes provide an easy mechanism to generate financial reports in MFC.
However, I am unable to see past the first page of the report through my view - I must go to print preview to do so. This obviously isn't desirable. Could someone suggest how I might scroll down to the second and subsequent pages of the report, directly from the view?
Regards,
Sternocera
|
|
|
|
|
You might be better off leaving a message in the forum that comes with the article. Vipul may respond to your question.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
I creat a server application and a client application,and the client application can connect the server application,but everytime the server application will disappear after connect success.Who can tell me why?thank you every one..
|
|
|
|
|
Some kind of bug is there, debug and check.
Come online at:-
jubinc@skype
|
|
|
|
|
gggwb wrote: but everytime the server application will disappear
a curse?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
CPallini,thank you for your help.
not a curse disappear,is the server application disappear
|
|
|
|
|
no not the cursor This is like the second post I read today and I just about tore a stomach muscle from laughing.
led mike
|
|
|
|
|