|
skydave wrote:
However, the progressbar control within this IDD_DIALOG1 has some
ID too, but I have no idea, of how to call this progressbar else.
By right clicking on it and choosing properties. It's probably called 'progress 1' or something.
skydave wrote:
About which type of collision are you talking?
I thought if you had a progress with the same ID as the dialog that might cause it to fail. You may have called the dialog IDD_PROGRESS1 because it was going to have a progress bar in it, or something.
Have you tried calling GetLastError ( or showing it in the debug window during a trace ) to get some idea what is going on ?
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
getlasterror returns the error code 1400 which means, that there had been an invalid windowhandle. I guessed, that the third parameter
of the DialogBox function is meant...I passed along the NULL pointer, since I thought there is no parent window needed.
But passing along a window like that one retreived from GetDesktopWindow() doesnt solve the problem...the lasterror is 1400 again.
Any idea what windowhandle could be meant?
There is no collision, since the DialogBox has some other ID then the
Progressbar.
|
|
|
|
|
|
ok that did the trick. Thank you very much.
|
|
|
|
|
A lot of people forget to do that when they use progess bars and sliders in non-MFC projects
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
i asked this question before but i did not any clear answers
Q: how do i use command arguments in VC++6.0?
A: Depending on which arguement that you are trying to use, you can set the command line parameter in the Project | settings menu option.
You can either select the different tabs in order to get a form to customize the command line, or you can directly edit the command line arguements in the edit box at the bottom of most of the tabs.
please write me if you think you can give me some instructions on how to set my vc++ to read command lines!
thank you
|
|
|
|
|
Do you want your application to read the command line ?
If so, the global variable __argc will tell you how many arguments there are. The items in the array __argv[] will point to strings containing each of the arguments. __argv[0] will contain the name of your application. You can iterate through __argv[] to obtain each argument.
In a console app you can do this :
<br />
<br />
for( int i=0; i < __argc; i++ )<br />
fprintf( stdout, "arg %d is '%s'\n", __argv[i] );<br />
<br />
|
|
|
|
|
From the answers he's got I assume no one actually understood his requirement. You and Atul think he wants to parse command line arguments. Hockey thinnks he wants to use VC++ from the comman line.
I think he actually wants to pass an argument to his program when running it from within VC. If so that can also be done. But the whole point is no one knows what he wants.
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
You could be right. He was a bit less than clear in his question.
|
|
|
|
|
Here I try this
from command line
msdev.com /?
Usage:
MSDEV [myprj.dsp|mywksp.dsw] - load project/workspace
[<filename>] - load source file
/? - display usage information
/EX <macroname> - execute a VBScript macro
/OUT <filename> - redirect command line output to a file
/USEENV - ignore tools.options.directories settings
/MAKE [<target>] [...] - build specified target(s)
[<project> - <platform> <configname>]
[[<project>|ALL] - [DEBUG|RELEASE|ALL]]
/CLEAN - delete intermediate files but don't build
/REBUILD - clean and build
/NORECURSE - don't build dependent projects
I think this is what yer after
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Is this what you are looking for ?
#include < iostream >
using std::cout;
using std::endl;
int main(int argc,char *argv[])
{
cout<<"argc = "<<argc<<endl;
for(int cnt=0;cnt < argc;++cnt)
cout<<"argv "<<cnt+1<<" = "<<argv[cnt]<<endl;
return 0;
}
Click Project->Settings..In Settings click Debug.Make sure your project is selected on the left. Go to Program Arguments and type in say "1 2 3" w/o the quotes. See the output.
From MSDN...
argc
An integer specifying how many arguments are passed to the program from the command line. Because the program name is considered an argument, argc is at least 1.
argv
An array of null-terminated strings.The first string (argv[0]) is the program name, and each following string is an argument passed to the program from the command line. The last pointer (argv[argc]) is NULL.
Atul
Sonork ID : 100.13714 netdiva
|
|
|
|
|
i just want someone to tell me what steps to follow to set the vc++ to read command lines.
here are the kind of instructions i want
i mean something like go to menu bar select " this option" then do this then do that
so that compiler know how to read the command lines without having to go to DOS mode.
i hope i made it clear this time.
|
|
|
|
|
That's what I have given
A small piece of code and settings in VC++ IDE to pass cmd line arguments...
Atul
|
|
|
|
|
I took this code directly from Tom Armstrongs book, Designing and Using ActiveX Controls.
I am trying to implement the 1st example. A COM/MFC Edit control. The code is meant to set the background and forground colors of the activex controls to that of its contanier.
The problem is it makes both color sets black. Any suggestions on how the code should be writen?
LRESULT CEEditCtrl::OnOcmCtlColor(WPARAM wParam, LPARAM lParam)
{
if(m_pBackBrush == NULL)
m_pBackBrush = new CBrush(TranslateColor(GetBackColor()));
CDC* pdc = CDC::FromHandle((HDC)wParam);
pdc->SetBkMode(TRANSPARENT);
pdc->SetBkColor(TranslateColor(GetBackColor()));
pdc->SetTextColor(TranslateColor(GetForeColor()));
HBRUSH far* hbr = (HBRUSH far*)m_pBackBrush->GetSafeHandle();
return (DWORD) hbr;
return NULL;
}
thank you
|
|
|
|
|
How can i compare 2 wav files?Can anyone show me or email me some code? (costexx@hotmail.com)I want to know if it's the same sound.
|
|
|
|
|
Do you want to know if they *sound* the same, or *are* a copy of the same file ?
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
Two entirely different things eh?
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
Nish [BusterBoy] wrote:
Two entirely different things eh?
Nish you should move to Canada, your half way there already
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
HockeyDude wrote:
Nish [BusterBoy] wrote:
Two entirely different things eh?
Nish you should move to Canada, your half way there already
To be frank, though I understand that there is humor hidden there somewhere, I cannot find it
Will someone throw a light here please?
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
Canadians are fond of saying "eh ?"
Check out the movie "Strange Brew" for amusing examples of stereotypical Canadian speech.
|
|
|
|
|
Rick York wrote:
Canadians are fond of saying "eh ?"
Oh! I dont say "eh" too often, but I do write "eh" sometimes. When I talk I replace "eh" with "huh". I think I have three or even four variations of "huh" according to the need of the situation.
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
That makes you closer to an american than a Canadian.
There are no small projects - only young ones.
|
|
|
|
|
Like CG, i dunno if you want binary comparison or I guess mathematical if you were checking for sound similarity.
Anywho, if you want binary...why not just use windiff...?
However you probably want sound cuz why would you be specific about wav files and not just generic and say files.
Sounds like the latter would be tricky.
Good luck!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
I've created a modal dialogbox using DialogBox(). The dialog has 2 editboxes and I want the text they contain to somehow be returned to the parent, so I can use them. I thought of using the returnvalue of DialogBox(), which is what I specify when I call EndDialog() from within the dialogbox procedure, and let it point so some structure with 2 strings. But is this the correct approach? I also do not want to use global variables.
Any good ideas?
Sprudling
PS! I'm not using MFC; just plain Win32 API stuff...
|
|
|
|
|
1. Make a struct that holds the data (pointers, std::strings, whatever you're using)
2. Use DialogBoxParam() and pass a pointer to that struct as the dwInitParam parameter.
3. In your dialog's window proc, the lParam sent with WM_INITDIALOG is that pointer. Save it with SetWindowLong(hwndDlg, DWL_USER, lParam);
4. Whenever you need to access that pointer again, use GetWindowLong().
--Mike--
#include "witty-sig.h"
My really out-of-date homepage
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|