|
amitmistry_petlad wrote: hr = pkg.EncodeMediaContent(wInFile,w_Output,hDlg,HOST,UserID,sINIT_PACKAGE_RESPONSE,COMMUNICATOR_SCRIPT_FILE_PATH,PORT,hList,_ProtectSet[25]);
why _ProtectSet[25]? Passing like this means you are passing only the 25th element of the array. Why dont you pass like
hr = pkg.EncodeMediaContent(wInFile,w_Output,hDlg,HOST,UserID,sINIT_PACKAGE_RESPONSE,COMMUNICATOR_SCRIPT_FILE_PATH,PORT,hList,_ProtectSet );
nave
|
|
|
|
|
ok fine suppose i will pass like that then
i should write pointer at recever end is it ?.
then how can i access the members.
because i passing this array object through two function
1) EncodeMediaContent(......,last param) //here i should put pointer
2) GenerateConfigurePackageRequest(..., last param )//here i should pointer
Both last param having the same.
so now you can give me the guide line.
i have take pointer at two place but let me know how can i got the objects value.
e.g.
Title=_ProtectSet[0].title;
Amit
|
|
|
|
|
amitmistry_petlad wrote: 1) EncodeMediaContent(......,last param) //here i should put pointer
2) GenerateConfigurePackageRequest(..., last param )//here i should pointer
you dont need to change this parameters. The current definition is ok. And even though u recieve a pointer in the last function, you will be able to use like
Title=_ProtectSet[0].title;
Modify the code as I said and try compliling the code. It should compile with zero errors.And let me know if there is any error.
nave
|
|
|
|
|
|
how can i print every page with a special style when i print a multi-page
document.for example,when i print the first page ,i want in A4,while the
second in A3.
hhhero
|
|
|
|
|
You will have to print the pages one by one, each time changing the printer settings to whatever size you want to use.
|
|
|
|
|
thanks WaldeMort!!!
i got it!!!
just call ResetDC after change a DEVMOD struct,that's ok!!!
thanks!!!
|
|
|
|
|
A modeless dialog(popup property) been created by a main dialog makes itself Transparent like this:
<br />
SetWindowLong(m_hWnd, GWL_EXSTYLE, GetWindowLong(m_hWnd, GWL_EXSTYLE) | WS_EX_LAYERED);<br />
SetLayeredWindowAttributes(m_hWnd, 0, 85, LWA_ALPHA);<br />
The modeless dialog has some controls on it, for example buttons, lists etc.
some text will be added to the list sometimes, for example runing logs etc.
several hours later(screen protector has started, quit it), the modeless dialog remain a blank dialog, that is, all controls disappeared!
move the mouse on the buttons, and the buttons display.
left click the list, the row which is selected displays, others remain disappeared!
minimize the main dialog the restore it, all controls on the modeless dialog display.
The problem only occurs on Win2003 server.
The problem need a long time to occur!
someone please give some suggestion!
best regards!
|
|
|
|
|
|
int livesPos[] = {30, 15};
the '{' can only be used for variable instantiation and not later.
|
|
|
|
|
|
one good way would be to not have globals. Another would be to use a vector. A third would be
livesPos = new int[2];
livesPos[0] = 5;
livesPos[1] = 666;
or whatever.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
The problem with a global is that you can't debug it, or control it. At a minimum, create a class that has public static methods to get and set variables which are private. That way, you can set breakpoints if you need to debug access to the values. Even better, create a class with protected members, and make the classes you want to grant access, friends of that class.
Lord Kixdemp wrote: you do live here, don't you?
*grin* 14+ hours a day, yeah.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
That is all very nice and true only one problem: this guy said he used C and not C++..
I guess u could some OO implementation in C (header represents a class and each function takes a pointer to structure that represents 'this'), still u don't have encapsulation...
|
|
|
|
|
Oh, I missed that. Then, there's no way around it. C kind of sucks that way.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
What would you do without global variables?
|
|
|
|
|
|
Write maintainable code ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Maintainable code? What do you mean?
Windows Calculator told me I will die at 28.
|
|
|
|
|
It means, code that is easy to work on if you have to come back to it later.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Suppose I have the following function which is executed many times in a program. Is a separate CString textSub instance created each time the function executes? Do I need to destroy the CString textSub at the end of the function? Or suppose it wasn't CString, but some other class? Thanks.
void CNew1Dlg::OnBUTTONPick() <br />
{<br />
CString textSub;<br />
textSub.Format("%d %s", someNumber, someString);<br />
GetDlgItem(someEditBox)->SetWindowText(textSub); <br />
}
|
|
|
|
|
Oliver123 wrote: Is a separate CString textSub instance created each time the function executes?
Of course. You don't need to clean it up, it's not a pointer, it will clean itself up ( calling it's own destructor )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Unless you use a "new " operator explicitly,it gets cleaned up automatically once it looses it's scope (Once it returns back to the caller). If you had used "new " to instantiate the object,then you need to "delete " it mannualy.
Dario: How is "directory" in French? (I mean a file system directory).
John Simmons: "zee file holdaire thingie"
|
|
|
|
|
Another important thing is: sometimes you'll need to call GetBuffer() or another function of that kind, if you do that, you must remember to call also ReleaseBuffer() just before exiting the scope of the CString variable.
Hope this helps
|
|
|
|