|
Is there some way to retrieve this info from the system itself then ?
Doug
|
|
|
|
|
What information are you wanting to retrieve?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
The path to the remote disk drive selected by the user. How can I do this ?
Doug
|
|
|
|
|
Try:
CONNECTDLGSTRUCT cds = {0};
NETRESOURCE nr = {0};
nr.dwType = RESOURCETYPE_DISK;
cds.cbStructure = sizeof(cds);
cds.hwndOwner = GetSafeHwnd();
cds.lpConnRes = &nr;
WNetConnectionDialog1(&cds);
TRACE(_T("dwDevNum = %lu\n"), cds.dwDevNum);
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
|
I want to show CToolTipCtrl object when user enters invalid character. Actually i want to use that class when i want. But i cant find a solution. Is there anyway to override that functionality.
I use several methods, but cant do what i want.
I use ShowWindow like funtctions, but they just show and disappear. They dont even there for a few miliseconds
Being mortal is what makes impossible possible.
|
|
|
|
|
i)declare CToolTipCtrl in ur class
like CToolTipCtrl m_ToolTipCtrl ;
ii) add the following code in constructor
TOOLINFO ti;
DWORD dwStyle = TTS_BALLOON;
m_ToolTipCtrl .Create(this, dwStyle);
m_ToolTipCtrl .FillInToolInfo(ti, this, 0);
ti.uFlags |= (TTF_TRACK |TTF_ABSOLUTE );
ti.lpszText = (LPTSTR)_T("Enter Valid Phone number");
m_ToolTipCtrl .SendMessage (TTM_ADDTOOL, 0,reinterpret_cast<lparam> (&ti));
iii) add the following code, where u want to show the tooltip
LPTSTR lpszMessage = _T("Enter Tooltip text here");
m_ToolTipCtrl.Activate(TRUE) ;
CToolInfo ti;
m_ToolTipCtrl.GetToolInfo(ti, this, 0);
ti.lpszText = lpszMessage;
m_ToolTipCtrl .SetToolInfo(&ti);
m_ToolTipCtrl .SendMessage (TTM_TRACKPOSITION, 0, MAKELPARAM(rect.right - 20, rect.CenterPoint().y));
m_ToolTipCtrl .SendMessage (TTM_TRACKACTIVATE, TRUE,reinterpret_cast<lparam>(&ti));
this code i got from some post
for more info follow this link
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/tooltip/usingtooltips.asp
naren
VC++ programmer
|
|
|
|
|
narendra_ b; thank you very much for your help. I've been working on it for hours but couldn't find the solution.
Your code works very good.
|
|
|
|
|
hi
Suppose I want an application which takes a source file and outputs its data members and functions.
Supposed to develop into a kind of class view explorer.
Regarding parsing the source file ....
should i go for using regular expressions rules for this parsing or
should i go for a language representation in context free grammer[CFG] and use the CFG rules for parsing
or is there any other possible ideas for source file parsing
awaiting advice
fordge
|
|
|
|
|
For something with fixed syntax rules such as a programming language, I would go for a CFG, since parsing it with pure regex can be relatively complicated.
Search Code Project for context free grammar to get more information.
Hope this helps.
~RaGE();
|
|
|
|
|
I think that you should use a CF Grammer for parsing the file. The advantage of the CFG is, that when you have your grammer and rules, you can easely deduce code from it by yourself or a tool.
An other advantage of a CFG over RegEx is that with a CFG, you almost always have a good overview of what you are doing and where you are doing it, RegEx tend to get complicated really fast.
A recursive parser (from a CFG) is also easier to debug, than a state based RegEx parser, since you always have stack traces and you exacty know where you are and how you came there.
IMHO I think that regular expressions are great for validating strings (like postal codes, phone numbers, etc..), but for the real parsing you shouls stick with grammers and parsers.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Probably CFG.
If you want to try regular expressions, then go download and install Regex++. It has some example programs like taking C++ file and (thru callbacks) outputs an html file.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
Hey Guys,
My name is Danny Nowlan and I'm currently working on an app using Visual C++ 6, that loads an SDI application using a DLL.
I'm having an intermittant problem in release mode with some WinXP machines where the DLL won't load at all in release mode. It doesn't even get to InitInstance() In the dll. In debug mode it is perfect. The bugger is it only happens on a handful of WinXP machines
Is there a way of looking at the source code that loads the dll into my application. That way I can put in some statements etc so when I compile in release I can see what is going on.
Thanks guys
Danny
|
|
|
|
|
|
~RaGE();,
The first article really helped. It discussed compiler optimisations, and the moment I turned it off it worked like a charm.
Thank you so much.
Danny
|
|
|
|
|
Hi,
I want to copy the entire content of a hard disk to another one. The second hard disk should be an exact image of the original one, after the copying process.
How to do this using VC++ or C++ or C?
Please suggest me the way of approach that I have to adopt.
Hoping to get a reply soon.
TIA.
regards,
Jahfer V P.
|
|
|
|
|
Unless you are looking for something difficult to do, I would spend $20 on a copy of Ghost. It's well worth it.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Yes, or setup RAID if that's what you want to accomplish with this.
8bc7c0ec02c0e404c0cc0680f7018827ebee
|
|
|
|
|
If you make any mistake all the data could be lost!!!
Don't try it, just do it!
|
|
|
|
|
Is this only for one pc or many? Is this for a client? Are the disks the same size? I ask these questions because linux has a very easy utility to do this. The command is dd. I recently found this when partition magic failed to copy a failing hard drive because it han not been unmounted cleanly. Of course it was unmounted cleanly XP locked up when the disk stoped spinning. Good thing after a reboot it started spinning again... I booted off a gentoo linux live cd and at the prompt I typed dd if=/dev/hda of=/dev/hdb bs=8M and in about 1 hour I had a copy of a 40 MB drive on an 80 MB drive. It did not resize the partitions though but after removing the smaller bad disk windows XP booted and ran fine.
John
|
|
|
|
|
John M. Drescher wrote:
and in about 1 hour I had a copy of a 40 MB drive on an 80 MB drive
I sure hope that those MB's were worth the waiting.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
I do this all the time. I guess it shows my age... I actually had both drive sizes on my main computer sometime in the mid to late 80s. I remember that the 80MB drive cost almost $800 and that was for a drive that had hard errors on it. Since dos 3 did not support partitions above 32 MB I remember I had to split it into multiple partitions...
John
|
|
|
|
|
What a shame that I didn't had the chance to experiance those good old days...
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
I used Oscilloscope control in win32 and i always get an error while graph was plotting data
"Unhandled exception in sm85032.exe (UOPORT.DLL): 0xC0000005: Access Violation."
as i debug into the code the source of the problem was an error in freeing a "POINT" type
pointer variable in the oscilloscope header.
Would there be any problem if i use WTL code in win32?
or is there anything i should set before accessing WTL code.
Any hints on this one.
Thanks!
|
|
|
|
|
Please show the code for freeing the pointer.
Some functions throw exceptions when freeing memory which was never allocated.
And there are no problems when using WTL in Win32 as far as I know.
this is this.
|
|
|
|