|
Hi there !
If any one could please prototype/describe "WlxDisconnectNotify" and "WlxReconnectNotify"? These 2 are new to XP. Also I would like to know if there are additonal export functions in msgina for Win2003.
Thanks in advance...
Lex
|
|
|
|
|
I am writing a small utility to run as a system tray app. My app will detect when a digital camera or a removable drive (such as CompactFlash readers, etc.) is attached to the computer. I am able to do this by listening to the WM_DEVICECHANGE event broadcast by Windows. However, once I got the event, I don't know how to detemine if the connected device is one the hardware types that I am waiting for. Right now, Windows fires this event whenever there's a hardware change, including CD insert and removals. Is there anyway I can determine if the connected device is a digital camera or a removable mass storage device? Any sample code of how to obtain this information would be helpfull. Thanks.
|
|
|
|
|
My current project (a VC++/MFC program) needs to do a very lenghty
computation. I want to use multiple PCs running together to shorten the processing time.
Here is the detailed idea:
There are not many interdependant calculations. Actually, i need to generate a very large 2D matrix. And each element in this matrix is computed by the same algorithm.
The problem is the data source is very large (millions of images). So what I am thinking is to seperate the data source and put subsets of the data onto different PCs. So each PC can run the program at the same time to generate a small part of the big matrix. After all the small matrixes complete, the program will combine them together.
Is it a feasible way? Could anyone please give me some idea on how to write this program? What kind of technique I need to use, and what computer structure should I use (peer to peer, or client server)? Thanks!
|
|
|
|
|
aurorahe explained the basics of distributed computing without knowing about it...
aurorahe wrote:
Is it a feasible way?
Indeed. This is the way much computational work is partitioned.
Could anyone please give me some idea on how to write this program?
I'm sorry, but don't you even have a clue of how to transmit the data between the computers, or is it just you don't know how to partition it? If the former you indeed have to read up on TCP/IP communications etc. If the latter I suggest you go with a gut feeling: Honestly - if you have a gut feeling about something, chances are it's right.
The structure you should use depend entirely on what you have at hand - if you have a Beowulf cluster it's pretty obvious. If you have a "master" machine and a lot of "slaves" it's equally obvious. If you have a grid... well, if you had a grid I'd expect you to know how to at least balance it why I can't give any advice.
Perhaps you should tell us what kind of hardware you have (and how it's connected) before we even can guess of what you need and/or want?
|
|
|
|
|
Maybe I need to use DCOM or gSOAP?
The hardware I have is a couple of PCs (running XP or 2000) networked together (Microsoft Windows Netwrok). Any hint? Thanks!
|
|
|
|
|
I have to do something similar (but not with images) in two weeks... so if you have a solution maybe you write an article?!
|
|
|
|
|
|
You could look at MsgConnect http://www.msgconnect.com[^] It looks interesting, but I haven't actually used it. I'd be interested in any feedback you may have if you do use it.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
Probably a bit of a late response, but you could look at doing a web search for 'grid computing', where I beleive this is what they were doing ..
'G'
|
|
|
|
|
grid computing is way too advanced i guess.
|
|
|
|
|
sure its advanced - but using the MsgConnect tool & similar idea you could scale it down a bit - its a great concept
'G'
|
|
|
|
|
sorry for this simple question, but how can I get my color printer to print in the same color as my VC++ 6.0 IDE display? - yes, I do have colour selected.
I have comments in Green, keywords in Blue, ... I would like my printed pages to display the same colours.
Thanks for helping me with this.
Johnny
|
|
|
|
|
My suggestion. (Might not work)
Copy your codes from your IDE to any word processor that support RTF at least and print it there.
If you could view the font as colored in other word processor and still your printer could not print. It is definitely your printer problem. Either software or hardware problem (running out of ink)
|
|
|
|
|
I posted this in the VS Ide area, but I don't think many people get over there. Does anyone have any ideas?
I have a problem with vs.net 03. I noticed a great slow down of c++ projects. I can type and be 10 to an upwards of 20 chars ahead before seeing them on the screen. Intellisense is also slow in showing. This just happed reciently. I did a defrag of my hard drive and then noticed this. C# projects work fine. Anyone seen this or know how to fix it?
Also, is there a way to fix c++ intellisense to not have to use the mouse? In C# after hitting a . and having intellisense popup, the first item is selected. I can push a letter or the up and down arrows and have it select different items. In C++ if I touch the keyboard, it disapears. I have to use the mouse to scroll and select something. It's a pain.
TIA
|
|
|
|
|
i need to sort an object of type std::list
i have something like this:
(.h)
struct _Selected
{
_decimal ent;
_decimal docNum;
}Selected;
typedef list<_Selected, allocator<_Selected> > LISTSTR;
LISTSTR arrSelected;
and i need to sort 'arrSelected'
how can i do this?
thanks
Nuno Henrique Mendes
|
|
|
|
|
NHM wrote:
and i need to sort 'arrSelected'
how can i do this?
std::sort? Did you even *read* the documentation before asking?
|
|
|
|
|
Mike Nordell wrote:
std::sort? Did you even *read* the documentation before asking?
Ehm.
Documentation[^] states that you need a Random access iterator[^] to use std::sort, and std::list::iterator is a Bidirectional iterator[^]
Anyway, his problem is that he has no < operator defined for his struct, which is easy enough to fix. Then he can use std::list::sort
|
|
|
|
|
Mike Nordell wrote:
std::sort? Did you even *read* the documentation before asking?
Nemanja Trifunovic pitched in:
Ehm.
Documentation states that you need a Random access iterator to use std::sort ...
*slap* (that was the sound of one hand clapping). OK, I'm a moron. I stand corrected and bow my head in shame.
|
|
|
|
|
Hi,
I try to use the DumpElements function to dump specific information from a CMap. If I define the Dump function has follow:
template <> void AFXAPI DumpElements<cstring> (CDumpContext& dc, const CString* pElements, INT_PTR nCount)
{
… do something
}
I get a linker error (LNK2005) that this function is already defined in a other obj. The only thing defined in this obj is a other CMap of CStrig.
Is there any sample available on you to properly use this function?
Thank you
Sascha Schantz
|
|
|
|
|
Hi,
I'm overriding PreTranslateMessage() for my CView-derived class because I want to detect when the user presses ctrl-z (undo). I know that pMsg->wParam has the key code, but how can I check if the ctrl key is also pressed? On a sidenote, why can't I get ctrl-z in the OnKeyDown() of a CView? I already removed ctrl-z from my accelerator table but I still cannot get ctrl-z to show up in OnKeyDown(). Thanks for all hints!
cheers,
roel
|
|
|
|
|
You do not have to use PreTranslateMessage for this. You can your view's OnKeyDown message handler. Use GetKeyState(VK_CONTROL) to check the status of the control keys.
if ((nChar == 'z' || nChar == 'Z') && GetKeyState(VK_CONTROL) & 0x80))
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Myself I'd use an accellerator for CTRL+Z that mapped to UNDO.
|
|
|
|
|
Mike Nordell wrote:
Myself I'd use an accellerator for CTRL+Z that mapped to UNDO.
I would to, but roel said he(she?) removed the accelerator. He must have done that for a reason?
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
'He', thank you very much
I did it because the CView is in a library that I'd like to keep as separate as possible from the application it is going to be used in.
Anyway, the problem turned out to be that I tried to use nFlags in OnKeyDown to determine the state of the Ctrl key - for some reason I thought that nFlags & VK_CONTROL was supposed to give me the state. GetKeyState() was the solution! Thanks to both of you.
cheers,
roel
|
|
|
|
|
I try to place a file into the clipboard so I can later paste them in Explorer. I can place text, bitmap etc, but how can I place a file into the clipboard?
Thanks
|
|
|
|