|
So have you looked at line 66 of MeasurementList.cpp , and line 50 of EditList.h ? Is classCEditList the name of a class?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi David:
Yes, I have. Can't find a thing wrong. What sort of things would I look for if the code builds without any problem if I specify use of the MFC DLL as apposed to using MFC in the static library? If it were something as obvious as a class name spelling error, that problem would show up regardless of the build type. There has to be something much more subtle going on here.
Mark
|
|
|
|
|
can any1 help me in drawing use case diagram and class diagram of UML using this case study plz?
The managing director of a large department store asks you to develop a database system for his business. He explains that the department store which is located in a ten-floor building in Manchester Arndale Centre has many different departments and each department is located on a floor of this building. The only way to get in touch with the employees of each department is by using the phone since each department has its own
phone line.
Each department employs a number of people and each employee has a manager who is also located within the same department. Each employee is represented using his employee number, name, and the department he works for. There might be many layers of management in some departments since these can employ a large number of people.
The department manager is the person who is charge of the management of the
department and he/she is reporting directly to the managing director.
For each department we would like to keep information about its name, floor and its phone number and of course, its employees and managers.
Items are located in departments so their sales should be recorded for each department. Each sale is given a unique identifier and we also keep the quantity and overall price of the sale. For each item the data kept are its name, type and color. We can assume that the name is unique for each item.
We would also like to keep information about the deliveries of items.
We would like to identify each delivery using a unique identifier and also know the quantity of a specific item included in a specific delivery. Since each delivery is related to a supplier, we need also to know the supplier name and the supplier number. The same item can be supplied by different suppliers and also the same item can be sold by different departments.
We do not keep any other data neither we are interested in adding other less useful information. For simplicity, we can also assume that a sale and a delivery always include only one item.
i wl b waiting for this
regards
wahid
|
|
|
|
|
gwahid wrote: i wl b waiting for this
ok.
have you at least tried to draw something ?
|
|
|
|
|
hi
thx for ur reply...actually i hv identified actors, usecases and their relation...but still im not so sure about if im doing it in right way.
as i have identified following actors
depertment, employee, department manager, managing director, sales management system and supply management
so im not sure for many things as
do i need to mention 1st para which s related to phone lines, n is it necessary to use this line....(department employees individuals) or maybe cz its obvious it will happen... i have lots of confusions regarding this.
Regards,
wahid
|
|
|
|
|
|
hi
thx for ur reply. actually i hv searched google alot and i hv read 2 books and i hv drawn a rough sketch. i jct wanted some 1 to check if its right or needs some change. if u can do this then i can send that sketch to u....
jst i hv few confusions which i couldnt find in google or any book.
So if u kindly help me then plz do let me know.
i have done jst use case diagram, if its okay then i wl draw class diagram.
Regards,
Bye
wahid
|
|
|
|
|
gwahid wrote: So if u kindly help me then plz do let me know
speak english* if you want people to :
1) understand you
2) help you
* : by english, i meant that using SMS-ed writing is not a regular way to ask a question, whatever language you use.
|
|
|
|
|
I get this error when i compile,
cannot convert from 'CWnd *' to 'HWND'
here is the code:
HWND hwndNotepad; // A handle to the Notepad window
hwndNotepad = FindWindow("Notepad", NULL);
How can I get this to work?
|
|
|
|
|
try
HWND hwndNotepad; // A handle to the Notepad window
hwndNotepad = ::FindWindow("Notepad", NULL);
|
|
|
|
|
Thanks that helpt me. But when I try to send to that windows I cant use this way?
hwndEdit = ::FindWindowEx(hwndNotepad, NULL, "Edit", NULL);
SendMessage(hwndEdit, WM_CHAR, lpszText[i]);
This is the error I get,
cannot convert parameter 1 from 'HWND' to 'UINT'
|
|
|
|
|
Same thing. You are using Windows APIs in MFC class member functions so the compiler sees the
MFC version. Use ::SendMessage(...)
Edit - reword that
Same thing. You are using Windows APIs in CWnd-derived class member functions so the compiler sees the CWnd version. Use ::SendMessage(...)
|
|
|
|
|
You are the king! It work, thanks.
|
|
|
|
|
Try this:
HWND hwndEdit = ::FindWindowEx(hwndNotepad, NULL, "Edit", NULL);
::SendMessage(hwndEdit, WM_CHAR, lpszText[i], 0);
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
<br />
char *MY="Hello"; <br />
HWND hWnd = ::FindWindow("Notepad", NULL);<br />
CWnd *hWndEdit=FindWindowEx(hWnd,NULL,"Edit",NULL);<br />
::SendMessage(hWndEdit->m_hWnd,WM_SETTEXT,0,(long)MY);<br />
|
|
|
|
|
Here's what I need to associate, you will need a printer installed to see similar results as mine.
ASSOCIATION_1
------------------------------------------------------------------------------
- Go to here:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usbprint\Enum]
If you have a printer installed it should show up here.
The data for value "0" is a reg location under [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum].
I.E. - "0"="USB\\Vid_04b8&Pid_0007\\LFP26060525212949-"
The last part of the data of "0" is the printer usb serial number (LFP26060525212949-) to my knowledge.
This key/serial number is the first part of the association that is needed.
So ASSOCIATION_1: "LFP26060525212949-"
ASSOCIATION_2
-----------------------------------------------------------------------------------------
- Go to here:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\PrinterName]
PrinterName would be the name of the printer(s) installed, as seen in "Printers and Faxes".
So ASSOCIATION_2: "PrinterName" (I.E. Epson 4800).
FYI: The DeviceInstanceId value's data under [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\PrinterName\PnPData] for the particular printer is a reg location under [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum].
So if I could associate a printer's usb serial number to its name in "Printers and Faxes". That would be "Fantastic". I've tried several ways to no avail. Really a virtual printer port name to usb serial number match would work too.
I assume windows does this association somehow...
Thanks.
-- modified at 14:46 Friday 10th November, 2006
BTW: You're doing good if you figure this one out.
|
|
|
|
|
Yeah, I've had a similar problem. I need to come up with a way to associate a USB port to a specific printer when multiple printers of the exact same type are plugged into the same machine. I've tried going through the registry, but after searching and diving through it many times I couldn't find any correlation. Is this even possible? It appears that WinBlows can do it, but are they using some sort of super secret magic or a printer fairy to get this done?
I win because I have the most fun in life...
|
|
|
|
|
I didn't think I would get any help on this one...
|
|
|
|
|
I have subclassed a scrollbar in order to apply a skin, but I have now lost the ability to display the context menu. The only thing my callback does is to return CallWindowProc(). I have commented out all my message handlers trying to narrow the problem down. Using Spy++ I compared my subclassed control to a standard control, the messages are identical except for the WM_CONTEXTMENU. A standard control sends the message after processing the WM_RBUTTONUP message, my control does the same except that it recieves the WM_CONTEXTMENU message directly after sending it.
Could anybody point out what I might be doing wrong?
|
|
|
|
|
WalderMort wrote: my control does the same except that it recieves the WM_CONTEXTMENU message directly after sending it
After sending what?
|
|
|
|
|
The scrollbar sends a WM_CONTEXTMENU message after processing the WM_LBUTTONUP message. I guess this message is sent to the parent window. A default scrollbar will only send this message, but mine both sends and recieves it. So I guess it is sending the message to itself rather than the parent. But I can't understand why.
I should also mention that I have tried forwarding the message to the parent, but the menu is still not being displayed.
|
|
|
|
|
heh I'm confused as usual. WM_CONTEXTMENU should go to the control under the cursor and
if the control calls DefWindowProc() then it goes to the parent right?
|
|
|
|
|
I'm not sure where it's supposed to go. According to MSDN:
"If a window does not display a shortcut menu it should pass this message to the DefWindowProc function. If a window is a child window, DefWindowProc sends the message to the parent. Otherwise, DefWindowProc displays a default shortcut menu if the specified position is in the window's caption.
DefWindowProc generates the WM_CONTEXTMENU message when it processes the WM_RBUTTONUP or WM_NCRBUTTONUP message or when the user types SHIFT+F10. The WM_CONTEXTMENU message is also generated when the user presses and releases the VK_APPS key."
Well, I am not processing it, and it is being forwarded to the SCROLLBAR class's window procedure, which should process it and display the menu. But for some reason it is being returned to my window procedure.
So the message must be getting sent to the wrong window.
To test this I have created two scroll bars, both children to the same window. One is subclassed, but the subclassing does nothing but call the old procedure. Only the subclassed control recieves the message, yet they both send it.
Is there any way to find the window it's being sent to using spy++?
|
|
|
|
|
WalderMort wrote: To test this I have created two scroll bars, both children to the same window. One is subclassed, but the subclassing does nothing but call the old procedure. Only the subclassed control recieves the message, yet they both send it.
How do you know the scrollbar you haven't subclassed isn't getting the message if you haven't
subclassed it?
Based on the behavior you describe, it sounds like the default processing is handled by the
window containing the scrollbar, not by the scroll bar itself. What I mean is, with a basic
window (no subclass or anything) the SCROLLBAR class does nothing with the WM_CONTEXTMENU so it
passes it along to DefWindowProc which forwards it to the parent, the window containing the
scrollbar. The parent displays the scrollbar context menu. So, intercepting it in the
subclassed SCROLLBAR but doing nothing except letting the scrollbar handle it, it ends up back at
the parent window again.
|
|
|
|
|
Mark Salsbery wrote: How do you know the scrollbar you haven't subclassed isn't getting the message if you haven't
subclassed it?
Using Spy++
I also watched the messages in the parent window ( which is the same for both scrollbars ). With the NON-subclassed control the parent recieves a WM_ENTERIDLE while the menu is being displayed. With the subclassed control, the parent recieves a WM_CONTEXTMENU message, which I guess is sending back to the child. I must stress, the only difference between the two controls is that one is subclassed. All windows messages are ( or should be ) handled by the same window procedure.
|
|
|
|