|
knapak wrote:
It would be more useful if you could explain why this can hardly work
Try this line with your code:
This,is,a comma seperated,line
|
|
|
|
|
Fine, if you are mostly writing programs that deal with strings of characters, I can see the problem. However, it seems that were are here talking about reading ONLY numeric data, in which case my approach won't fail and IS SIMPLER.
Nevertheless, if you think your solution is more "elegant" why don't you provide a more comprehensive response, something beyond "use this", with clear sample code.
Cheers
|
|
|
|
|
knapak wrote:
Nevertheless, if you think your solution is more "elegant" why don't you provide a more comprehensive response, something beyond "use this", with clear sample code.
Why not just look at (and re-use) something others have already done, at CodeProject or elsewhere?
XTokenString[^]
string tokenize[^]
|
|
|
|
|
for example:
DirA = "c:\windows\system"
DirB = "c:\private\doc"
A realtive to B = ..\..\private\doc
how to implement this?
thanks in advance.
|
|
|
|
|
it is just simple strings game.
remove starting part of the path which is identical for both paths,
then count number of remaining folders (RF#) in path A.
then relative path is "(../) x RF# / remaining part of path B".
i'm curious what would you need this for sounds like school homeword but it's holiday now
rrrado
|
|
|
|
|
Use PathCommonPrefix() .
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
|
thanks for all you guys .
|
|
|
|
|
Hi Friends,
Can u inform me how to use Date Time Picker control in dialog based SDK application(No MFC Support)?
Regards
Vinit
|
|
|
|
|
See here.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Hi,
I have few controls and TabCtrl on it.
And when user select each tab i do ShowWindow(SW_SHOW) for few controls, and ShowWindow(SW_HIDE) for other controls. Every control is behind TabCtrl.
And ShowWindow(SW_SHOW) doesnt show my all controls which i would like to show.
TabCtrl covers few controls even i do SetFocus and ShowWindow(SW_SHOW) for controls.
Actualy only CDataTimePicker controls isn't be shown, Buttons and ComboBox work good (i mean doesn't be covered by TabCtrl when i send them ShoWindow(SW_SHOW)).\
I wpould like to show my controls, which are on TabCtrl ;/
//I dont use pages for tab, everything is on my one dialog.
Thanks a lot for help, i reall dont know what to do
Best Greetings for all
Michael
//I do GetDlgItem(IDC_DTPICKER1)->ShowWindow(SW_SHOW);
df
|
|
|
|
|
That's the wrong way!!!!
You have to create a child dialog with the controls on it for every page of the tab control. There are examples on CodeProject about that!
Don't try it, just do it!
|
|
|
|
|
yeap I know this solution, but trust me i must do like i have written. I need this solution so i need to show my controls. I dont want to create child dialog for each page, even it is best way ;/.
All in all thanks for Your reply
df
|
|
|
|
|
Hi everybody. I've made a program in VC++ 6 and I want to convert this program into a DLL file so my program can be called by another one designed by my friend. I tried alot but I couldn't make it.
My program is one dialog. Just two classes the dialog and application class.
I want to call my dialog from the dll file and return a specific value from the dialog to dll, then I want to pass this value to the calling main program (which is my friends program!!).
Thanks in advance,
Muh Ulama
|
|
|
|
|
Declare the classes as __declspec(dllexport) for the DLL, and __declspec(dllimport) for the EXE.
Don't try it, just do it!
|
|
|
|
|
Hi Alexander. Thank u very much for your reply. I'm not expert in VC++; I don't know how to make use of your reply. I have never dealt with dlls before! I just want to view the dialog specified in the dialog class in dll file. I think that the dll should contain the dialog class only then another function should call Domodal method of the dialog object. I think this function must be in the dll file also. Then I'll link this dll to exe file that call the function in dll and this function will view the dialog, and then return a value to exe file according to what the user entered in the dialog.
Plz tell me how to make it and how to view the dialog from dll!!
Thank u very much
Muh Ulama
|
|
|
|
|
how can write multiple line text on a bitmap with TextOut()
Can do it by DrawText()?
|
|
|
|
|
Yes, you can.
Don't try it, just do it!
|
|
|
|
|
See here for an example.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Does anyone kknow why MS dropped the class wizard we used to have in VC++ 6.0 ?
I know that if you right-click a control on a dialog you can add a message handler but what if you want to add a function such as OnInitDialog() to a dialog. I can't find an easy way to do it, do MS expect us to manually add functions like this or am I missing a wizard ?
Any ideas ?
Users.
Can't live with 'em, can't kill em!
|
|
|
|
|
View -> Properties Window -> click the Overrides button
Painted on the side of a dog trainer's van: SIT HAPPENS
|
|
|
|
|
Hello All,
I need to add a function to a MFC-MDI Application to size automatically the subframe's size.
Exactly something like tile-horizontally/vertically, but with the difference that I want to choose every window position and height/width, (IMPORTANT) using a fraction of the available space.
To do this at the moment I set the frame size with 'MoveWindow', and I get the available client area with 'AfxGetMainWnd->GetWindowPlacement'; but this function doesn't cut from the available client area the statusbar/toolbars.
Is there a way to know the REAL available client area without manually search the space occuped from the statusbar or toolbar (that are not constant)?
To be more clear: my temporary solution is to Minimize all -1 windows, and call MDITile(MDITILE_VERTICAL), at this point this window's size is exacly the CRect (with GetWindowPlacement) that I'm searcing, so I can do by myself the others windows sizing. I don't like this solution because this cause too many windows moviments (and it is quite slow).
:-DThanks to everybody wants to help me!
|
|
|
|
|
(1) Is the a COM Library function to find the InProc Server of a given CLSID?
or do I have to query the registry?
(2) Can I increment the "DLL Reference count" having a HMODULE?
(I guess I could GetModuleFileName, and issue another LoadLibrary, but maybe there is a shorter way)
Pandoras Gift #44: Hope. The one that keeps you on suffering. aber.. "Wie gesagt, der Scheiss is' Therapie" boost your code || Fold With Us! || sighist | doxygen
|
|
|
|
|
(2) No, because the COM server DLL manages this reference count and if it does not export a function to change it you won't be able to set it. Incrementing can be done by creating class instances of that COM server.
Don't try it, just do it!
|
|
|
|
|
I search to add, in the left icon bar of the XP Filedialog, some shortcut (Favorite, or other directory)
Can you help me?
|
|
|
|