|
|
CreateWaitableTimer() and SetWaitableTimer() can also be used
"Committee--a group of men who individually can do nothing but as a group decide that nothing can be done." - Fred Allen
|
|
|
|
|
Thanks you everybody; after reading your hints, I finally succeeded in building this part of the app!
;)
|
|
|
|
|
Hi all,
I am having trouble coding this and wanted to know how to check if a user enters a filename to open. Basically I want to check to make sure the file name is not all spaces and that it is not blank. I am not using CFileDialog right now, just have a editbox and a browse button that i got from a CP article.
Does anyone have code out there that does this? Can someone lead me in the right direction?
Thanks for all your help .
Jimmy
Just cause I am 15, doesn't mean I'm dumb! (I'll really be 4 on Feb. 29...the year 2004)
|
|
|
|
|
You can get at the string in the edit box with
CString FileName;
MyEditCOntrol.GetWindowText(&FileName);
You can then perform all of the validation on FileName.
To verify the edit box wasn't blank:
if(!FileName.Getlength())
//handle error here - zero length filename
To verify that no illegal filename characters were entered:
CString InvalidFilenameChars = ""; // put all invalid filename chars in this string
if(FileName.FindOneOf(InvalidFilenameChars) != -1)
//handle error here - filename contains invalid character
There may be a pre-built MFC way of handling all of this.........
|
|
|
|
|
:(hello
I need the source code in c++, for information extraction from html tables , and to generate with those data a XML document.
Please help me
Marco Javier Suarez Baron
|
|
|
|
|
One way is to use the MSHTML control and iterate the HTML Elements. Have a look at the articles here on using the HTML control and on MSDN.
Another option is HTMLTree http://homepage.mac.com/pauljlucas/software/html_tree/[^] however this is GPL, which may be a problem for you.
And finally Google search: HTML parser.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
Hi,
I am in need of a variable that can hold a type (variable-type ex: int or double) and not a value of the specific type, just the type. Something that works like this:
VARTYPE Type;
Type = int;
switch (Type) {
case short:
break;
case int:
break;
case float:
break;
case double:
break;
} I know I can simply declare a bunch of constant numbers, who each represents a variable type. But that would be very non-optimal if there already exists an easier way. Could I use templates to achieve this or the use of preprocessors/macros? Just to be clear, I am looking for a variable that only contains a type and not a value.
Any help or tips are most appreciated.
Aidman » over and out
We haven't inherited Earth from our parents, instead we have borrowed her from our children; an old Indian saying.
|
|
|
|
|
almost:
switch(sizeof(type))
{
case sizeof(short): //need pre-defined
break;
includeh10
|
|
|
|
|
|
|
|
|
|
Ian Darling wrote:
Of course, IIRC, typeid and type_info are platform dependant, so code isn't necessarily portable, right?
Not sure what you mean... Comparing type_info s generated on two different platforms probably won't work, if that's what you had in mind.
--Mike--
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
CP SearchBar v2.0.2 released
|
|
|
|
|
Michael Dunn wrote:
Not sure what you mean... Comparing type_infos generated on two different platforms probably won't work, if that's what you had in mind.
Nope. Just that you couldn't rely on certain things about the type_info implementation always being the same across platforms, for example, what typeinfo::name() returns.
My reading of "Design and Evolution of C++" suggests that there is scope for differing definitions of the type_info class on different C++ platforms.
--
Ian Darling
"The moral of the story is that with a contrived example, you can prove anything." - Joel Spolsky
|
|
|
|
|
|
Thanks! Althougth I am not quite sure if I might be able to use it as I hoped, it is still a better alternative then declaring your own Type-Ids.
Aidman » over and out
We haven't inherited Earth from our parents, instead we have borrowed her from our children; an old Indian saying.
|
|
|
|
|
|
I'm a newbie to MFC . Now in my project, I need to implement the spell-checking feature and I have figured out the ASpell is one of the best outthere but I don't know how to implement it in my project. Can someone do me a favour, give me a sample project that use ASpell with MFC.
Thanks a lot .
|
|
|
|
|
|
Hi,
VC6 used a separate set of toolbar settings while debugging. In VS.Net 2003, I just don't get it. Is there any way to get this feature? (If not, I'm going to rant)
"Vierteile den, der sie Hure schimpft mit einem türkischen Säbel."
sighist | Agile Programming | doxygen
|
|
|
|
|
Go to the View/Toolbars menu and select the Debug toolbar.
Ed
|
|
|
|
|
I want to control the application's access to internet,so as to deny the unauthorized one if not match a rule.
Any comment appreciated.
|
|
|
|
|
u want to check just ur application access or any application??
Muhammad Shoaib Khan
http://geocities.com/lansolution
|
|
|
|