|
strtok is the one, but be careful if you have "blank" tokens e.g. "1,2,3,,5".
strtok will say there are 4 values here rather than 5 (4 numbers and one blank token).
Dave.
|
|
|
|
|
Yes strtok
Cheers
Carlos Antollini.
Pi Five[^]Creator
Sonork ID 100.10529 cantollini
|
|
|
|
|
Be aware that strtok is destructive to the original string
|
|
|
|
|
Hi everybody,
How to OpenPrinter(...) for network-printer or print-server, which connected directly to lan????
Thanks,
iLYA
http://www.printsniffer.com
|
|
|
|
|
hi everyone,
how do you delete a node from a treeview control? i had a sdi, based on treeivew, and i bind double click to the node deletion command.. i tried double click on my program, but nothing happens. if i reload my program, the previously double clicked node is gone.. does treeview refreshes by itself after i ran DeleteItem() function? i've also tried running UpdateAllViews(NULL), but it causes my program to crash for some reason..
this is how i coded my OnDoubleclick()
void CmyView::OnDoubleclick(NMHDR *pNMHDR, LRESULT *pResult)
{
NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*) pNMHDR;
GetTreeCtrl().DeleteItem(pNMTreeView->itemNew.hItem);
UpdateAllViews(NULL); // this line causes my program to crash
*pResult = 0;
}
|
|
|
|
|
UpdateAllViews doesn't have anything to do with your tree control not updating, so you can remove that line.
It's possible the tree control doesn't expect you to delete the node you double-clicked on in the handler for the double click notification. You could try posting a user-defined message to your view in the double click handler, and then delete the item in the handler for the user-defined message.
Software Zen: delete this;
|
|
|
|
|
hi, how do u add an item to start menu?
norm
|
|
|
|
|
The start menu is just a directory. Just put files in it example in win2000 is : /Documents and Settings/UserName/Start Menu/
|
|
|
|
|
thanks, got that one working
norm
|
|
|
|
|
Why don't you just ask "u" instead of posting a question here? I mean, how would we know what "u" does and how he/she/it does it?
|
|
|
|
|
what's yr problem mike
norm
|
|
|
|
|
what's yr problem mike
Huh? What's "yr"?
I tell you what my problem is: It's kids that abuse the english language in writing in areas it's not suitable.
If you write "u" or "yr" or whatever your favorite shorthand is in an SMS or any other place where you target a very limited audience I don't care.
But when this crap is sneaking its way into serious discussions I feel I have to react before it's too late. If you want to communicate with people from all over the world in writing and in the english language, please use the english language.
Now learn to spell or piss off.
|
|
|
|
|
chill
norm
|
|
|
|
|
spell
|
|
|
|
|
hi, i have set up a CListCtrl which enable in place editing by drawing an edit box around the cell that's selected.
http://www.codeproject.com/listctrl/editing_subitems_in_listcontrol.asp
the trouble is, the user must hit ENTER (that triggers OnOK) before leaving the cell. I improved the situation a little by capturing CMyDlg::OnKillfocusEdit1(). Just as OnOK, the handler transfer what's entered into the editbox to the CListCtrl.
however, that's insufficient. i wish that the user can use the arrow key to move around.
norm
|
|
|
|
|
I am trying to place one of those cool hyperlink controls into my application, and I can't get it to work. I have VC++ .Net, and all of those instructions for adding the class to the static control don't work. In the resource editor, I right-click on the static control and the "add variable" option is grayed, yet on all the hyperlink control examples, the option is availible. Is there a way to add the hyperlink control without using the Class Wizard? Or is there anyone out there who knows how to use the new VC++ .Net Class Wizard?
-- Steve
|
|
|
|
|
What would cause a window to lose focus when a common dialog appears but the parent window stays on top so the dialog is behind where it can't be selected?
Thanks
Jeff Patterson
Programmers speak in Code.
http://www.anti-dmca.org[^]
|
|
|
|
|
I figured it out thanks
BTW
Hope every one has a happy turkey day. Even if oyu aren't celebrating it "officially".
Jeff Patterson
Programmers speak in Code.
http://www.anti-dmca.org[^]
|
|
|
|
|
Me again. I've finally got my link errors to go away. And now all that's really left is to package the program up for distribution.
I've used Depends and determined that my app needs ole32.dll, oleaut32.dll, olepro32.dll, comctl32.dll, etc. If my memory serves me correctly, these are pretty standard on recent systems.
If I'm not concerned about supporting old systems (95, etc.), is it safe to just distribute my executables (with MFC statically linked)? Or should I package up these Dlls from my XP box just in case?
J
May the bear never have cause to eat you.
|
|
|
|
|
You should use the runtime redistributable merge module for windows installer (the precise name and location of the package escapes me), to be found at microsoft.com.
This is the correct approach. Better because it actually works, and because it is actually legal.
Bernd
|
|
|
|
|
berndg wrote:
This is the correct approach. Better because it actually works, and because it is actually legal.
?? My understanding is that as long as the files I'm distributing are in the redistribution list published by MS, then it is "legal".
Also, it took about 20 minutes to learn and build my install using NSIS. After spending 20 minutes on the MS site, I couldn't even find a reasonable reference. :P
J
May the bear never have cause to eat you.
|
|
|
|
|
If I have a button on dialog box and I want to write program to open picture window when I click it. Do you know which function to open that window?
|
|
|
|
|
What do you want to do?
to open a picture file?
or make your own window class showing images?
or what?
Dmitry Timin
|
|
|
|
|
Hello there,
Does DirectShow in DirectX 5.0 can open MP3 or MPEG files ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Back in 1997, DirectShow wasn't part of DirectX. Short answer is no, then.
A built-in MP3 encoder has been introduced since release 7.0.
Of course, it's very likely you can take that MP3 decoder and make it run on top of the DirectShow 5.0 run-time as, as far as I know, the internal filter architecture hasn't been updated.
|
|
|
|