|
|
i just want to know how to add the letters after a number automaticly like 1st 2nd 3rd 4th 5th the numbers will change day to day
|
|
|
|
|
what i would do is convert the number to a string, then extract the last character and make a switch() statment
if the last character is 1 it will append "st" to the number string
if its 2 it will append "nd" to the number string
you get my point?
need any help on how to go about any of this just ask
|
|
|
|
|
|
Here[^]'s a VB sample. And here[^]'s a Java implementation that you can easily convert to C++.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
How do you write in mfc to files but manually like
f.write("something");
or similar to that and how do you start a newline in a file output
|
|
|
|
|
Google CStdioFile and use the WriteString() method to write a newline terminated line of text to the file.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi,
you have either to work with the MFC CFile class or to work with the standad file stream of the C++
using CFile class
CFile myFile;
/* This will cause a file to be created and if there is a file with the same name to be truncated */
myFile.Open("FileName.txt",CFile::modeCreate|CFile::modeReadWrite);
/* This will cause a file to be created and if there is a file with the same name to be appended */
myFile.Open("FileName.txt",CFile::modeCreate|CFile::modeNoTruncate|CFile::modeReadWrite);
char* buf;
CString strData;
strData = "My data";
buf = new char[strData.GetLength()];
strcpy(buf,strData);
myFile.Write(buf);
|
|
|
|
|
how do you record to a file a variable or string by mfc.?
|
|
|
|
|
|
hello
i have a very² simple question to ask
usually we declare member variables thru the class wizard right? what if we have more variables to declare? where should we declare them with the initialization values and how do we make all off them accesible thru every buttons we have? i mean like (in non-MFC) we declare variables in main() and they can be used by every operation in main().
at first i declared a new variable at one of the BN_CLICKED and tried to access it from another button (of course it didn't work) so i tried to add by right clicking in the class view and add member variable but i don't know where to give it a value. thanx for your help!
have a nice day!
~wilDcat~
|
|
|
|
|
In C++, a variable that needs to be accessed by an entire class (that is, having a scope global to the class in question) is generally declared in the class header, or definition file ( the .h file for the class ) as a member variable of that class.
If you wish to to be faithful to the object oriented spirit of C++, any such variable should be declard as private so that it cannot be accessed externally by other code within the application.
Typically, you will want to assign a default value to that variable in the class constructor. You can assign values as needed in any of the class's methods.
|
|
|
|
|
ok.. thank you
~wilDcat~
|
|
|
|
|
|
you mean what? char a[10]; ?
Bikram Singh
|
|
|
|
|
How can i change and copy string for using in Edit Control?
and how can i convert String to CString ?( _T() is that right?
best wishes.
|
|
|
|
|
mostafa_pasha wrote:
String
what is a "String" ?
Software | Cleek
|
|
|
|
|
Hi all,
Is there anyway to delete all the dialog except the current one.
This code
PostThreadMessage(AfxGetThread()->m_nThreadID, WM_QUIT, 0, 0);
delete all the dialog including the current one.
DARWIN PAUL RAJ
|
|
|
|
|
Hai all,
Is there anyway??????????????
DARWIN PAUL RAJ
|
|
|
|
|
S.DARWIN PAUL RAJ wrote:
Is there anyway to delete all the dialog except the current one.
Delete them from what? Your question is not very clear.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hello,
I'm creating a new activex control using MFC ActiveX control wizard.
my activex control subclasses SysListView32.
Everything works except for drawing the control when i use WS_EX_CLIENTEDGE style.
If i don’t call this function
DoSuperclassPaint(pdc, rcBounds);
the items in the control are not painted, but the column header is visible.
If I do call this function, the items are painted, but there is an extra line below the column header and when you scroll there are lines going across the control where that it extra line was painted.
It seems line the control dc is shifted 2 pixel right and 2 pixels down.
When I dont use WS_EX_CLIENTEDGE style everything is fine. expect there is not 3d appearance.
If anyone knows how to solve this problem PLEASE HELP.
Thank you
Ilya
|
|
|
|
|
Hi!
How can I determine which application is using a given DLL. Let's say if I want to delete the dll file and then I get a message that DLL is locked by other application?
DavidR
|
|
|
|
|
|
While that utility does indeed show what DLLs are loaded, I do not see it showing what applications those DLLs are loaded by. Did I miss something?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
DavidR_r wrote:
How can I determine which application is using a given DLL.
Does this help?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|