|
Why don't you edit the generated code and change LPCSTR to CString (both in function declaration and definition)?
To set the last parameter as optional, assign it in the declaration, for instance:
function declaration (header file)
int foo( int i, bool f, CString szMsg = _T("Hi"));
function definition (source file)
int foo( int i, bool f, CString szMsg )
{
}
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
|
|
|
|
|
if i do like this shall i call that function in my program directly as foo(x,y); is it ok or it will give error or what. reply me.
thanku,
savitri
|
|
|
|
|
provided x is int and y is bool , it is OK.
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
|
|
|
|
|
Hi all,
If i have a file on my disk say a .exe file and i want to make the shortcut of that file. How can i do it???
Thanks in advance
|
|
|
|
|
|
IshellLink!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
i have a button in my application which calls another dialogbox which has a custom message. but my problem is when i click the button the dialog is not popuping up. only when i insert a custom control this is happening. if i add a button or an edit box the window is poping up. how do i solve this out?
|
|
|
|
|
Did you register the Window Class ?
Check this article[^] and verify if you did all the required steps.
|
|
|
|
|
did all that is there in the article..
i created another dialogbox. added a custom control and gave the class name for it. gave a member variable for the control... compiled... there was no error. debugged and checked and figured out that DoModal is returning -1..
|
|
|
|
|
I would still be suspicious that the custom control is not properly registered.
There is a dislog style you can check with resource editor, no fail create, which could help. If you set that, and your dialog comes up without the custom control, then you are just plain not registering it before it's used. You'll have to start debugging through the custom control code to see when the window class for it is registered.
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
Iain Clarke wrote: here is a dislog style you can check with resource editor, no fail create, which could help.
i actually dint understand this... is this in the resource editor?? what is that i need to set as?
|
|
|
|
|
Yes, this is in the resource editor. Select the dialog, and edit its styles.
On one of the tabs are tick boxes for visible, group, tab stop, etc. On one of the other tabs is an option for No Fail Create.
In VC6, it's the third tab, called "More Styles", and the tick box is called: "No Fail Create".
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
i have ticked the tick box and the dialog box appears on the screen.. but the custom control is still invisible... guess its not registered. did what u told me how to register it. but in vain.. what needs to be done now?
|
|
|
|
|
its resolved... thanks.. i have registered the contrl and the graph is getting displayed in the screen... thanks a lot for the help
|
|
|
|
|
Glad to hear all is good for you.
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
hi all
can any one help me for timer using in c++ consloe application
using
id = SetTimer(NULL, 0, 1000, (TIMERPROC) TimerProc);
calling Timerproc callback function without using wm_timer event
Jalsa
|
|
|
|
|
jalsa G wrote: can any one help me for timer using in c++ consloe application
you need a message loop to dispatch the messages, as WM_TIMER message is anyway queued in the message loop and your console application doesnot have the message loop to extract the message. TimerProc is called back by the default window procedure if you are not handling the WM_TIMER message.
you can add a message loop even in console application to get your TimerProc to be called back.
Creating a Message Loop[^]
|
|
|
|
|
Why would you want to do such a thing ? Another option is inside your callback function, call another function that doesn't take any parameter. Then you can simply call this third function whenever you want.
|
|
|
|
|
Do you really need it? Why?
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
|
|
|
|
|
CPallini wrote: Do you really need it? Why?
to check whether printf uses memory due to bufferring, when it is called within a callback every second. since in his application, memory usage increases, he want to proove his boss this is only because of console IO buffering not because of his programming fault with a console application dedicated with the keyword (callback, one second, printf). see this [^]
|
|
|
|
|
Wow, wasting my time...
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
|
|
|
|
|
CPallini wrote: wasting my time...
|
|
|
|
|
Hey guys,
thanx for your reply. i was not here for some time.
using another function with timer i am able to handle the data. its not because of using printf,cstring or any other resources.
its because of speed of the data which i need to handle in another function. due to that i am using timer.
but it is completed anyway thanx
Jalsa
|
|
|
|
|
Hi all, a simple question but a niggling one nonetheless.
I've written a console application which does what it should, the only issue I have is that it exits after completing processing rather than staying visible to the user to see the processing results.
I'm looking to do a "Press any key to exit" kind of thing. I'm trying to keep it as simple as possible, without putting the whole application into a never ending loop or having to use cin >> to read some key press into any sort of dummy variable before exiting. Is there any clear and simple way to go about this? Thanks, Bryce.
|
|
|
|
|
put a getch() in the end?
|
|
|
|