|
I need it for windows login and logoff action
abhi
|
|
|
|
|
When I run my project I read this error:
\CTools\daishi.cpp(114) : error C2039: 'OnOK' : is not a member of 'CDialog'.
Can any one figure out the error.
|
|
|
|
|
Whats type of your application?
|
|
|
|
|
Write the code plzzzz.
Come online at:-
jubinc@skype
|
|
|
|
|
Could you be more descriptive? Like giving us information on to what the application is. Giving parts of the code which generates the error. Otherwise you are leaving us in the dark here.
|
|
|
|
|
Suggestion: Change OP title to
Guess the error!
My guess: you have your own custom version of CDialog (that has nothing to do with MFC 's one) and you're calling the method OnOk it hasn't.
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.
|
|
|
|
|
you are the only one that give a good "figure out" and you get a 2?
I put a 5 to change it.
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 Friends
In my program i create a window which show irregular shape draw in OnPaint. While moving using MoveWindow, background is also moving with irregular shape. How to overcome this problem. Please help me!. Thanks in advance
-RisKhan-
|
|
|
|
|
RisKhan wrote: i create a window which show irregular shape draw in OnPaint
If you paint irregular shapes in OnPaint, its not meaning that you are making the window shape irregular. The window will be rectangle. To make your window irregular in shape you have create a region of the shape you wanted and use
SetWindowRgn(..)
This will slove your problem.. Hope this'll help you..
Do your Duty and Don't expect the Result
|
|
|
|
|
Hi all,
I have a string(not a CString), actually a file path. As an example,
c:\Test\MyProject\G00062_002_01.srf<code><br />
<br />
Then in following way get some data.<br />
<br />
<code><br />
string FullPath = c:\Test\MyProject\G00062_002_01.srf;<br />
string filePath = FullPath.GetFileTitle(); <br />
<br />
string groupID; <br />
string sessionId; <br />
string partID; <br />
<br />
groupID = filePath.substr(1, 5); <br />
sessionId = filePath.substr(7, 3); <br />
partID = filePath.substr(11, 2);<br />
<code><br />
<br />
<br />
So my outputs are 00062, 002, 01 respectively as string type. I want to add those values in a database as int type. How should I do this conversion.<br />
<br />
Where I'm confusing is that, outputs are in string format. But actually there are some integers.
I appreciate your help all the time...
Eranga
|
|
|
|
|
Eranga Thennakoon wrote: string FullPath = c:\Test\MyProject\G00062_002_01.srf;
You can not write like this.
You have to write :
string FullPath = "c:\Test\MyProject\G00062_002_01.srf";
Eranga Thennakoon wrote: string filePath = FullPath.GetFileTitle();
No function like string::GetFilePath();
This is for only information.
Your Solution is this:
int x;
sscanf(groupID.c_str(), "%d", &x);
Now x will contain 62 and you can store it in Database or anywhere.
Have a nice day.
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
Manish_mnp wrote: Eranga Thennakoon wrote:
string filePath = FullPath.GetFileTitle();
No function like string::GetFilePath();
So how it gives me the required values. I don't understand this.
Thanks for your solution. I've try one thing.
int grID;<br />
stringstream stGroup(filePath.substr(1, 5));<br />
stGroup >> grID;
What you think....
I appreciate your help all the time...
Eranga
|
|
|
|
|
T've also try but its giving me error like this:
error C2079: 'stream' uses undefined class 'std::basic_stringstream<_Elem,_Traits,_Alloc>'
with
[
_Elem=char,
_Traits=std::char_traits<char>,
_Alloc=std::allocator<char>
]
error C2440: 'initializing' : cannot convert from 'std::basic_string<_Elem,_Traits,_Ax>' to 'int'
with
[
_Elem=char,
_Traits=std::char_traits<char>,
_Ax=std::allocator<char>
]
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Are you getting it??
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
No, I don't get such error. only use string class.
I appreciate your help all the time...
Eranga
|
|
|
|
|
Did you #include <sstream> ?
|
|
|
|
|
Ya i am getting now but its easy to use atoi or sscanf .
What you think about it?
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
|
No, only the #include <string>
I appreciate your help all the time...
Eranga
|
|
|
|
|
I would say it is much better than using the C functions (sscanf, atoi, ...) because you are consistent (you used string, so stay with the tools the stl provides you). I don't like the idea of mixing C++ (std::string) with C (atoi, sscanf, ...).
What is this thing with GetFileTitle ? std::string doesn't have such a function so it shouldn't even compile (except if you pasted a wrong piece of code).
|
|
|
|
|
Hi Cédric,
What happend for your name?
|
|
|
|
|
Yeah, I realized that too. Don't know what happen but when I update my settings, it complains that my name is too long (even if it is under the limit of 50 chars). I removed the bold tag now, let's see if that works.
|
|
|
|
|
I think its problems of upgrade for example see Default icon is changed of question to general.
|
|
|
|
|
Actually I don't get any error on that code.
And also even me don't like to mix-up C and C++
I appreciate your help all the time...
Eranga
|
|
|
|
|
You could also use boos::lexical_cast[^]
It does the gory details of the stream-woking wrapped nicely in a routine that looks like a cast.
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"
|
|
|
|
|
Manish_mnp wrote: You can not write like this.
You have to write :
string FullPath = "c:\Test\MyProject\G00062_002_01.srf";
You can not write like this.
You have to write :
string FullPath = "c:\\Test\\MyProject\\G00062_002_01.srf";
"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
|
|
|
|