|
psasidisrcum wrote:
None of these seem to have any documentation on how to build the solutions, so I'm left clueless.
Have you tried downloading & using samples from code project? Most of the authors seem more than willing to help guide someone through a little trouble (as long as the person has attempted to figure it out on their own).
-------------------------------
|
|
|
|
|
I'm writing a program that needs to copy files to a DVR writer on another computer on my network. I want to be able to use CopyFile() specifying the destination path as z::\folder\filename.ext. How do I get connection to the remote computer (named lounge) disk (say f::\) and map that to a local drive letter (in this example, z::\) Can someone point me in the right direction - I can't seem to find the right path in the VC++ documention. (I hope it's not too obvious, otherwise I'll be embarresed ) Thanks in advance !
Doug
|
|
|
|
|
O.K., I'm embarresed !!! Not only am I answering my own question, but the answer is also trivial !! I have now discovered that the operands to CopyFile() will allow useage of the computer name - in my example, the destination path can be set to \\lounge\f\test.txt (and the use of drive mapping is not needed). In my own defence, the documentation to CopyFile does not actually state that network drives can be accessed by prefixing the path with the computer name.
Doug
|
|
|
|
|
DougButtimer wrote:
In my own defence, the documentation to CopyFile does not actually state that network drives can be accessed by prefixing the path with the computer name.
It does if you click the File Name Conventions link.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
After using CreatePipe() to establish pipes between server and child, is it possible to disconnect those pipes without killing child process (both are still alive)?
includeh10
|
|
|
|
|
CreatePipe() is just a wrapper around CreateNamedPipe(). If you used CreateNamedPipe() directly, instead of CreatePipe(), you can call DisconnectNamedPipe() and CloseHandle() to disconnect those pipes without killing child process.
|
|
|
|
|
Anonymous wrote:
CreatePipe() is just a wrapper around CreateNamedPipe().
Any hint for creating my own wrapper of CreatePipe from CreateNamedPipe()?
Basically, CreatePipe() has 2 handles as parameters, how to use thr 2 params in CreateNamedPipe()?
includeh10
|
|
|
|
|
An anonymous pipe exists until all pipe handles, both read and write, have been closed. A process can close its pipe handles by using the CloseHandle function. All pipe handles are also closed when the process terminates.
|
|
|
|
|
I'm trying to be able to select many files from the dialog box it appears when you select the open button but I can't. It only selects one file at a time.
Anyone know how I can do that?
|
|
|
|
|
When you setup your OPENFILENAME structure try using the OFN_ALLOWMULTISELECT flag for the DWORD Flags parameter. I think that should help.
jc0dex
|
|
|
|
|
CFileDialog has a public member variable, m_ofn , that is the OPENFILENAME structure. Try
b.m_ofn.Flags |= OFN_ALLOWMULTISELECT;
before your call to DoModal()
|
|
|
|
|
Thanks I'll try that..
|
|
|
|
|
enum {HASH_TABLE_SIZE = 101};<br />
typedef ChainNode * HashTableType[HASH_TABLE_SIZE];
I could not get the point, can someone explain what 2nd line of the code does to me?
Best wishes,
Kromozom
|
|
|
|
|
defines a new type, HashTableType, to be an array of length HASH_TABLE_SIZE of type ChainNode *
Pandoras Gift #44: Hope. The one that keeps you on suffering. aber.. "Wie gesagt, der Scheiss is' Therapie" boost your code || Fold With Us! || sighist | doxygen
|
|
|
|
|
Thanks Peter, this one was a confusing type definition
|
|
|
|
|
Dear Friends,
My application is opening an instance of MS-Word using automation. My application is thus receiving all events sent by that instance of MS-Word.
Now I want to get key stroke events on that instance of MS word. i.e if user press Ctrl+A while typing in MS-Word, i want my application to get notified. How can i do so ??
I already obtained the 'handle' of that instance of MS-WORD which is opened by my application via automation. Please give me your suggestions.
Imtiaz
|
|
|
|
|
Hi,
I´m trying to make a 1d array of classes but havent really got it working that good.
This is what I´ve done:
Enemy **enemy;<br />
enemy = new Enemy*[2];<br />
enemy[0] = new Enemy(g_lpDDSBack, hInstance, g_pDD, 100, 0, 48, 48, NULL);<br />
enemy[1] = new Enemy(g_lpDDSBack, hInstance, g_pDD, 300, 0, 48, 48, NULL);<br />
<br />
ofstream fout;<br />
fout.open("output.txt");<br />
fout << enemy[0]->PrintDestX() << endl;<br />
fout << enemy[1]->PrintDestX() << endl;<br />
fout.close();
Obviously what I´m trying to do is to set enemy[0]´s DestX to 100 and enemy[1]´s DestX to 300.
The thing is, when I´m printing out both enemies DestX both says 300.
What am I doing wrong, or should do diffrent?
Thanks.
|
|
|
|
|
Can you post the implementation of the Enemy constructor?
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Is this what u want?
Enemy.h
class Enemy: cSurface<br />
{<br />
public:<br />
Enemy(LPDIRECTDRAWSURFACE7 lpDest, HINSTANCE hInst, LPDIRECTDRAW7 hDD,<br />
int destX, int destY, int nWidth, int nHeight, <br />
COLORREF dwColorKey = -1);<br />
Enemy();<br />
~Enemy();<br />
int PrintDestX(){return DestX;}<br />
int PrintDestY(){return DestY;}<br />
...<br />
private:<br />
static int Width, Height, DestX, DestY;<br />
}<br />
Enemy.cpp
int Enemy::Width;<br />
int Enemy::Height;<br />
int Enemy::DestX;<br />
int Enemy::DestY;<br />
<br />
Enemy::Enemy(LPDIRECTDRAWSURFACE7 lpDest, HINSTANCE hInst, LPDIRECTDRAW7 hDD,<br />
int destX, int destY, int nWidth, int nHeight,<br />
COLORREF dwColorKey)<br />
{<br />
Alive = true;<br />
<br />
hInstance = hInst;<br />
surface = lpDest;<br />
lpDD = hDD;<br />
Width = nWidth;<br />
Height = nHeight;<br />
DestX = destX;<br />
DestY = destY;<br />
<br />
this->Create(hDD, nWidth, nHeight, RGB(255, 0, 255));<br />
this->LoadBitmap(hInst, IDB_ENEMY, 0, 0, 48, 48);<br />
}
|
|
|
|
|
Hello,
I see your problem. change:
static int Width, Height, DestX, DestY;
to:
int Width, Height, DestX, DestY;
Your problem lies in the static qualifier. If you make member variables of one class static, than the viariable is shared among all instances of that class. If you remove the static qualifier, than each class has it's own copy of the variable.
I also got the blogging virus..[^]
|
|
|
|
|
SuperTank wrote:
I´m trying to make a 1d array of classes...
This is what I´ve done:
Enemy **enemy;
This is not the correct way to implement a one-dimensional array. Technically, an array is one-dimensional by default. See here for an example of a 3D array.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Sir,
I am using VC++.
Suppose I have a html page on the Net server. The page has a table, in that table this value is stored like 100.200.300.400. So now I want to read it from the Net server & store it in the VC++ base application.
So please would you provide me some useful info.
Thanks in advance.
Regards,
Ramesh.
|
|
|
|
|
|
As Alok has pointed out, you can use Ander's AmHttpUtilities class. If you need to do more involved parsing of the HTML content, see this[^] article.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|