|
Maxwell Chen wrote: 53000 entries
Lol. This could be a favorite typo for everybody.
Nibu thomas
Software Developer
|
|
|
|
|
Nibu thomas wrote: a favorite typo
You know what?! I was tickling and thought it something like re-amin-ing. Then were there such a word "amin" or "amine" ...
Maxwell Chen
|
|
|
|
|
I am improving an application that is taking forever to load, primarily because each time it loads it initialises a full tree of nearly 100000 items, even though there are only 5 or so keys viewable from the root path. Does the MFC tree control have any sort of support for reading only what is needed, or do I need to hook the open scope(whatever they may be called) functions and code it manually?
When I die I'd like to go peacefully in my sleep like my father, not screaming in terror like his passengers!!!
|
|
|
|
|
This[^] will be of some help.
Take a look at TVN_GETDISPINFO .
Another keyword for look up is LPSTR_TEXTCALLBACK .
For more details on how this works take a look at the TVITEM structure documentation for more details. Look closely at the callback values for Image and Text.
Using this you can create your own virtual tree control.
Nibu thomas
Software Developer
|
|
|
|
|
Thanks heaps.
When I die I'd like to go peacefully in my sleep like my father, not screaming in terror like his passengers!!!
|
|
|
|
|
What is the difference between Abstraction and encapsulation ?
|
|
|
|
|
Encapsulation is the binding of data and functions into one unit that is called a class. Whereas abstraction means that you are hiding the functionality from the user and let him use your function.
For example
class CXYZ
{
int a,b;
public:
void show()
{
//SOme code
}
};
Now you have included these variables in a class along with the member functions . THis is encapsulation.
Now for abstraction suppose you want to add the two numbers and show the total in the show function.
SO here you can add two variable in the manner you like hiding the code from the user and let him use your function
c=a+b; //could be one simple option
//Another option
a=a-2;
b=b+2;
c=a+b;
Vision is Always important and so is your ATTITUDE.
Wishes.
Anshuman Dandekar
|
|
|
|
|
|
Encapsulation
Abstraction
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
Hello ,
I want to find whether cookie is 1st party cookie or 3rd party cookie?
How do I do this?Should I write BHO or using webbrowser control I do this??
which event we will get when cookie come on PC?
Dipali
|
|
|
|
|
can u please give me the links on IE programing?
|
|
|
|
|
I have a trouble like below description :
My program has a dll file and a server application
in the mydll.dll, I want to send a message to the server application.
The message is the keyboard message, for example, WM_CHAR. I want to send
a command of copying data in the server application. So, I need sending
the union keys of Ctrl + C, to copy the selected text of the server
application to the clipboard. However, I don't know how to do that.
Please, help me, point me to some pages or give me some intruction.
Thanks a lot.
|
|
|
|
|
vtalau wrote: So, I need sending
the union keys of Ctrl + C, to copy the selected text of the server
application to the clipboard. However, I don't know how to do that.
Use the |(OR) operator to combine two values.
For eg:
VK_CTRL|VK_C
Nibu thomas
Software Developer
|
|
|
|
|
I have a trouble like below description :
My program has a dll file and a server application
in the mydll.dll, I want to send a message to the server application.
The message has the wParam referring to a string. I wrote my code :
CString speak1;
....
LPTSTR str = (LPTSTR)malloc((speak1.GetLength()+1) * sizeof(TCHAR));
....//copy the data of the "speak1" to the "str"
::PostMessage(hMainWindow,WM_USER+1,(WPARAM)str,str.GetLength()+1);
free(str) ;
in my server application, I try to get the address of the string from the
wParam. However, I can't get the content.
Please, help me, point me to some pages or give me some intruction.
Thanks a lot.
|
|
|
|
|
vtalau wrote: ::PostMessage(hMainWindow,WM_USER+1,(WPARAM)str,str.GetLength()+1);
free(str) ;
Use SendMessage instead of PostMessage . Otherwise free(str) will get executed before the message is processed. As PostMessage does not wait for the message to be processed.
Nibu thomas
Software Developer
|
|
|
|
|
You need to be using new and delete instead of malloc() and free() . Otherwise, the CString object's constructor and destructor do not get called.
In addition, if you are going to use PostMessage() , you'll need to move delete to the server so that it can free the memory after it is done with it.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
Hi
i have a dialog that contains a child dialog and some controls (one of them is "add" button).
initially the child dialog is empty, when the user presses add button i add some shape to the child dialog.
so after some addings i need to set scrollbar for it and to resize the child dialog without changing the size of the parent dialog.
can u help me?????
|
|
|
|
|
you need to scrollbar horz and vertz and also you need to
event WM_lbuttonmouse and mousemove and wheelmouse with events scroll
with these functions you can find your answer
and if you draw shapes in dialog I suggest use WM_PAINT
and maybe it is some helpful to you
http://www.codeproject.com/dialog/scrollablechilddialog.asp[^]
|
|
|
|
|
actually i am working on it now. am painting the shapes in wm_paint ,and i added the scroll bars
one thing is left: when the largest shape becomes bigger than the child dialog boundary, i am supposed to enlarge the child dialog with keeping the same size seen by the user (the view port) and without causing the onpaint to draw on the parent dialog.
thanks alot for your reply
|
|
|
|
|
how to save the value/string of CFlexgrid cells as a file onto hard disk?
|
|
|
|
|
I guess you will have to write them yourself. There are no inbuilt methods for this purpose AFAIK.
Nibu thomas
Software Developer
|
|
|
|
|
use the CFile class? and then read the value/string of every cells?
Is there any simple method?:->
|
|
|
|
|
:shrugs: Can't say.
Well I can suggest you this... I don't know how feasible this is...
Serialize(or write) the object into a file and then when you need it read back the object from file.
Nibu thomas
Software Developer
|
|
|
|
|
The flexgrid has option to save files as CSV. I did it over a year ago, so don't remember the details, but i do remmeber saving files as CSV from Flexgrid. Check the method listings in the help.
|
|
|
|
|
Check the SaveGrid method for FlexGrid,here is a quick look:
SaveGrid Method
Saves grid contents and format to a file.
Syntax
[form!]VSFlexGrid.SaveGrid FileName As String, SaveWhat As SaveLoadSettings, [ FixedCells As Boolean ]
Remarks
This method saves a grid to a binary or to a text file. The grid may be retrieved later with the LoadGrid method. Grids saved to text files may also be read by other programs, such as Microsoft Excel or Microsoft Word.
The parameters for the SaveGrid method are described below:
FileName As String
The name of the file to create, including the path. If a file with the same name already exists, it is overwritten.
SaveWhat As SaveLoadSettings
This parameter specifies what should be saved. Valid options are:
Constant
Value
Description
flexFileAll
0
Save all data and formatting information.
flexFileData
1
Save only the data, ignoring formatting information.
flexFileFormat
2
Save only the global formatting, ignoring the data.
flexFileCommaText
3
Save data to a comma-delimited text file.
flexFileTabText
4
Save data to a tab-delimited text file.
flexFileCustomText
5
Save data to a text file using the delimiters specified by the ClipSeparators property.
flexFileExcel
6
Save all data and formatting information to an Excel97 file. This filter does not support frozen color rows or columns.
Options As Variant (optional)
When saving and loading text files, this parameter allows you to specify whether fixed cells are saved and restored. The default is False, which means fixed cells are not saved or restored.
When saving and loading Excel files, this parameter allows you to specify the name or index of the sheet to be loaded, or the name of the sheet to be saved. If omitted, the first sheet is loaded.
The options for saving fixed rows, columns, and translated combo values include:
Constant
Value
Description
flexXLSaveFixedCells
3
Saves fixed cells.
flexXLSaveFixedRows
2
Saves fixed rows.
flexXLSaveFixedCols
1
Saves fixed columns.
flexXLSaveRaw
4
Saves raw (untranslated) data.
For example, the options can be written as:
fg.SaveGrid "book1.xls", flexFileExcel
fg.SaveGrid "book1.xls", flexFileExcel, "sheetName"
fg.SaveGrid "book1.xls", flexFileExcel, flexXLSaveFixedCells
fg.SaveGrid "book1.xls", flexFileExcel, flexXLSaveFixedRows
fg.SaveGrid "book1.xls", flexFileExcel, flexXLSaveFixedCols
fg.SaveGrid "book1.xls", flexFileExcel, flexXLSaveRaw
fg.SaveGrid "book1.xls", flexFileExcel, _
flexXLSaveFixedCells Or flexXLSaveRaw
Notes
|
|
|
|