|
Hey, I solved the problem with HitTest(). I 've forgotten to convert the point with the ScreenToClient() function. But I have not solved the problem with OnNMRclickTree1 yet...
|
|
|
|
|
Remember, this handler is call whenever the user right-clicks on the tree control. The area clicked on may not be associated with an item, so you need to handle that case.
Software Zen: delete this;
|
|
|
|
|
I am writing a MFC application in VC++. The application needs to be able to open the CD-ROM drive. I am currently using the mciSendString function but i can not get the project configured properly.
i have included windows.h
I played around with linking the winmm.lib library into the project but with no success.
my code:
#include <windows.h>
.
.
.
mciSendString("open cdaudio wait", NULL, 0, NULL);
mciSendString("set cdaudio door open", NULL, 0, NULL);
Can anyone give me an explanation of what i need to include to get mciSendString to work or another way to open the CD-ROM? I've found MSDOS executables that can open the CD_ROM drive but i can not find code on how to do this.
|
|
|
|
|
jet915 wrote:
The application needs to be able to open the CD-ROM drive.
Try:
MCI_OPEN_PARMS mciOpenParms;
MCI_SET_PARMS mciSetParms;
DWORD dwResult;
mciOpenParms.lpstrDeviceType = (LPCSTR) MCI_DEVTYPE_CD_AUDIO;
dwResult = mciSendCommand(NULL, MCI_OPEN, MCI_WAIT | MCI_OPEN_TYPE | MCI_OPEN_TYPE_ID, (DWORD) ((LPMCI_OPEN_PARMS) &mciOpenParms));
if (0 == dwResult)
{
dwResult = mciSendCommand(mciOpenParms.wDeviceID, MCI_SET, MCI_SET_DOOR_OPEN, (DWORD) ((LPMCI_SET_PARMS) &mciSetParms));
...
}
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hello can anyone tell me how to access shared folders on Lan for copying something in them.
Be FaithFull To Your Work.
|
|
|
|
|
Use the \\server\share convention, also known as UNC.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Which class of VC6 is used for the above job , i mean getting the list of shared folders on LAN and then copying something(Daily schedule for every employee) in it.I want to do this job programmatically.
Please Help.
Be FaithFull To Your Work.
|
|
|
|
|
Usman Tasleem Akshaf wrote:
Which class of VC6 is used for the above job
Any function or method that can handle UNC will work.
Usman Tasleem Akshaf wrote:
i mean getting the list of shared folders on LAN...
Use the WNetOpenEnum() and WNetEnumResource() pair.
Usman Tasleem Akshaf wrote:
...and then copying something(Daily schedule for every employee) in it.
Use CopyFile() or SHFileOperation() .
Usman Tasleem Akshaf wrote:
Be FaithFull To Your Work.
BTW, there's only one 'l' in faithful, assuming it's not meant to be misspelled.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
do we need the ip adress or need to connect to the particualar computer and then access the shares folder or only use the above functions
ddd
|
|
|
|
|
Have you read the documentation and the examples for the functions I mentioned?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Well, this is probably one of the biggest newbie question around here, but I'm having problems with assigning my Label text to a variable (ex a string).
My problem explained with code looks like this:
Label *myLbl;
string myString = "Hello there";
myLbl = new Label;
myLbl->Text = myString; //error C2664 Cannot convert from string to System::String __gc *
This does obviously not work, and I have searched for quite some time now after just a simple sollution to this simple problem, no result finding something. So I hoped someone here could help me out with this one.
Best Regards,
Hmmkk
|
|
|
|
|
The Managed C++ forum might offer better help.
Just my guess, maybe you need to use the c_str() method?
myLbl->Text = new System::String(myString.c_str());
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Well yes, I was afraid that this belonged there but I was not totally sure.
Thanks though.
But well it didnt quite solve my problem, now I get the error;
Just-In-Time Debugging
System.NullReferenceException
To make the code a little more clear, if now it matter I don't know.
This is how I want it.
lblQ->Text = myQuestions[CurrentQuestion]->getQuestion()
myQuestion is a pointer class and getQuestion returns the variable theQuestion which is defined as a string.
and also I just tried two ways:
1:
lblQ->Text = new System::String(myQuestions[CurrentQuestion]->getQuestion();.c_str());
2:
myQuestions[CurrentQuestion]->setQuestion("hi");
string temp = myQuestions[CurrentQuestion]->getQuestion();
lblQ->Text = new System::String(temp.c_str());
Both gave the Just-In-Time debugger error.
Best Regards,
Hmmkk
|
|
|
|
|
Howdy-
I am looking for some clues.
I need to make a window that will track another application, and "dock" itself to the side of that other application.
I am looking for the and easy and efficient way to watch the position of another window and buddy my window up to it. All clues welcome!
Thanks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.santacruznetworks.com">Santa Cruz Networks</A>
|
|
|
|
|
I am writing a add-in for some other program (can't say which) -- and though this program offers a plug-in interface, they offer no UI support.
For the sake of a demo, we want to put a button on their window. I plan to do this by tracking their app (size, location, focus) and positioning myself next to them... like a little puppy dog chasing his master -- my button/window will track this other application.
My assumption is that I mush hook their application with something like SetWindowsHooEx() and get the important messages and post them back to my app which will reposition itself to match that app.
I guess the question is -- is there any other way to do this, than to create a DLL, inject it into their process space, and post messages back and forth?
Thanks
-p
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.santacruznetworks.com">Santa Cruz Networks</A>
|
|
|
|
|
Peter Weyzen wrote:
is there any other way to do this, than to create a DLL, inject it into their process space, and post messages back and forth?
Nope, Unless that APPLICATION expose Interface to do so!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
I don't use bit fields much at all. I have a simple struct as folows (on an INTEL format machine):
typedef struct{
short f1 : 13;
short f2 : 1;
short f3 : 1;
short f4 : 1;
} tststruct;
tststruct tst;
tst.f1 = 8000;
what ends up happening is f1 gets a value of 0xFF40 instead of what I thought I would get (0x1F40). The other members (f2,f3,f4) are all 0x00 as I would expect.
Any idea why?
|
|
|
|
|
Maybe the compiler fills up the remaining 3 bits with ones instead of zeros? Maybe you can do an & with 0x1FFF to filter out the first 3 bits.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Thanks.
Here's what I found: if I use unsigned shorts, everything works fine. Apparently, the value is sign- extended when using signed variables - so the 1F40 (when looking at it as a 13 bit number) is a negative number and the sign bit is extended out when placing the value in the struct (giving FF40). Hope that makes sense.
Thanks - I got there eventually but it really looked strange at first.
|
|
|
|
|
I have a project where a class is being registered. The class contains some code that finishes with AfxRegisterClass(). Why register a class?
Jerry
|
|
|
|
|
Don't confuse Windows' classes with C++ classes.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I don't suppose anyone has any experience writng an interface (without spawing command lines running CVSNT) to access a CVS server ?
Elaine
The tigress is here
|
|
|
|
|
|
|
Argh - sorry.
This[^] missive seems to support the absence of a native beast. (But seriously, it's quite easy to wrap a Tcl with C/C++ - I assume that's what WinCVS does).
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|