|
thanks for your reply. i cannot continue with my code for the reason that i dont have enough knowledge on it. My code is successful if i will not use radio button in getting the reasult but when i used a radion button to connect to the command button i cannot successfully link to it coz i dont know the code on how to do it. I just need a sample code for my reference...can u send sample code to connect the radio button to a command button please...?
Neil
|
|
|
|
|
I believe we had given a solution for this.
do you want to pass the value that is assigned to the radio button to the command button?
if that is the case create an event for the radio button and inside the function assign a value(say .10 which is 10%) to a global variable. Then use this global variable in command button.
Hope this helps you.
|
|
|
|
|
i will try sir but if still i cannot please dont stop helping me...
thanks a lot.
neil
|
|
|
|
|
Hi all,
I am making an application using vc++, when the process complete I need to boot the machine and at booting time it ask for disk check for FAT32 volume. I dont want that user will see this check disk black screen. So I am trying to check the disk with my code before machine boot.
Is there any win32API or any utility that checks disk so that I can implement it in to my code?
I dont want to use Chkdsk Method of the Win32_LogicalDisk Class.
One more option that I have to execute command chkdsk command on command prompt. But I am looking for any better option.
Thanks
Regards
M Chauhan
|
|
|
|
|
Do u want to check the disk before system login, right?
Величие не Бога может быть недооценена.
|
|
|
|
|
Yes.
I want to do the same thing with my code (at running stage of machine) that OS do itself at booting time.
|
|
|
|
|
There's a reason the OS does this at boot time - when the OS is fully running, the disk is potentially changing all the time, invalidating the check. And what if there's a problem in a loaded file?
Why is the OS doing this all the time? Mine doesn't! And which OS...
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
assume table [User] has 2 fields: [ID] and [Name],
User ID in records are:
0,
1,
2,
5,
6,
12,
...
The minimum ID allowed for adding a new user is 3 now.
How to get the minimum ID by SQL?
|
|
|
|
|
May be you can move your post to General Database forum[^] where it is more likely to get answered.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
I want to drop an image from Internet Explorer onto my dialog and capture the URL of the image, when I implement OnDropFiles(WPARAM wParam, LPARAM lParam) ,but only can get a local file name from DragQueryFile without url from IE or other browser.who can help me how can I do this?
I also seach one article Drop images from IE[^]on codeproject seem do this ,but I also cannot do for the arguments I do not know how to get?
Thank you for any advice.
Regards,
|
|
|
|
|
Help
|
|
|
|
|
There is an application, i sadly can't recall the name, but maybe you can google it up, that will list you what data formats are "contained in a drag-drop operation", so to say (all you have to do is grab an image in your browser and drop it onto the window of this app). You probably won't be able to gain the URL from the FILEDROP format BUT using this app (it's free btw, could be that it is even somewhere here on CodeProject) you could check what other formats the browser gives to you when you drag a picture and one of these might just be what you need. If i can remember the name of this app i will tell you...
p.s.: Are you handling WM_FILEDROP? If so, i recommend you rather use the OLE way, check this[^] article.
And hey, that article uses the proggie i mentioned before, it is called "ClipSpy". What are the odds...
[EDIT]
So i checked it myself dragging from FireFox, the drop contains the URL in many formats, seems like it has CF_TEXT and CF_UNICODETEXT or a format called UniformResourceLocator or UniformResourceLocatorW and some other formats which all contain the URL (http://www.whatever.com/pics/picturename.jpg for example).
[EDIT]
I just checked it with IE too and it seems to contain only UniformResourceLocator for the URL so that's your best bet.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
modified on Wednesday, July 29, 2009 4:13 AM
|
|
|
|
|
Code-o-mat,Thanks for your reply.I really want to gain the image URL from browser
Handing WM_FILEDDROP can only get the local file name,so I want to how can I get the URL or other informations which can help me gain URL from this Message ?
OLE seem can do this,Let's try
Thanks again for your answer.
|
|
|
|
|
I'm not sure now if you are asking how to do it or just saying that you will do it that way, but i give some pointers. If you check out that article i have given you you can learn how to make your window a drop target the OLE way. To accept the URL data all you have to do is to look for a different clipboard format than CF_HDROP. Thanks to ClipSpy we now know that what you need is the "UniformResourceLocator" format, you can use RegisterClipboardFormat[^] to gain the identifier for this format and then you should use that ID instead of CF_HDROP. Also thanks to ClipSpy we know that this format seems to be nothing else but a string containing the URL, so if you look at the article again and check out what CMyDropTarget::OnDrop does you should not have too much trouble changing it to gain the string.
Does this all help?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Yes,Code-o-mat,Thanks,I thinks those enough can help me out of trouble and I will follow this tomorrow
Thanks again and sorry for my English.
BTW:Your reply is so fast
modified on Wednesday, July 29, 2009 11:01 PM
|
|
|
|
|
An outline for a solution of your problem:
An image seen in IE is actually a copy of that image stored on your HD, that's the reason you get a local filename. I quickly red the Article. My conclusion is that the writer somehow copies the HTML-page to the clipboard and then this html-page is inspected (because there's the url). You can mimic this behaviour by opening a html-page in IE, Rightclick (in a textarea), select "View source" from the contextmenu. Now it shows the Html-source in Notepad, select Paste to put it on the clipboard. (Inspect the writer's code to find out how he automated this.)
Now it's our turn: your program must inspect the clipboard to get the right URL... This is basicly a search in a textfile, although an Html-parser could help you).
Rozis
|
|
|
|
|
Yes,Rozis,Your solution is right.
I do as Code-o-mat told me this morning and using a CF_DIB format to get ahGlobal ,save it as bitmap and it's work now.
I also find I can do follow as ClipSpy did,Get the image URL(It's seem use a "application/x-moz-file-promise-url" format can let's me get right URL directly without search textfile) first and then add some code to download it ,It's should be work.
Anyway,thanks Rozis
Edit:
Sorry, "application/x-moz-file-promise-url" can only be get from firefox . it's seem like Rozis said ,If we want to gain the true image's URL across browser we should prase the html by ourself
modified on Thursday, July 30, 2009 11:08 PM
|
|
|
|
|
I have a file, which contains a set of ip addresses, i.e:
123.456.111.222
222.555.111.777
.....
The file will be installed with software together to users' PC.
The file will be updated by auto downloading, so it is independent from software, and IPs can not be written inside C++ code.
I hope users can't see these IPs, so I want to encoding it in a security format, maybe with password or not, and my software can read the file properly.
I think there must be some classes which can help me to do this.
Thanks for any links, comments or ideas - C++ classes are best.
|
|
|
|
|
|
Thanks,
I will have a ditail look.
|
|
|
|
|
I am curious if these operations return the same results:
<br />
_tzset();<br />
if (GetTimeZoneInformation(&tzInfo) == TIME_ZONE_ID_STANDARD)<br />
ctime = new CTime(startTime, 0);<br />
else<br />
ctime = new CTime(startTime, 1);<br />
<br />
time_t nTime = (time_t) ctime->GetTime();<br />
and
<br />
_tzset();<br />
CTime *ctime = new CTime(startTime, -1);<br />
time_t nTime = (time_t) ctime->GetTime();<br />
I cannot guarantee if the host machine will have Time Zone information and/or Daylight Savings time info set on their operating system.
Can anyone tell me one way or the other?
|
|
|
|
|
john john mackey wrote: I cannot guarantee if the host machine will have Time Zone information and/or Daylight Savings time info set on their operating system.
And if they aren't set, maybe there's a reason. Trying to override something that the user has configured is rarely a good idea.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
OK!! I tried to figure out all the error.... but plz can anyone confirm Is this correct ... and will it work...
strcut is in header file
typedef struct
{
unsigned int flag;
vector <unsigned char=""> data;
} Packet;
void funcA (Packet *);
int funcB (vector<unsigned char="">);
And now below code is in my *.cpp file
class Handler
{
Public:
void Handler::funcA (Packet *Packet)
{
vector <vector <unsigned="" char=""> > savedata;
if(flag = 1)
{
savedata.push_back(Packet->data)
funcB(savedata); // I am getting error cannot convert parameter 1 from td::vector<_ty> // // to std::vector<_ty>
}
}
int funcB (vector<unsigned char=""> Usedata)
{
}
Please can someone tell me how can I pass vector to an func... and is my vector to vector assignment correct I am not gettign error.... for tht one..
I am getting error cannot convert parameter 1 from std::vector<_ty> to std::vector<_ty>
Thanks!!!
|
|
|
|
|
Please read #5 and #6 from here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
My question may be more on style than on correctness of coding.
I have 2 functions in different projects that I'm consolidating into one class.
<br />
CMyClassA<br />
bool GetAbsTime(SYSTEMTIME *startTime, double hourTime, ClockTime *absTime);<br />
...<br />
CMyClassB<br />
bool GetAbsTime(SYSTEMTIME *realWorldTime, double hourTime, ClockTime *absTime);<br />
...<br />
the internals of these functions are different, but they have the same name and the arguments are the same type-wise.
My Question: what would be best way to preserve these function names (as they are now), but have a way of distinguishing each function?
<br />
CTimeUtilities
<br />
bool GetAbsTime(SYSTEMTIME *startTime, double hourTime, ClockTime *absTime);<br />
bool GetAbsTime(SYSTEMTIME *realWorldTime, double hourTime, ClockTime *absTime);
|
|
|
|