|
well, that kinda helps, but im really looking for a type of thing that will allow me to pump tokens using a regular expression... e.g.:
"int main();"
i want tokens: "int", <space>, "main", (, ), and ;
and using regular expressions to parse each token. the point is, i dont want to have to handle each case, i just need it to parse the string until at some point it doesn't match the regular expression anymore... then that's the beginning of a new token
- Roman -
|
|
|
|
|
I've done something like this to parse lines inbetween \r\n ...
Pcre regex("^[\r\n]*([^\r\n]+)[\r\n]+(.*)$", "s");
while (regex.search(data) == true) {
data = regex.get_match(1);
}
I am sorry if this doesn't help you.
-Jack
To an optimist the glass is half full.
To a pessimist the glass is half empty.
To a programmer the glass is twice as big as it needs to be.
|
|
|
|
|
Is mickeysoft going to ever going to update this thing? I am stuck working somewhere that I am forced to use it -- but it makes me nuts. My boss insists that we branch and merge -- a truly infuriating experience....
HELP!
Are there any decent 3rd party tools that will help with a merge -- merging on a project scale?
Are they ever going to make it into a true client/server application?
P.S. I first thought about posting this rant over in the rant section. But then I looked at what people rant about -- thought i'd get a more coherent answer here.
|
|
|
|
|
Actually, I've used several VC systems over the years and SourceSafe has been by far the best, easiest to use and most stable. Mind you've I've never done all the branching stuff. As for merging, I've done that on a per file basis when using multiple checkouts, and it was great. I was paranoid about it at first but learned to trust it.
It sounds like a better solution would be to sic an attack Chihuahua on your boss and gnaw some sense into him...
Chistopher Duncan
Author - The Career Programmer: Guerilla Tactics for an Imperfect World (Apress)
|
|
|
|
|
Can anyone tell me if there is a known reason for this behaviour, or am I doing something really strange.
I am populating the first level of a tree structure and setting the children to 1 to get the + button but not adding any child entries.
When I click on the + against the 3rd item the first TVN_ITEMEXPANDING is against the 3rd item.
Immediately the focus then goes to the 1st item, without me doing anything. The TVN_SELCHANGING refers to the 1st item as does the next TVN_ITEMEXPANDING.
This is very confusing and not desirable.
If instead I click on the item, rather than the + all appears to process as expected.
Any guidance would be very welcome
Sara
|
|
|
|
|
This does sound odd to me... Does the focus change happen even if you do not handle TVN_ITEMEXPANDING ?
--------
I'm not sick, but i'm not well
And i'm so hot, 'cause i'm in hell... Harvey Danger, Flagpole Sitta
|
|
|
|
|
I can remove all event handling from my code and it still behaves exactly the same. As soon as I click on the + against the 3rd item the 1st item is highlighted.
Sara
|
|
|
|
|
Could this be your problem:
You start your app. The tree ctrl has not the focus. You click on + (on 3:rd item). Tree ctrl gets focus.
Clicking outside an items label doesn't change the selection. The first item was the one selected all the time?
Try setting the style TVS_SHOWSELALWAYS to your tree ctrl. Is the first item selected before you do any mouse clicking?
|
|
|
|
|
Thanks for the suggestions.
This is being used as an alternative look-up method so whilst it is populated at the top level it does not automatically get the focus during program initialisation. Therefore although I had the TVS_SHOWSELALWAYS style it did not show anything initially.
I have found a work-around.
If I check the OldItem in the LPNMTREEVIEW structure returned from the WM_NOTIFY I can send a m_TreeWindow.Select(hItem, TVGN_CARET) message.
I have not found anything within MFC to give me the OldItem so am needing to interact directly with the LPNMTREEVIEW and TVITEM structures.
Sara
|
|
|
|
|
Does anyone know how to export visual studio settings (Keyboard mappings etc.)so that the same settings may be used on another system? Thanks In advance.
|
|
|
|
|
Look at:
HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0
I don't import/export it all, but only such keys, like: Keyboard, Format, etc.
|
|
|
|
|
Hi All,
I've got a workspace style app that's got a tree-view control bar used for getting around in the app. I need to know how to determine if this control bar is currently visible or not.
How do I do this?
Thanks,
Aaron
|
|
|
|
|
IsVisible() should work i think.
--------
I'm not sick, but i'm not well
And i'm so hot, 'cause i'm in hell... Harvey Danger, Flagpole Sitta
|
|
|
|
|
|
Hey Guys
I have a FormView class and have set up an OnSize function. When i try and use any function on one of teh objects on the form under thsi function the software throws up an error when you start it up. Does anyone know what i am doing wrong
Peter
|
|
|
|
|
Are you checking ::IsWindow(someobjecthandle) before calling the function? OnSize can get called before child windows are created.
|
|
|
|
|
No What exactly do i need to check here then whether the window i am trying to reziz has been created?
Peter
|
|
|
|
|
Usually I do something like this
if (::IsWindow(m_wndEditControl.m_hWnd))
{
bla.bla.bla.
}
OR
if (GetDlgItem(IDC_SOMECONTROL) && ::IsWindow(GetDlgItem(IDC_SOMECONTROL)->GetSafeHwnd()))
{
bla.bla.bla.
}
|
|
|
|
|
Dear Friends
In a List view following command is not working properly
This is to autosize the column widths
m_CList.SendMessage(LVM_SETCOLUMNWIDTH,x,LVSCW_AUTOSIZE_USEHEADER);
width of column 0 is not right. any way to fix this without updating
COMCTL32.dll.
Gau.
Gaurika Wijeratne. www.gaurika.com...
|
|
|
|
|
I don't think you need to modify COMCTL32.DLL . See this article.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Gaurika Wijeratne wrote:
width of column 0 is not right.
How is it not right?
--------
I'm not sick, but i'm not well
And i'm so hot, 'cause i'm in hell... Harvey Danger, Flagpole Sitta
|
|
|
|
|
See the following in msdn
PRB: LVM_SETCOLUMNWIDTH Special Values Set Incorrect Column Width
any way problem is now ok
Thanks.
Gaurika
|
|
|
|
|
GET filename HTTP1.0\t\.... is the command for downloading from a HTTP server, but how to download from an FTP?
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
RFC 959
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Hello.
I'm executing a console application from my program, and is there a way to get information about what was an output of this program?
I know that porgram wich I'm executing using fprintf(stdout,...) to make an output to console.
Or how can I redirect its ouput to the file?
To lunch the program I'm using CreateProcess As it's described in
A newbie's elementary guide to spawning processes on this site (URL : http://www.codeproject.com/useritems/newbiespawn.asp)
Thanks.
Alexander
|
|
|
|