|
Hi all;
I am having some serious problems with CDialogBar. I cannot initialise the controls found on it. Its the tenth time that i am posting (posted as Krugger) this particular topic but i have not yet gone through it. Can somebody please help me. If you want a copy of the class implementation as well as a screenshot of the application i am developing to better understand, please mail me and i will send it to you.
Thank you for your help
|
|
|
|
|
Hi all;
I am having some serious problems with CDialogBar. I cannot initialise the controls found on it. Its the tenth time that i am asking for help for this particular topic but i have not yet gone through it. Can somebody please help me. If you want a copy of the class implementation as well as a screenshot of the application i am developing to better understand, please mail me and i will send it to you.
Thank you for your help
|
|
|
|
|
how can i show the contents of "cout" used in C++ in Visual C++ 6 ?
|
|
|
|
|
If you meant that you wants to show some texts with cout with VC++6, here's the simple example.
#include <iostream>
using namespace std;
void main()
{
int iAge = 29;
cout << "Hello.\n" << "My age = " << iAge << endl;
}
Maxwell Chen
|
|
|
|
|
Or you can try :
cout.flush()
~RaGE();
|
|
|
|
|
HELLO!
PLEASE HELP ME!
I'm new in C/C++ programming.
And i have a problem:
here is the code:
char ch=fgetc(filein);
char s[20]="";
Now what I want is to put in string s the value that is the ord(c).
Example:if c is 'a' then I want put in s value "97".
This part of my code is written in ANSI/C language.
How can I do this?
Thank you very much!
|
|
|
|
|
I assume that ord(c) should return you the ASCII value of char c (maybe I misunderstand you). Therefore,
char c = 'a';
is equivalent to
char c = 97;
Then to get a string like "97", I would recommend using sprintf, as explained in Mike's FAQ on this link.
sprintf ( s, "%d", c );
Hope this helps.
~RaGE();
|
|
|
|
|
I am quite a beginner myself, but I think u can use pointers to do this.
Something like:
char *ptrs=NULL;
char s[20]="a, c, d, f, l, m";
ptrs=&s[3];//pointer points le address of s[3]
printf(" %d\n", s[3]);//should print the address
*ptrs=63; //value of pointer is 63
printf(" %d\n", s[3]);//should print 63
I think this is not correct, but might give you ideas.
THX
|
|
|
|
|
dairiseky wrote:
...the return will be all the time -infinte.
What is an infinite return value?
Does the file C:\My Files\SensorFile.txt exist? Do you have read permission on the file?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I have a problem that a Dialog shouldn't be left via pressing a key. I have no default button on this dialog, but pressing ENTER results in leaving the dialog with a positive result (OnOK).
Is there a way to prevent the dialog to leave when pressing ENTER without ovverriding the OnOK method?
|
|
|
|
|
What does ur default implementatino of OnOk() event do ?
If its not doing anything you can very well override it and dont call the baseclass OnOK.
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
Implementation of OnOK() is displaying an error message if the validation of the dialog fails.
So this is not the solution I'm looking for, because I want to prevent the execution of OnOK() and doing the validations.
|
|
|
|
|
if you disable the OnOk call then when will it be ever called and validation will be performed ?
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
OnOK() is called explicitely in the method which is called by pressing the "Leave" Button.
|
|
|
|
|
aah! got you..
Instead of calling OnOk when leave is pressed, instead let the Leave button call another Event that will do the validation, then implement OnOk normally to disable the enter key.
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
I agree it's a solution, but I think this is a bad one. Thanks.
|
|
|
|
|
Nope its not a bad one, its very much a accepted logic.
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
Then go for capturing key press
greatest thing is to do wot others think you cant suhredayan@omniquad.com>
messenger :suhredayan@hotmail.com
|
|
|
|
|
I have encountered the same problem before, but I did not really fix it. I just made some work around with it. What I did is I used a different command id for the button. I did not use IDOK. Resulting the command ID to be unhandled. Hope this help.
SDE
|
|
|
|
|
MarcoNedwig wrote:
...without ovverriding the OnOK method?
What do you have against this? It's the natural thing to do. Read here for a good explanation.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hi,
My application uses ReadFile() API in asynchronous mode.
While in the Debug mode it reads 29 bytes from the port ,
it reads only 7 bytes in Release mode.
Is there any known issues with the use of ReadFile(),
or is there a work around for this issue.
An early reply would be very helpful.
Thanks!
Pratheesh
|
|
|
|
|
difference of working in debug/release mode is usally because some variables were not initialsed properly before it is used.
If any structure is passed to the api makesure that you zeromemory it.
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
This may have to do with timing issues. As the code executes more quickly in release mode, there may not be enough time for the port to receive as many bytes when the call returns.
onwards and upwards...
|
|
|
|
|
can anybody guide me to write c or c++ code to play an raw audio files
thank you
bye
sham
|
|
|
|
|
create a buffer with the characteristics of the raw sound (srate, bits etc) then copy the data in and start playing it.
Don't try it, just do it!
|
|
|
|