|
Thanks guys. Do you think I am too young to learn it though? Will it be to tough for me?
|
|
|
|
|
it will depend on ur intrest!,since u already are into thiz programming,u did be having that programming logic,so u wouldnt find it a prob!
one adivce.....dont stop!....keep going and trying.....like they say,if therz a will, therez definitely a way!age iz never a barrier!!!!!
cheerz.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
Thanks. I am really ambitious and I really want to be an expert when I am older in various aspects of computing. I am learning bits of networking from my dad and I am teaching myself web programming and now I would like to learn this
|
|
|
|
|
Rob_BCFC wrote:
Do you think I am too young to learn it though? Will it be to tough for me?
You are the only one that can determine this.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
But whatever you do, don't get so frustrated that you delete->this
|
|
|
|
|
hiho@ll
i'm using the outport source to export contact and appointments
my problem is i need to know a unique ID for a contact or appointment, to know if a contact or appointment has changed
outport uses InvokeHelper(0xf051, DISPATCH_METHOD, VT_EMPTY, NULL, parms, (LPCTSTR)fullname, &type);
to tell outlook to save the contacts or appointments in seperate files
(it's the same as if you do File->Save as) in outlook
the problem is it doesn't save a ID
so anybody knows how to determine the ID for a appointment and/or contact?
thx@ll
|
|
|
|
|
Hi, I am trying to use a C-program to read a virtual com port. Attached to this com port it is a Bluetooth Adapter(D-Link DBT 120). I am sending text strings from a bluetooth-unit and over to the Bluetooth adapter. I do manage to read the text strings with HyperTerminal, but I don't manage to read the text strings with C. I am using CreateFile to open the com-port, DCB to set the preferences(BaudRate, parity etc.) and ReadFile to read the Com-port. Anyone got an ide of what I can do? Thanks in advance!
pete
|
|
|
|
|
Hye.
i write this code to get inpur from user such as ram and hard disk capacity as integer type using structures. After that i want to create a file in which i want to save that data. In the code below it is getting input from user but not creating file . Plz tell where is my mistake.
Code is:
#include <conio.h>
#include <iostream.h>
#include <fstream.h>
void main()
{
struct computerspec
{
int ram;
int hdisk;
}compuspec;
cout<<"Enter the RAM capacity"<<endl;
cin>>compuspec.ram;
cout<<endl;
cout<<"enter the="" hard="" disk="" capacity"<<endl;
cin="">>compuspec.hdisk;
cout<
|
|
|
|
|
i dont see any problem in your code.
It must be working fine and must crate the file.
Check the file
1) if you are directly running the .exe, at the location of the exe file.
2) if you are executing from the vc projecy, then the file will be created at the location of workspace and project files i.e. where .dsw/.dsp exists.
Rahim Rattani
Software Engineer,
Matrix Systems (Pvt) Ltd.,
Karachi - Pakistan
|
|
|
|
|
rose aashii wrote:
file.open("computerspec.txt");
Does this statement create the file if it does not exist?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Yes it does creates the file, if the file does not exist.
The actual syntax is
file.open(filename, open flags, protection specifications).
The default open flag is ios::out which creates the file if it does not exists. To avoid the file creation if it does not exists another flag ios::nocreate is used.
Rahim Rattani
Software Engineer,
Matrix Systems (Pvt) Ltd.,
Karachi - Pakistan
|
|
|
|
|
I´ve done the following changes in your code, and it works just fine for me.
#include <iostream>
#include <fstream>
#include <conio.h>
using namespace std;
struct computerspec
{
int ram;
int hdisk;
}compuspec;
void main()
{
cout<<"Enter the RAM capacity"<<endl;
cin>>compuspec.ram;
cout<<endl;
cout<<"enter the="" hard="" disk="" capacity"<<endl;
cin="">>compuspec.hdisk;
cout<
|
|
|
|
|
Hi all,
I want your help to write a program in C++ or C that could convert the words into numbers.
for example:
Input: threehundredandthirtyfour
should give an output:334
Thanks in advance. Looking forward to hear from you all.
Rgds,
Rick
mailto: spassguy30@yahoo.com
|
|
|
|
|
Plz do your homework yourself.
Rahim Rattani
Software Engineer,
Matrix Systems (Pvt) Ltd.,
Karachi - Pakistan
|
|
|
|
|
I have pretty simple code
void ReadDeviceThread( void *lparam )
{
Sleep(2000);
((ProgressDialog *)lparam)->EndDialog(IDOK);
}
void CMainWindow::OnReadDevice()
{
static ProgressDialog pd;
_beginthread(ReadDeviceThread, 0, &pd);
pd.DoModal("Initialising read from device");
}
The app crashes at user32.dll (win XP, VC++ 6.0, SP6.0) after call of EndDialog. Specifically it crashes after calling ::EndDialog at the end of the EndDialog routine.
void CDialog::EndDialog(int nResult)
{
ASSERT(::IsWindow(m_hWnd));
if (m_nFlags & (WF_MODALLOOP|WF_CONTINUEMODAL))
EndModalLoop(nResult);
::EndDialog(m_hWnd, nResult); // after this line app crashes at USER32! 77d562cf()
}
Could anybody please help me with this problem. What's wrong with my code.
Thank you
|
|
|
|
|
I do not know if this will work.
Anyway, try this:
((ProgressDialog *)lparam)->PostMessage(WM_COMMAND,IDOK);
this is this.
|
|
|
|
|
Thank you khan++ - PostMessage has fixed the problem.
I still wondered what was wrong with EndDialog??!!
|
|
|
|
|
No problem with the code.
Please paste the stack trace and ProgressDialog class.
Rahim Rattani
Software Engineer,
Matrix Systems (Pvt) Ltd.,
Karachi - Pakistan
|
|
|
|
|
Hmm.., ((ProgressDialog *)lparam)->PostMessage(WM_COMMAND,IDOK) fixes the problem, but what was wrong with EndDialog?!
Stack trace:
USER32! 77d562cf()
CDialog::EndDialog(int)
ReadDeviceThread(void *)
_threadstart(void *)
KERNEL32!7c80b50b()
----------------------------
ProgressDialog.cpp
----------------------------
// ProgressDialog.cpp : implementation file
//
#include "stdafx.h"
#include "monitor.h"
#include "ProgressDialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// ProgressDialog dialog
ProgressDialog::ProgressDialog(CWnd* pParent /*=NULL*/)
: CDialog(ProgressDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(ProgressDialog)
m_text = _T("");
//}}AFX_DATA_INIT
}
void ProgressDialog::OnFinalRelease()
{
// When the last reference for an automation object is released
// OnFinalRelease is called. The base class will automatically
// deletes the object. Add additional cleanup required for your
// object before calling the base class.
CDialog::OnFinalRelease();
}
void ProgressDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(ProgressDialog)
DDX_Control(pDX, IDC_MPROGRESS, m_bar);
DDX_Text(pDX, IDC_MPROGTEXT, m_text);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(ProgressDialog, CDialog)
//{{AFX_MSG_MAP(ProgressDialog)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// ProgressDialog message handlers
int ProgressDialog::DoModal(char *txt)
{
m_text = txt;
//m_bar.SetRange(0,100);
//m_bar.SetPos(0);
return CDialog::DoModal();
}
void ProgressDialog::SetText(char *txt)
{
m_text = txt;
UpdateData(FALSE);
}
void ProgressDialog::SetPos(int pos)
{
m_bar.SetPos(pos);
}
void ProgressDialog::OnCancel()
{
// TODO: Add extra cleanup here
StopAcc = 0;
CancelProgressModal = 1;
Sleep(4); // a little delay to stop a collision
CDialog::OnCancel();
}
void ProgressDialog::SetRange(int min, int max)
{
m_bar.SetRange(min, max);
}
----------------------------
ProgressDialog.h
----------------------------
#if !defined(AFX_PROGRESSDIALOG_H__13AB40A1_4F1A_11D2_932F_F4950FC10000__INCLUDED_)
#define AFX_PROGRESSDIALOG_H__13AB40A1_4F1A_11D2_932F_F4950FC10000__INCLUDED_
#include "stdafx.h"
#include "resource.h"
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// ProgressDialog.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// ProgressDialog dialog
class ProgressDialog : public CDialog
{
// Construction
public:
void SetRange(int min, int max);
ProgressDialog(CWnd* pParent = NULL); // standard constructor
void SetText(char *txt);
void SetPos(int pos);
// Dialog Data
//{{AFX_DATA(ProgressDialog)
enum { IDD = IDD_PROGRESS };
CProgressCtrl m_bar;
CString m_text;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(ProgressDialog)
public:
virtual void OnFinalRelease();
virtual int DoModal(char *txt);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(ProgressDialog)
virtual void OnCancel();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_PROGRESSDIALOG_H__13AB40A1_4F1A_11D2_932F_F4950FC10000__INCLUDED_)
|
|
|
|
|
How can i change printing preferences (paper size, orientation etc.)of Microsoft word using MFC program.
We Believe in Excellence
|
|
|
|
|
hi
I have created mfc dialog based application.IN that i have set the bitmaps on dialog box and i am creating dyanmic buttons on that . I am able to see the dynamic buttons but the buttons which i have pasted on dialog box on the bitmaps are not seen.
When i run the application I can see the dialog with bitmaps an dynamic buttons but the buttons already on dialog are seen when i click on dialog box or move it.
It means it is the problem of re-painting.I tried a lot but was not successful. Can anyone help in solving the same.
Best Regards
jhon
|
|
|
|
|
.....i dunno if thiz will help but try thiz out......
each button is derived from a Cwnd class,so we manually put in the code to show the button window as the topmost window.....
and put the code in ur OnInitDialog() function,
GetDlgItem(IDOK)->SetWindowPos(&CWnd::wndTopMost, 0, 0, 0, 0,SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
hope that solvez ur problem.....
cheerz.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
hi
no, my problem has not solved.
See i have dialog box and had set the bitmap to whole dialog and then OnInitDialog i have set the bitmaps to the buttons also.First time the buttons are not seen but when i click on dialog they are seen but if i move again they disappear.
waiting for reply
|
|
|
|
|
Try repainting the buttons in OnEraseBkgnd() after drawing the background for the main dialog.
If that fails, try repainting the buttons in OnPaint();
this is this.
|
|
|
|
|
The controls are drawn in tab-order. So, make sure that the bitmaps tab position is before any control that needs to be drawn on top of it.
Selecting Clip Siblings might also work, but I have not varified that.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|