|
Remeber that SDI applications reuse their view when you open a new document.
|
|
|
|
|
b_e_n_82 wrote: 3) I then call the Create function of "m_Com1" from the "OnInitialUpdate" function of the view...
Create the control in the view's OnCreate() method instead.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hey every one!
i was wondering is there any way that i can be able to change the text on a message box? what i mean is, in the funtion MessageBox(NULL,"text1","text2",MB_OK); is there any way that i can change the "text1" depending on what happends in the code?
thanx, jt
|
|
|
|
|
just pass a pointer to text instead.
<br />
char *foo = "Hello";<br />
char *bar = "World";<br />
char *txt = foo;<br />
MessageBox(NULL,txt,bar,MB_OK);<br />
txt = bar;<br />
MessageBox(NULL,txt,bar,MB_OK);<br />
You can then send in any string you like just by setting up a pointer.
|
|
|
|
|
hhhmm.. ya i tryed that it works great! thanx alot now i ave a good basis i can go on.
ok quick question what about this piece of code
#include <windows.h><br />
#include <stdio.h><br />
char *foo;<br />
char *fo="yo";<br />
char *txt=foo;<br />
int main(){<br />
char input;<br />
gets(input);<br />
<br />
input=foo;<br />
<br />
MessageBox(NULL,foo,fo,MB_OK);<br />
<br />
<br />
}
this dosnt seem to work for me can u shed some light?
thanx, jt
|
|
|
|
|
the line "input=foo" overwrites the text you input with an undefined string.
I think what you meant was "foo=input"
|
|
|
|
|
benjymous wrote: I think what you meant was "foo=input"
foo = &input perhaps.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Can you more explain change text on a MessageBox do you need to change text on parameters?
|
|
|
|
|
yea kinda like that.
but i wanna be able to change parameter 2 in the message box. depending on if a certin thing happends or not. ya see?
|
|
|
|
|
Why waldermort answer doesnt work for you
|
|
|
|
|
jqt wrote: is there any way that i can change the "text1" depending on what happends in the code?
Yes, just use a variable instead of a string literal.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hhhmmm.. ok i will try that.
thanx all for your help! (and time)
|
|
|
|
|
Hello everyone!
First of all, no, I'm not going to make a sequel to my previous program, it's for a "well-hearted" project.
But how do you get the stored login info for MSN Messenger? Thanks!
Windows Calculator told me I will die at 28.
|
|
|
|
|
I heard somewhere that later versions of VC++ are able to support a variable number of arguments, but I can no longer find the article. I have a function declared as:
void SetLastError( LPCTSTR szFile, LPCTSTR szFunc, int szLine, LPCTSTR szError, ... )
and a macro as:
#define SETERROR(error) SetLastError(__FILE__,__FUNCTION__,__LINE__,error)
How is am I able to edit this to accept a variable number of arguments?
|
|
|
|
|
Why is it, you spend hours looking, decide to post, then 5 minutes later you find the answer?
#define SETERROR(error,...) SetLastError(__FILE__,__FUNCTION__,__LINE__,error,__VA_ARGS__)
Works like a charm.
Now, does anybody know how to add the "__VA_ARGS__" keyword to Visual Assist?
|
|
|
|
|
waldermort wrote: Now, does anybody know how to add the "__VA_ARGS__" keyword to Visual Assist?
Who came up with the term variadic anyhow?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi,
is there any tutorial out on the internet or maybe on codeproject (yes, i used the search dealing with the topic of waveOut incoming udp-packets (raw PCM audio data).
Thanks in advance
Regards,
kk3003
P.S.:
I am using Visual C++ 6 / MFC.
|
|
|
|
|
You'll need to buffer the incoming PCM samples somehow (try writing the samples immediately as
they arrive and you'll hear why ).
You'll need to correct for jitter (from packets arriving late, out of order, etc).
If the samples are from a live stream, you will also need to correct for clock drift.
There's lots of info out there about jitter buffers and clock drift.
Good luck!
Mark
|
|
|
|
|
Hi,
yes, I already tried that --> sounds funny. :=)
I just wondered whether I am the first person having this problem. So there could any code snippet out on the internet???
I am trying to implement a multiple buffer solution cos i think 2 buffers are not enought to play audio gaplessly.
Thanks for any help in advance...
regards,
kk3003
-- modified at 18:39 Wednesday 4th October, 2006
|
|
|
|
|
Code snippets can be hard to find VoIP is big business!
It can be done!
|
|
|
|
|
*ddddoooohhh* good hint. I'll give it a try.
Thanks.
|
|
|
|
|
hi,
can anybody help me. i'm having problems with datetimepicker. i need to save date that is enterend in the control to database, but i don't know how to do what, the only date i can save is todays date, whatever date i insert it dont save it. and it looks like something not everything is working ok because i cant use 'settime' function. if anyone knows how to make it save the date i entered it would really help me.
|
|
|
|
|
Which property in DateTimePicker are you saving?
|
|
|
|
|
i want to save short date
but it dont save that i enterend, it saves default date which is 1970-01-01 if i use 'getyear' o it save todays date ir i use 'gettoday', but i need to save entered date, and it even saves time in the database but i in both places selected short date
|
|
|
|
|
Unfortunately, without seeing the code, I can only guess you are doing something wrong
Mark
|
|
|
|