|
As I told above, the bool has no sense in this function, but the possibility to give back a TRUE or FALSE depending on if there is an error or not, or if the parameters have sense or not or whatever else. You can get the bool away and code your function as void without any problem.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Why you didnt use of a structure for return value?
|
|
|
|
|
Generally speaking that isn't a good idea: it is inefficient.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Eranga Thennakoon wrote: One of my friend say i can do it as above. using the bool type return value.
Get a new friend that knows a bool is only 1 byte in size, thus can only hold a value of 256 (assuming unsigned ). Either that or only plan on counting 128 words and 128 characters.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
how can i call the actionscript function using vc++.
|
|
|
|
|
What do you mean with "actionscript"?? (I know actionscript from Macromedia Flash, but in the help of VC++ 6.0 there is no "actionscript")
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
thanks.
i want to call the flash function throught to vc++ code .how to do?
|
|
|
|
|
To call a flash function... I don't know if it is even possible. To call a *.exe flash project, yes, you can call any other *.exe files from VC++. About the *.swf ... I am not sure about.
Maybe with a bit more info about what you want to do, others can help you better than I
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
flash.external.ExternalInterface.addCallback("hidedetails", this, hidedetails);
function hidedetails()
{
setProperty("a row 1",_visible, false);
setProperty("a row 2",_visible,false);
setProperty("a row 3",_visible, false);
setProperty("a row 4",_visible,false);
setProperty("a row 5",_visible,false);
}
above the function in flash. now i want to call this function in vc++.how to do it?
|
|
|
|
|
I think u r using an ActiveX called "ShockwaveFlashObject".
create a member variable for that. And
membervariable.SetVariable("flashobject.hidedetails", "");
Here flashobject is the object(in flash code) to which actionscript code is linked.
|
|
|
|
|
Hi All,
I my project when I run the application then it crash and when I
debug that application then it is working fine. So can any body give me solution to this problem.
Thanks in Advance
am
hi
|
|
|
|
|
Send me u'r project.
Come online at:-
jubinc@skype
|
|
|
|
|
Have a look at http://www.flounder.com/debug_release.htm[^]
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
most often the cause is an unitialized variable...
Are there any warnings when you compile your program? Did you fix them?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</a>
|
|
|
|
|
In the release you must have no errors in variables initialization, by default the debug version makes "some tricks" that avoid crashes due to bad initializations.
Take a look around your code (specially by starting sections that you programmed, altough I recommend you to the whole programm) and be sure that you are giving a "valid" value to EVERY variable you declare. No matter if local, global, one type or another. Use "0", "NULL", "-1" whatever you want, but use something.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
We are clever guys but if you more explain about your program will be helpful.
|
|
|
|
|
Hamid. wrote: We are clever guys
I like the modestly way you tell it :P
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
|
Hi......
I am working on a SDI (Form based i.e., CFormView) Application. I need to remove the Tittlebar & Menu. Can anybody help me.
Thanks in advance
Sairam
|
|
|
|
|
Hi,
If you dont want Menu and ToolBar in your SDI application.
Comment the Hilighted Lines in this program.
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
//if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | //WS_VISIBLE | CBRS_TOP
// | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | //CBRS_SIZE_DYNAMIC) ||
// !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
//{
// TRACE0("Failed to create toolbar\n");
// return -1; // fail to create
//}
if (!m_wndStatusBar.Create(this) ||
!m_wndStatusBar.SetIndicators(indicators,
sizeof(indicators)/sizeof(UINT)))
{
TRACE0("Failed to create status bar\n");
return -1; // fail to create
}
// TODO: Delete these three lines if you don't want the toolbar to
// be dockable
//m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
//EnableDocking(CBRS_ALIGN_ANY);
//DockControlBar(&m_wndToolBar);
return 0;
}
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
Hmmm...
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
How can i disconnect a computer from using internet after a specified amount of time. The internet connection can be in the form of dial up or LAN/PPP.
Please advice.
Thanks in advance.
Regards,
John.
|
|
|
|
|
emmmatty1 wrote: The internet connection can be in the form of dial up...
If RasDial() was used to make the connection, use RasHangUp() to terminate the connection.
I would think a better solution would be to mimic what happens when you right-click a connection and select Disable. I am not sure what API does this, however. You could try tapping into the Shell (i.e., opening the Network Connections applet in Control Panel, finding the Local Area Connection object, and then invoking its Enable or Disable menu item). I can do this via VBS but have not tried in VC++.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
modified on Wednesday, December 19, 2007 10:04:20 AM
|
|
|
|
|
What do you expect "disconnect" to do, when your computer is connected to a LAN with access to the internet?
Or are you talking about your computer actually *being* the router, connected to some sort of DSL or cable modem?
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
Hello everyone,
Why Visual Studio compiler can not optimize in this case? I think this case is almost the same as sample 1, why compiler can optimize sample 1 but can not optimze sample 2?
(sample 2, http://msdn2.microsoft.com/en-us/library/ms364057(vs.80).aspx)
class A {
public:
A() {printf ("A: I am in constructor\n");i = 1;}
~A() { printf ("A: I am in destructor\n"); i = 0;}
A(const A& a) {printf ("A: I am in copy constructor\n"); i = a.i;}
int i, x, w;
};
class B {
public:
A a;
B() { printf ("B: I am in constructor\n");}
~B() { printf ("B: I am in destructor\n");}
B(const B& b) { printf ("B: I am in copy constructor\n");}
};
A MyMethod()
{
B* b = new B();
A a = b->a;
delete b;
return (a);
}
int main()
{
A a;
a = MyMethod();
}
thanks in advance,
George
|
|
|
|