|
Here is my problem
I want to check a specific folder in FTP for the checking of arrival of new file in a specific interval of time..i think i can do that by comparing the latest date/time of the file..how can i get the date/time of the file(or such file related info other than filename) created in a FTPfolder,i think there is no such member functions for CFTPConnection or CFTPFileFind..
help wanted..!!!
|
|
|
|
|
Haven't tried it, but perhaps this works:
CFTPConnection->OpenFile
CInternetFile(derived from CFile)->GetStatus
In the CFileStatus retrieved you have creation/modification times.
/moliate
Two o'clock and walking through familiar London - Or what was familiar London before the cursor deleted certain certainties -
I watch a suit and tie man giving suck to the Psion Organizer lodged in his breast pocket
its serial interface like a cool mouth hunting his chest for sustenance, familiar feeling, and I'm watching my breath steam in the air.
Neil Gaiman - Cold Colours
|
|
|
|
|
|
i really need a source code for a project at visual c++ to analyse airfoil sections plsssss any body find one contact me at my Email or here...
h_lionheart@yahoo.com
I Love C++
|
|
|
|
|
How to embed information data and retrieve it from other applications?
I have a proprietary data file format that contains graphical data. I would like to embed customer and job related data and be able to extract the data to display in other applications (i.e. Excel).
I would assume I could place the data in my file format anyway I want. But how does Excel or other application extract this data. Do I write a DLL with functions to extract the fields of information?
I’m open to any ideas but I’m limited to VC++ 6.0 (no .NET, C#)
Many thanks in advance
Tony Teveris
|
|
|
|
|
Just curious but does it have to be embedded? Because you could create an external comma delimited file or even an HTML file and use Excel, etc. easily. I found that comma delimited and HTML are more universal than a propietary data format.
|
|
|
|
|
Yes, you can do it. To be specific it should be ATL COM Dll which implemenets IDExtensibilty2 interface.
This COM dll will be loaded when excel comes up. When user chooses to open the selected file, a notification will be fired by excel application to all the listners of IAppEvents. At this stage, component should read from file and stuff it in Excel columns.
Check out more for COM add-in dlls in Office applications.
Hth,
Ramu
|
|
|
|
|
I want the data embedded because the file gets move around alot by the user, backups, floppy, etc. Learning from the past it's better to keep the data all together. I will agree csv and the like are easy to use.
Thanks for your thoughts
Tony
|
|
|
|
|
I've posted a question to this board before asking for help with getting a variable from a Dialog to be displayed in the current document. The only replies I got were on how to get the variable out of the Dialog (thank you very much for those, they helped), but not how to display it in the current document.
Can anyone help me? I can't find a tutorial on this, HELP!!! I know it has to be something easy, but I can't find it. I'm using and MFC MDI with Doc/View Arch. I need this in order to get some homework done for a class. Please, is there anyone who can walk me thru doing this?
|
|
|
|
|
What voew class did you use as the base class for your view? If it is a CFormView then you can actually add controls via the resource editor! And then use these controls to display data.
If it is a bare CView derived class you can either create these controls manually or you can use one of the text outputting functions to draw the text on the view. But I am not sure whether that's such a good idea.
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
|
|
|
|
|
Right now I would be happy just to get the data into the document so it can be saved into a file and then printed. I can get everything else to pretty much work, except getting the document to display. Why is this simple task so darn frustrating?!?!?!?
So how do you use the form view? I had intended to use editview for annotation and perhaps color, but I think Rich edit is what I need for that. Any suggestions?...besides throwing the computer out the nearest window...
|
|
|
|
|
Refer to Kb article http://support.microsoft.com/default.aspx?scid=kb;EN-US;q108587 to fetch the document or view class from anywhere in the MFC app.
Once you have the document pointer, store the (dialog) data in member variable of document class.
void CMyDialog::OnOK()
{
UpdateData(TRUE);
CMyAppDoc * pDoc;
pDoc = (((CMDIFrameWnd*)(AfxGetApp()->m_pMainWnd))->MDIGetActive())->GetActiveDocument();
pDoc->m_Data = m_szDialogdata;
pDoc->UpdateAllViews(NULL);
}
- UpdateAllViews inturn will call OnUpdate function internally. So, implement all the view presentation data on OnUpdate().
void CMyAppView::OnUpdate()
{
//load document using memeber variables
//if using formview, call
UpdateData(FALSE);
}
Hth,
Ramu
|
|
|
|
|
hi!
I want to change backgrouncolor of myapplication.I'm trying to make something with mfc.but I am new for mfc.....
Thanks!!!
|
|
|
|
|
BOOL CYourView::OnEraseBkgnd(CDC* pDC)
{
CView::OnEraseBkgnd(pDC);
CRect r;
GetClientRect(&r);
pDC->FillSolidRect(&r,RGB(127,127,0));
return true;
}
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
|
|
|
|
|
There is no point calling the base method as far as I can see. You're about to undo what it does anyhow.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|
|
How do you change the background color of a CListBox. There isn't a SetBkColor and I tried the CDC::SetBkColor unsuccessfully. I may have done it wrong but this is where I am stuck. Thank you for your help in advance.
Bill
|
|
|
|
|
|
thanks nish.there is a lots of tips and tricks with u..well done...
Renjith-CPian
|
|
|
|
|
Thanks, I was allready overriding OnCtlColor and just needed to add an else if. Worked like a champ.
Bill
|
|
|
|
|
I'm trying to create a single instance standalone dialog box with the SetforegroundWindow. Should I register the class and use Findwindow.
Thanks
|
|
|
|
|
|
to ensure your application runs only one instance
on your InitInstance()
{
CreateMutex(NULL,false,"ur app");
if(GetLastError()=ERROR_ALREADY_EXISTS)
{
//alredy there is an instance present
//return/something u want to do here
}
}
just Look the previous messageboard entries
i told it a thousand times..!!!!
Renjith-The CPian.
|
|
|
|
|
This error is popping up sporadically upon calling CFile::Flush(). Does anyone know what might cause this call to fail sporadically with this error message?
"an unknown error occurred while accessing an unnamed file"
: Dean 'Karnatos' Michaud
|
|
|
|
|
I've seen that error -- You get that error if the file was not opened successfully or some permissions are incorrect.
|
|
|
|
|
I've created an array of unsigned chars as a parity table. During program initialization, I originally memset the array to all zeros. In the same init sequence, I set elements of the array to one to signify that the parity bit should be set for that particular value.
// in header file
#define RADAR_PARITYTBLSZ 4096
unsigned char RadarParityTable[RADAR_PARITYTBLSZ];
// in .C file
// Initialize parity table for 12 bit radar msgs and 1 bit of parity
memset(&RadarParityTable, 0, sizeof(RadarParityTable));
for(i = 0; i < RADAR_PARITYTBLSZ; i++)
if(ComputeParity(i) == 0) // this returns 0 if value of i is even
RadarParityTable[i] = 1;
The problem is that the last element of the array, in this case [4095], (the array is 4096 bytes in size, is mysteriously set to 0x20 instead of 1. I'm using odd parity so the parity for a value of 0xfff or 4095 -- 12 binary bits set means add one to it to make it odd.
I set a breakpoint right after the code above in the init sequence and Quickwatch says ALL of the values are zero. Later when I compare parity to the parity table in another module and use quickwatch, the value for that element is 0x20. The only way I was able to fix this was to increase the size of the array by 1 to 4097, initialize the first 4096 elements the same as before, and then all of the values in the array were correct even the last one. I even tried adding this line of code below in the init sequence but it didn't work.
RadarParityTable[RADAR_PARITYTBLSZ-1] = 1;
Any ideas why it was set to hex 0x20.
|
|
|
|