|
where can i dl ipexport.h?
what is ti use?
thanx
|
|
|
|
|
hi all,
I am doing a MFC Application using Dialog Wizard.
I have added a Menu to Dialog.
Now I want to change the Color of Menu..I tried it but it is difficult to me.
If any one know this please ,reply me ..
I can change the Color of static controls,edit boxes..But I don't know to change the Color of Menues..
Thanks in advance..
|
|
|
|
|
Frustration!
I am trying to assign the value of a character array char my_array[99]; to a combo box but am just getting cryptic messages about boxing and __gc / __value.
I know that this should be very simple, I have found many examples using comboBox1->Items->Add(S"some text") but cannot seem to get it to use the contents of my variables
Please help, not much hair left!
|
|
|
|
|
The AddString() method takes a pointer to a null-terminated string, not a single character, which is what my_array[99] refers to. In other words, this will not work:
m_combobox.AddString(my_array[99]); but this will:
CString str = my_array[99];
m_combobox.AddString(str); You could also do something like:
char c[2] = {0};
c[0] = my_array[99];
m_combobox.AddString(c);
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Thanks for the suggestion.
Still having problems - I hope I am missing something obvious
These are the build errors I get from the code snippet above.
AddString' : is not a member of 'System::Windows::Forms::ComboBox'
stdafx.cpp(0) : see declaration of 'System::Windows::Forms::ComboBox'
error C2065: 'Cstring' : undeclared identifier
etc.
I am using Microsoft Visual C++ .NET
|
|
|
|
|
Rich Wright wrote:
AddString' : is not a member of 'System::Windows::Forms::ComboBox'
Perhaps you need to use the AddItemsCore() method.
Rich Wright wrote:
I am using Microsoft Visual C++ .NET
I've not ever used this. Plenty of others here have, however.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
it is because you are not programing with MFC...
... and the string class is CString, not Cstring (the 'S' in upper case), but here again, not sure that it works if you are not with MFC...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
you could cast your my_array into something more manageable.
me think that you should not use character array in C++ or Managed C++.
or post in the Managed C++ forum, because it's a .net specific question.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Maximilien wrote:
me think that you should not use character array in C++
why ??? arrays are very useful, even char ones !!! of course, there are very performant classes that manage strings instead of the legendary C char* , but sometimes, you cannot do without...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hi I need alot of help in trying to do this coursework. Can anyone give me help in this. here what is to be done.
The system he requires is very simple; he needs to have the ability to renew the membership of existing clients, to enrol new clients and to generate letters to remind clients whose membership is about to lapse
The progam should:
define appropriate user-defined data types (enumerations and/or structs) to model the data of the application.
read the client data from the data file and store it in a convenient form.
enrol new clients.
renew membership of clients.
perform a search through the data for clients whose membership is about to run out and generate a reminder letter.
save the client data to a data file.
I have tried to attempt it but never got past the first stage.
Cheers
|
|
|
|
|
Flame123 wrote:
I have tried to attempt it but never got past the first stage.
Show us the code you do have and we can probably steer you in the right direction.
Where is the membership information stored?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I dont have the coding at the moment its in uni but i think the membership information is stored on a txt file not sure about that.
|
|
|
|
|
Anonymous wrote:
I dont have the coding at the moment its in uni...
We'll wait patiently...
Anonymous wrote:
...i think the membership information is stored on a txt file not sure about that.
Good. That will make your code much easier than having to mess with a database or some other complicated file structure. Can I assume the structure of said file is formatted something along the line of:
client #:signup date:expire date with ':' delimiting the three fields?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Ok I managed to get the coding. Phewww This is what i have done so far but i have no idea how to finish it off according to the requirements. i still need to
one to open a file for writing
one to determine if a client already exists
one to create a new client
one to calulate days remaining in membership
one to generate a reminder letter
one to write to and close the file
Could u help me finish this off. Where it says Here is choice i haven't finished validating that bit cos i am still testing to see if it all works. here is the coding:
struct Member {
string member_name;
string member_emailaddress;
int membership_days_reamaining;
};
int main(void)
{
int user_choice; //will be the user's choice of menu item
user_choice = runMenu(); \\gets the choice by running a function
while(user_choice != 6) \\loops until user quits
{
doStuff(); \\this will be the function to perform manipulations
user_choice = runMenu(); \\reloads the user choice
}
return 0; \\end of driver
}
}
int runMenu() \\displays menu and returns user choice
{
int ret_value;
cout<<"Here is choice 1"<<endl;
cout<<"here="" is="" choice="" 2"<<endl;
="" 3"<<endl;
="" 4"<<endl;
="" 5"<<endl;
="" cout<<"hit="" 6="" to="" quit"<<endl;
="" cout<<"please="" pick="" one"<<endl;
="" cin="">> ret_value;
return ret_value;
}
|
|
|
|
|
Flame123 wrote:
one to open a file for writing
I think you would use ofstream for this.
Flame123 wrote:
one to write to...the file
Use the insertion (<<) and extraction (>>) operators for this.
Read the entire file into a heap-based structure.
Flame123 wrote:
one to determine if a client already exists
Search the structure.
Flame123 wrote:
one to create a new client
Add to the structure.
Flame123 wrote:
struct Member
{
...
int membership_days_reamaining;
};
I don't know that it is such a good idea to store "days remaining" in the file. This would require constant updating of the file based on some "reference date." It would be better to store the reference date and if the difference between that and the current date exceeds some number (e.g., 180 days), print a reminder letter. Or, when the person enrolls, you know they are paying for a certain period of time (e.g., six months) so you could also write the expire date to the file. Then it would be a simple matter of iterating through the file and checking for all "expire dates" that are after the current date. Make sense?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
|
I understand but what you said i have no idea how to do.
|
|
|
|
|
Hi...
I'm quite new to win32 programming so don't dare to laugh with my questions
I'm looking for a control that enables me to resize a treeview in a window at runtime. What I want to achieve is that a treeview can be resized by dragging the seperator between a treeview and a listbox, the same way as in Windows Explorer where you can resize the directorytree and the filelist.
Can I use a rebar for this? Or is this only meant for making toolbars resizable/removable?
I don't use MFC!
|
|
|
|
|
who need to do it manually.
handle the WM_SIZE of the containing window to be able to MoveWindow the tree view.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I don't want to get my treeview and listbox resized when the containing window is resized.
I want to resize the treeview. In that case the WM_SIZE message isn't sent to the containing window.
I made the treeview resizable but then the user is able to resize it all over the containing window.
|
|
|
|
|
You need to find a control that is similar to the MFC Spliiter Window (Maybe there is a common control like that) and then you embed it between your tree view and the other window to the right of the tree view. When the user moves the splitter window, then you use MoveWindow to reposition the tree view and the other control. The nice thing about the splitter windows is that they usually run horizontally and vertically, so you don't have to try to constrain a user's window positioning in one direction or the other. Also, if the user is allowed ot resize your main window, then you adjust the positions of all three controls (tree view, splitter, other control) when the window is don being positioned (I think you get WM_WINDOWPOSCHANGED when a window is done being moved).
|
|
|
|
|
I need to show a selection in a list control, but i also want to inhibit a selection by a mouse. If I use a "disalbled" property i'll have a gray background in a list control window. How can I inhibit a selection and also have a white background?
Thanks
pm
|
|
|
|
|
Which application u are having ?
Dialog, SDI , MFC or ??
Something might be useful for u
For selecting an item:
Listbox Control : SetCurSel
ListView Conrtrol : SetItemState (plesae check out MSDN for verification)
For mouse events masking:
override DefWndProcedure
mask Windows mouse related messages...
this should work
|
|
|
|
|
|
and which Control exactly?
|
|
|
|