|
see this [^]
And why you are using explicit resource loading for string, as LoadString() API is available.
|
|
|
|
|
neha.agarwal27 wrote: LPCSTR data = (LPCSTR)LockResource(hResData);
LPCTSTR data = (LPCTSTR) LockResource(hResData);
"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
|
|
|
|
|
You may try LPCTSTR or LPSTR. If LPCSTR doesnt exist then that is why you cannot cast the type. Maybe show the value of hResData and look up the return type of LockResource without type casting. Some type conversions are incorrect.
Wha, who,.... Oh, it was just a good dream. I keep having them. Why can't I have nightmares!?
|
|
|
|
|
Hi...
In Button Event Iwrote
CMatlabEng matlab;
matlab.Open(NULL);
Here CMatlabEng is Predefined Class...
In MySystem MATLAB Is Opening ..because In My PC MATLAB is Installed.. In Other PC's MATLAB Is not Opening...Because MATLAB Is not Installed..PLZ Any Body Help me...Plz ....
#sanroop#
|
|
|
|
|
johnalek wrote: In MySystem MATLAB Is Opening ..because In My PC MATLAB is Installed.. In Other PC's MATLAB Is not Opening...Because MATLAB Is not Installed
i think you answered.
|
|
|
|
|
johnalek wrote: In Other PC's MATLAB Is not Opening...Because MATLAB Is not Installed..PLZ Any Body Help me...Plz ....
then you have check there weather MATLAB is installed or not! or create the utlity which check weather MATLAB is installed or not, if it not install then install matlab on that PC
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
Hi Can you please let me know some article or API??
Thanks,
Sandip.
|
|
|
|
|
|
Thanks!!
|
|
|
|
|
You're welcome.
|
|
|
|
|
Hamid. wrote: You're welcome.
hows life dude!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
Hi Alok
How are you?I think you are busy.
ThatsAlok wrote: hows life dude!
Well near to terrible!
|
|
|
|
|
Hamid. wrote:
Well near to terrible!
he he he! what happen!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
Well I want to leave computer and science computer because I could not find a programming job with C++ even secretary.
|
|
|
|
|
hey why so.. you are genius in c++ programming!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
Well I dont know it was a joke or other thing because I dont think Im genius in c++ or even for work with computer if its true why I could'nt find any work,in fact companys dont want to use of c++ they want c# or Delphi for their works except this problem they like to write programs like accountancy or warehousing if someone tells to them that I wrote a program like media player for play video formats they answer is very simple with two words:well,next,but I think you are lucky first you and your people are good programmer second your country is good for programmer.
|
|
|
|
|
See here.
"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
|
|
|
|
|
I am just getting to grips with MFC. I have a basic question I can't quite get the code right.
My application consists of several dialog boxes and a property sheet. I am using WIN XP and Visual Studio 2003
On one of the dialog boxes I have a spare button, say, BUTTON1
When I click on this button, I want to send a Ctrl 1 to the application, that is, I want to emulate a condition, as if a Ctrl 1 has been entered on the keyboard, (but not entered via the keyboard keys, by clicking this button).
How do I do this?
Is it a matter of sending a message from the button function, saying here is Ctrl 1 but how do you code that?
Thanks to anyone who can help
|
|
|
|
|
doorprize wrote: How do I do this?
Have you tried keybd_event() ?
"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 about using SendMessage to send the WM_COMMAND message with the ID of the button to the button's parent window, or even better, invoke the handler with a simple function call.
Steve
|
|
|
|
|
doorprize wrote: Is it a matter of sending a message from the button function, saying here is Ctrl 1 but how do you code that?
you could you SendInput api
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
My thanks to the guys who found the time to help me with this. It led me on a search to look at the ways this could be done. I was thinking C with something like, putchar(c), shows you how little I know about MFC, but to answer my own question, Paul DiLascia has written a great example of using SendInput which others might be interested in. It can be found at:
http://msdn2.microsoft.com/en-us/magazine/cc163867.aspx
|
|
|
|
|
Hello everyone,
The space in string should use heap address memory space, not stack, right? But through debugging, for example,
string str = "hello";
why I can not see the invocation of new operator? Anyone could point out where STL string class allocates space on heap and using which function to allocate please (any other approach other than using new to allocate space on heap?)?
thanks in advance,
George
|
|
|
|
|
Most implementations of std::string have a smallish stack allocated buffer which is used for strings small enough to fit into it. Try assigning a much longer string and see what happens.
<blockquote class="FQ"><div class="FQA">George_George wrote:</div>Anyone could point out where STL string class allocates space on heap</blockquote>
Its done through the allocator. By default for a std::string this will be
allocator<char>
In my version of Visual Studio the actual call to new is around line 44 in the header file "xmemory"
|
|
|
|
|
Hi Josh,
I doubt your below comments. If the space is allocated on stack,
1. How do you deal with global object instance? There is no global stack or something, right?
2. How do you pass one string object instance from one function to another -- safely to ensure address space is valid?
Josh Gray wrote: Most implementations of std::string have a smallish stack
regards,
George
|
|
|
|