|
The other application creates a window, creates a process for that window and then passes a commandline argument to the window that fires up my application.
I don't have the code as it is not my application.
What is happening is my application is then opened up, however it is a dialog and is in modal form - using dlg->doModal().
I would like for it to be modeless and hence use dlg->create() but how do I deal with msgs etc if I want to do this?
Cheers
Dan
|
|
|
|
|
I am getting problem in recording audio in WMV file using WMEncoder using IWMEncoder2 interface. I am getting access voilation for LAME.ACM.
I am not getting what's going wrong. Ifyou have any suppotring links please reply back.
cheers
"A winner is not one who never fails...but the one who never quits"
|
|
|
|
|
Without seeing any code it's tough to guess.
How are you using an ACM codec with Windows Media Encoder?
|
|
|
|
|
Hello,
I have declared a union named 'db_rawCB' and there are in all 20 strucutres in this union.
But i am getting some compilation error which says "error C2621: member 'db_rawCB::close_info' of union 'db_rawCB' has copy constructor"
Now here 'closeinfo' is a structure which includes a class in it.. i guess this is the reason why i am getting above error.
Can anyone of you please suggest me the solution of this problem.
|
|
|
|
|
|
not use a union, union are evil in C++.
or replace the class by a structure and allocate it with malloc instead of new, and removing all member functions from the class and make them free functions ?
|
|
|
|
|
You can't have union members that have copy-constructors. Your best bet is to make the union member a pointer to a class.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
It doesn't make logical sense for a union to contain a class with any constructors or destructors: how would the compiler know which constructor/destructor to call?
-- modified at 19:41 Wednesday 13th December, 2006
Or classes with virtual functions: how would the compiler know how to initialise the v-table pointer.
Steve
|
|
|
|
|
|
Can you explain in detail ?
|
|
|
|
|
Ok,
So you open VS 6 C++.
You choose a new project and you choose a Win32 Application.
It brings up a small dialog asking things like "empty project" | "Hallo World".
So I chose the "Hallo World" one.
The complier builds a couple of resources cpp files, header files and so on.
The thing is how can I change that main window that the compiler created. It looks like everything was created using code by the compiler. Cause the createWnd function was used and so on.
Makes sense?
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
You need to look in to WM_PAINT , in WndProc function, that is where painting operation occurs.
Or I've misinterpreted again !
|
|
|
|
|
How would one add buttons & listboxes & textboxes ?? ??
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
You need to handle this in WM_CREATE message.
Add this code to your WndProc in switch statement.
case WM_CREATE:
{
HWND HwND = CreateWindow("BUTTON","My Button", WS_CHILD |
WS_VISIBLE | BS_PUSHBUTTON , 20,20, 50,50,hWnd,(HMENU) ID_BUTTON1,hInst,NULL);
ShowWindow(HwND,SW_SHOW);
}
|
|
|
|
|
Thnx Prasad...
And you have to do it for each component you would like to add? Isn't there an easier way?
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Programm3r wrote: Isn't there an easier way?
Nope .
Thats why MFC comes up.
|
|
|
|
|
Hi all,
Take the follwoing into consideration:
vector<string> getSecNameString = CIniFile::GetSectionNames(FileName);
for(int i=0; i < (int)getSecNameString.size(); i++)
{
cout << "\n** Section Name ** -> " << getSecNameString[i].c_str() << endl;
vector<CIniFile::Record> getSecString = CIniFile::GetSection(getSecNameString[i], FileName);
printf("\n.... GetSection Keys & Values ..... \n");
printf("--------------------------------------\n");
for(int i=0; i < (int)getSecString.size(); i++)
cout << getSecString[i].Key.c_str() << "=" << getSecString[i].Value << endl;
}
The output would look someting like this:
[Section A]
keyA=1
keyB=2
{Section B]
keyC=3
keyD=4
O.k so now one wants to put each of these values into labels and textboxes.
For example the following must happen (Non-visual example):
label1 -> keyA
textBox1 -> 1
label2 -> keyB
textBox1 -> 2
and so on...
Please note that one would not know the limit of each section or key, and don't mind the "[]"
Thanx in advance
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Hi,
i have developed .lib for logger from opensource called log4cxxx.
they have given samples to use the .lib file. while i am using functions (which are implemented in .lib) with string parameters got link error
rror LNK2001: unresolved external symbol "public: void __thiscall log4cxx::Logger::debug(class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > const &,char const *,int)" (?debug@Logger@log4cxx@@QAEXAB
V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PBDH@Z)
../Bin/Static Debug/trivial.exe : fatal error LNK1120: 1 unresolved externals
where as i didn't get any error for functions with integers.
function protype
void Logger::debug(const String& message,const char* file=0, int line=-1);
i am using
const char *file1="log.txt";
debug("debug info",file1,100);
can anyone help on this issue.i am using vc6.0.
advance thanks
|
|
|
|
|
rgchezhian wrote: "public: void __thiscall log4cxx::Logger::debug(class std::basic_string,class std::allocator > const &,char const *,int)"
Please go through the function prototype again. There may be some mismatch.
If that is OK then try to link the libray as following preprocesser directive.
#pragma comment(lib,"full path of library")
put above line in .cpp file below the header includes
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Hi everyone,
Maybe my question is funny but I want to know what is it?
CMap<UINT,UINT,UINT,UINT> Map;Map m_Map;or CList <int> m;
or typedef CMap<UINT,UINT,UINT,UINT> m_Map;I know that typedef declare a new kind of an exist kind
|
|
|
|
|
messages wrote: I know that typedef declare a new kind of an exist kind
Then what else you want to know ?
|
|
|
|
|
Hi thanks for your help
I want to know what is it CMap<> or CList<>
|
|
|
|
|
messages wrote: I want to know what is it CMap<> or CList<>
This means that, these classes requires templete arguments.
|
|
|
|
|
Sorry I ask again I have another question can you explain for me For example what is it CMap<int,int,int> Map; Map m;
thank you prasad_som
|
|
|
|
|
Possibly you are asking, what is
typedef CMap<UINT,UINT,UINT,UINT> Map;
Map m. Because, what you have asked is not possible.
Its used just to increase redability.
|
|
|
|