|
|
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Mike the Red wrote: split[i] = new char[pt - start + 1];
strset(split[i], 0);
The second statement is effectively canceling out the first.
"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
|
|
|
|
|
Just for your information: you might be interested in the strtok[^] function. It could ease your life a lot in this case
|
|
|
|
|
I can't tell you how many times I've tried to find this function - I KNEW there had to be one...
I always looked at the list of "String Manipulation Routines", saw strtok and its description, and said to myself "What the hell is a token?"
Thankfully, I followed your link and looked at the example. You're right - this could ease my life in a LOT of cases!
Thank you, sir!
MZR
|
|
|
|
|
Hi,
In my application I need to extend the size of a NTFS volume. I use IOCTL_DISK_GROW_PARTITION to grow partition boundary this executes successfully. But after this FSCTL_EXTEND_VOLUME fails with error #87 (incorrect parameter).
Please anyone give me some idea that why this control code is failing.
Thanks
|
|
|
|
|
Hello,
I want to have a custom return value of a dialog box application.
We can change the return value by overriding ExitInstance().
Is it possible to have a string as return value? If yes how to achieve this?
Thank you..
|
|
|
|
|
The DoModal function returns an integer so you won't be able to change that (except if you create your own function to create the modla dialog). But anyway, this is in general not needed: you could simply add a function that returns you the string. The return of DoModal is used to return informatino about how the dialog has been closed to the user. It doesn't make a lot of sense to return some kind of data there.
|
|
|
|
|
Do you really want to return a string value to the OS ?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
maybe it's called from another process ?
This signature was proudly tested on animals.
|
|
|
|
|
Do you really want to return a string value to another process?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
nope; but maybe the OP wants to.
This signature was proudly tested on animals.
|
|
|
|
|
Well, he should know then there are a lot of IPC mechanisms.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Requirement is to return a String? So have to find a soultion for it ..
It is used by other process and that is already defined to take String as input..
|
|
|
|
|
You may, for instance, return a integer value and then call the other process with a string appropriate to such a integer return value, e.g. (pseudocode):
int r = call(myProcess);
switch( r )
{
case eOK:
call(theOtherNastyProcess, "OK");
break;
...
}
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Did you get your question fully answered by Cedric's response? I couldn't tell from your reply. If not, here's a little code snippet to demonstrate what (I believe) he was suggesting:
CMySpecialDialog MyDialog;
const int Status = MyDialog.DoModal();
if (Status == IDOK)
{
const CString MyString = MyDialog.GetMyString();
}
This will work if you define a GetMyString method in your CMySpecialDialog class. Just remember to keep the string value in a member variable of the CMySpecialDialog class so that it still exists after the return from DoModal.
HTH
|
|
|
|
|
Thank you.. I will try on these lines..
|
|
|
|
|
I have an application which minimises to tray on start-up. I achieved this by a call to <pre>OnSysCommand(SC_MINIMIZE, 0);</pre> by posting a message in <pre>OnInitDialog()</pre>. But the dialog appears for a fraction of a second. In order to avoid the flicker I used the below code from CP. But it does not work as expected.
I found that when the "m_bFirstShowWindow = false" is commented out the window is not showing up and works as expected. But in that case I could not restore the window from the Tray. What is wrong in my logic?
I am using VS2005
<pre>
void CTestDlg::OnWindowPosChanging ( WINDOWPOS* lpwndpos )
{
CDialog::OnWindowPosChanging(lpwndpos);
if ( lpwndpos->flags & SWP_SHOWWINDOW )
{
if ( m_bFirstShowWindow )
{
m_bFirstShowWindow = false;
lpwndpos->flags &= ~SWP_SHOWWINDOW;
}
}
}</pre>
|
|
|
|
|
uncheck the visible property in the dialog properties
|
|
|
|
|
it works !!
But can you just explain what is being done in the code . Just for the academic interests ... I am new to VC.
|
|
|
|
|
The value for the Visible gets changed in .rc file. Check the dialog properties in the .rc file.
|
|
|
|
|
Its giving undeclared identifier for m_bFirstShowWindow
What am I missing???
|
|
|
|
|
Hey Friends
In a MDI application with CFormView derived view, i have a small Resource Template, so i need to resize main application to fit the size of the Child Frame.
Any idea how to do that ? or i have to resize the CMainFrame by calculating toolbar height / width + status bar height / width etc?
Regards
|
|
|
|
|
I have created one MFC application which uses Windows media player SDK for playing audio files.How can we set default visualization even if there is no visualization set for the media player.Please help me.
|
|
|
|
|
Hi
Though I have been programming on other platforms for a while, I am a newcomer to Windows development.
I have been given a 3rd Party library, and I am unsure of how ti use it with Visual Studio.
I have a created a project and pointed it towards the provided headers and library, and if I include the main .h file, the project compiles. So far so good. But what do I do with the provided .rc file?
If I import it and do a:
enum { IDD = IDD_MY_DIALOG };
I get an error. I can fix this by copying and pasting the dialog from the 3rd party .rc into my projects rc file - is that the right thing to do? That doesn't seem right...
Also I am not sure how to use the classes in the library, as trying to use them gives me a error that the class is abstract.
Thanks.
|
|
|
|