|
Assuming you mean when using XP themes (manifests have multiple uses), then no. The theme can override any styles/colors that it wants to, you don't have complete control over it like in the Windows Classic style.
|
|
|
|
|
For example, if we double click h files in windows explorer, all h files are opened by a single VC (app).
I want to do same for a kind of my files (e.g. extension is .myf).
currently, when I click a .myf file every time, the file is opened always by a new app of mine - if I click 5 of .myf files, I have 5 of my app opened - I think I need to do something special in register.
Any suggestions to solve the problem?
|
|
|
|
|
Whenever you exe starts you check if another instance is already running, if another instance is already running then simply send a message to the original exe with a filename.
Lots of articles here on instance checking.
My sins are bloody red, my coffee is a black hole.
|
|
|
|
|
HI
I'm interested of in "Multiagent Systems"
Who could send me some source code (in C/C++) concerning MAS problems
I can't find in internet.
|
|
|
|
|
Greetings:
I have this application here that builds absolutely error free when I specify that it be built using MFC from the DLL. But when I specify a build with MFC in a static library, suddenly, one of my classes won't compile. I get this message:
MeasurementList.cpp(66) : error C2039: 'classCEditList' : is not a member of 'CEditList'
c:\Development\uLTD\Software\uLTDTagTalk\EditList.h(50) : see declaration of 'CEditList'
MeasurementList.cpp(66) : error C2065: 'classCEditList' : undeclared identifier
CMeasurementList is derived from CEditList which is derived from CListCtrl. The main point I want to stress is that it builds and runs without any problems if I specify "Use MFC in a shared DLL".
Has anybody ever run into this? Any idea what might be going on here?
Thank you,
Mark
|
|
|
|
|
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?
|
|
|
|