|
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?
|
|
|
|
|
A List Control (CListCtrl) with a "View" propety set to "Report"
picm
|
|
|
|
|
|
I had already used SetItemState() before your suggestion. It works to selected an Item. I haven't yet used DefWndProcedure. I'll write about it.
thanks
picm
|
|
|
|
|
i really wonder if you can read !?! (did you have a look at the subject of the thread ?)
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
HI
how to send Byte Array from VB6 to VC6
i nead to send MyArray() to new function in VC name CalcArray(.....MyArray)
how to send the Array
Thanks Pini
|
|
|
|
|
Is the array made of basic types? I mean like integers or float... ?
If yes, you can pass your array by reference (in VB).
It will look like this:
VB:<br />
Declare Function YourFunc Lib "YourLib.dll" (ByRef YourArray As Integer) As Integer
C++:<br />
int __stdcall YourFunc(int* pArray);<br />
(__stdcall modify the calling convention to be compatible with VB calling convention).
|
|
|
|
|
yes
but i need to implement the odl File:
[id(1)] long MyFunction( xxxxxxxxx );
[id(1)] HRESULT MyFunction([in] xxxxxxxx,[out, retval] long* retval);
and
DISP_FUNCTION(CODBAPICtrl, "MyFunction", MyFunction, xxxxxxxx, xxxxxxxxxx)
what i nead to insert in the "xxxxxxxx"
Thanks
|
|
|
|
|
i will delete the post soon, things sound very strange, i just want to know if there are public holidays (excluding sat. and sun.) this week in america? if yes, how many days?
cheers
includeh10
|
|
|
|
|
I'M NOT AMERICAN? AN I ANSWER YOUR POST? EVEN IF YOU DON'T WANT !!!!!!
this is not the place to ask such things...
you have the soapbox and the lounge if you have off topic questions.......
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
includeh10 wrote:
, i just want to know if there are public holidays
Indeed this is a strange request. The topic of "public holidays" is rather vague. Some holidays are recognized by the federal government, some are recognized by the local government, some are recognized by certain religions, and some aren't recognized at all. Perhaps you could elaborate on what you are after (and maybe move this thread to the proper forum). You might just receive a better response.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
includeh10 wrote:
public holidays
What about protected and private holidays. Do you need to know about these too?
Chris Meech
I am Canadian. [heard in a local bar]
Gently arching his fishing rod back he moves the tip forward in a gentle arch releasing the line.... kersplunk [Doug Goulden]
Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
|
|
|
|
|
i can use WM_MOUSEWHEEL for capturing mousewheel actionz,but how do i know if i have moved the mousewheel clockwise or anticlockwise??.....
cheerz.....
|
|
|
|