|
If the file content is hex records (whatever that means) then it is not text. Why not just add the information as a header record at the beginning of the file?
|
|
|
|
|
To my knowledge, text files do not meta data, which is where you would store things like company name, author, version, etc. For text files, the file system keeps track of simple things like date, time, and attributes.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Hi,
I print a CString with pDC->TextOut().
That is working.
But if I print again, the sheet is blank.
How to correct that?
Do I have to utilize GetBuffer(), etc?
Thanks,
Claude
|
|
|
|
|
Just a guess, could you be overwriting the first print? Do you have a new line character (or carraige return and line feed) at the end?
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
|
|
|
|
|
|
Hi,
Your not really 'printing' but rather painting text using GDI if your utilizing the TextOut function[^].
Sounds like the wm_erasebkgnd handler (or conversely WM_PAINT if you are painting in the erase handler)is overwriting what you painted. You should share some code.
Also recommend reading all of this:
Painting and Drawing[^]
Best Wishes,
-David Delaune
|
|
|
|
|
We are storing a list of student info, (id number, First name and Last name) using a link list. The ID is the key field. Your program should implement a linked list using arrays. Your program should process the following operations.
1) Add an item to the linked list
ex. 1 254 John Smith
2) Print the linked list in logical order
ex. 2
3) Print the physical order of the linked list including list, avail and next.
ex. 3
4) Print a count of how many items are in the linked list.
ex. 4
Bonus (you must get 1-4 working before attempting 5)
5) Delete an item from the linked list
ex. 5 254
I started it off as so
#include<iostream>
using namespace std;
struct studenttype
modified 5-Dec-14 3:28am.
|
|
|
|
|
Member 11287228 wrote: Your program That means you are expected to write it.
|
|
|
|
|
Quote: I started it off as so
#include<iostream>
using namespace std;
struct studenttype
Well, it looks promising.
THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?!
-- C++ FQA Lite
|
|
|
|
|
Hi,
I "inherited" an legacy app written some 12 years ago, not being C++ developer since university.
I have MS Visual Studio 2010 project out of it, all builds OK. All even runs OK on Windows XP 32 bit(where it's built),
but when trying it on Windows 2008 server 64bit, it throws "Encountered an improper argument".
More specifically, it's super simple app that displays 2 password fields (second for confirmation), and button for storing generated file on file system (so Save as... dialog). And error shows up when clicking on this button/trying to open Save dialog).
When run in debug mode, in same action, it throws Assertion error, pointing to dlgfile.cpp in MFC libs, line 479.
The executable is generated with VS settings Multi-threaded Debug DLL as runtime library, and "Use MFC as shared DLL"
I would presume that some .dll provided is incorrect version from rest/expected by code, but I have no clue how to find it.
Any help on how to fix this is strongly welcomed!
|
|
|
|
|
You first need to work back to the part of the code that calls into this DLL. Only then can you look at the calling method and parameters to see which might cause the problem.
|
|
|
|
|
BOOL CPasswordGeneratorWriterDlg::SavePasswordFile()
{
CFileDialog fileDlg(
FALSE,
NULL,
NULL,
OFN_ALLOWMULTISELECT | OFN_HIDEREADONLY,
"All Files (*.*)|*.*||",
NULL);
fileDlg.m_ofn.lpstrTitle = "Save file as...";
if(fileDlg.DoModal() == IDOK)
{
CString szlstfile = fileDlg.GetPathName();
return SavePasswordFileAs(szlstfile);
}
return FALSE;
}
|
|
|
|
|
|
Thank you,
I amended dwFlags to "OFN_ENABLESIZING | OFN_HIDEREADONLY", which even make more sense (having multiselect on saving a file dialog doesn't make much sense) and it works on both XP and 2008 server.
|
|
|
|
|
hi
My groupbox is not working , when i click on up-down arrow , nothing is happening ,
Thanks in Advance for help
|
|
|
|
|
Member 10866427 wrote: My groupbox is not working That is hardly a technical description of a problem. If you want help with somerthing then you need to provide proper details.
|
|
|
|
|
Hi,
MFC/Win32 is nothing like VB... you cannot just drop a scrollbar on a dialog/control/window and expect it to scroll the window for you. You need to do all of this yourself. You will need to have the parent window that owns the scrollbar handle the WM_VSCROLL message. You will then need to scroll the window yourself.
WM_VSCROLL message[^]
CWnd::OnVScroll[^]
ScrollWindow function[^]
Using Scroll Bars[^]
Best Wishes,
-David Delaune
|
|
|
|
|
External program used excel, if you click on the click of a button to send a message through the simulation, excel this call can not be started.
If my program is A.exe I need to simulate an external program control after clicking B.exe this B.exe a button click can not call excel
Case 1: B.exe manually click a button in excel can be a normal call! --OK!
Case 2: using the SendMessage function to send a message with A.exe analog control click on the button in excel B.exe call fails, and pop-up "can not start Excel server!"! --NG!
Messages sent using SendMessage is successfully sent, message "Unable to start Excel server!"! Also shows that the message was sent successfully, but it is not up calls excel!
Question: permissions problem? Or anything else that needs to feed?
|
|
|
|
|
|
Member 11283272 wrote: why? Why what? And probably because no one can understand your question.
|
|
|
|
|
sorry,my english is not good enough.
|
|
|
|
|
Do you have a colleague who could translate for you?
|
|
|
|
|
Sorry, I am the only one,incidentally, I'm Chinese.English is not our official language,I tried again to translate。
|
|
|
|
|
|
A.exe is my own program,B.exe is not my own program.
B.exe has a button, click it, and will call to EXCEL!
Now, my question is: if click this button to manually, EXCEL will be normal calls.---(OK)
But if use my program(A.exe),the Sendmessage function sends a keystroke messages (WM_KEYDOWN WM_SYSKEYDOWN) on the button, EXCEL will call fails.---(NG)
I'm sure it: Sendmessage function keystroke messages is sent successfully!
|
|
|
|