|
I created a function that receives several arguments.
The function processes text and stores it in a variable.
char* Value = NULL;
function (arg, arg, arg, Value);
function declaration
function (arg, arg, arg, char *Value)
I did a read out from within the function, and the result is successfully stored in my desired Value.
However when the function returns to continue.
A CRT_DEBUGGER_HOOK exception is thrown!
|
|
|
|
|
It would help if you posted the code within the function.
|
|
|
|
|
If my mind serves me right, then this should go smoothly!
functionA(const char* Text, char *Value);
char *Value;
functionA (Paragraph, Value)
If functionA creates a char array and adds it to Value argument, when the procedure finishes whatever condition Value was will remain the same. Or is that incorrect?!
|
|
|
|
|
Fareed Rizkalla wrote: Value was will remain the same.
Correct. However whatever Value points to may have been changed by functionA() .
It's time for a new signature.
|
|
|
|
|
You're correct.
This is because the pointer variable is passed by value.
If you want it to change you must either do this -
functionA(const char* Text, char** Value)
char* Value;
functionA(Paragraph, &Value); Or do this -
functionA(const char* Text, char*& Value)
char* Value;
functionA(Paragraph, Value);
|
|
|
|
|
Add & and it fixed it!
I tried adding & to the value being passed in the function, but the IDE started underlining red for errors.
|
|
|
|
|
Please post the code that is showing errors.
|
|
|
|
|
How can I get the standard behavior of hiding menu bar when pushing Alt key and showing the menu bar when I click on the App. e.g Internet explorer. I know how to capture the Alt key and doing manually, I just think this might be part of windows behavior though?
Any ideas?
|
|
|
|
|
Software2007 wrote: How can I get the standard behavior of hiding menu bar when pushing Alt key...
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
if you open internet explorer, you push the Alt key, it toggles the menu on and off. To get that behavior in my MFC application, I can do just that by capturing the Alt key and showing/hiding the menu. I was wondering if this comes built in though with some kind of toggle?
|
|
|
|
|
Software2007 wrote: if you open internet explorer, you push the Alt key, it toggles the menu on and off.
For me, the Alt key sets and removes focus on the File menu. I've never seen a menu disappear as the result of pressing the Alt key.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
On my IE (ie8 64bits) menu-bar is not visible, and when pressing alt, it is displayed.
In my experience, pressing alt will display the "_" under the mnemonic.
Watched code never compiles.
|
|
|
|
|
Maximilien wrote: In my experience, pressing alt will display the "_" under the mnemonic.
I'm familiar with that functionality, too, but not the other (i.e., disappearing).
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
With the menu displayed in IE 7, select View -> Toolbars -> (checked)Menu Bar. This should now turn off the Menu in IE. If you now press the Alt key, the menu will reappear. I think this is the behaviour that the OP is looking for. I doubt that it is standard in the MFC CMenu class. You might be able to extend that class to make it behave this way.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
|
|
|
|
|
Crap, I never seen that before!!! that's awful behaviour!!!
Don't do that, it's not a standard behaviour (according to the Vista/7 User Experience document, as far as I can see).
In general, you don't hide UI components and have the user "discover" them by luck.
Watched code never compiles.
|
|
|
|
|
Yes, I agree that it is not a good behavior. But I was building an application (console Gauges) and I wanted to strip them as much as possible even hiding toolbars, titlebars. If all controls are stripped from my app including menu bar, I needed an easy toggle to get them back on the app, thats how I came across the Alt key behavior.
|
|
|
|
|
I've also seen this on Windows Live Mail and some others that I don't remember.
After spy++ing on the messages to the window it looks like you have to do this yourself.
You could maybe use SetMenu to show and hide the menu when the Alt key is toggled.
|
|
|
|
|
I am able to see that feature on Windows 7 file explorer.
|
|
|
|
|
Ahhhh the beauty of GUI guidelines...
They can be always violated by the developer of the guideline themselves!
(have you ever see Office being consistent with the OS it works on ?)
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
Hi all,
i m takinh help of this article to generate self delete exe
[]Writing a self destructing exe file[^]
but the folder of exe not delete.
i have already tried another option,at run time with the help of another exe put my exe on another location and execute it but still the folder is not delete.
please help me for this.
thanks.
|
|
|
|
|
Please use the message board at the bottom of that article.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
He did.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Look at the DeleteExecutableBF() function here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
That must be a usefull function for girls who are unsatisfied with their "executable" BoyFriends...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
Hi,
How to get Geo location on my PC. How to get it?
|
|
|
|