|
i think this is because the IDE dosen't show the unicode strings... change the IDE settings as below..
take tool->options menu.
now take the debug tab in the Options dialog displayed.
U can find a check box saying "Display unicode strings". Tick that check box.
now run the application with a break point set in the next line of "MultiByteToWideChar(..)" function. Check the value in the variable when breakpoint reaches there
nave
|
|
|
|
|
Hey All,
I am implementing the Date & Time Picker through MFC. I placed it on my dialog and assigned a variable to it...CDateTimeCtrl m_DateTime;
I also added the event handler OnDtnCloseupDatetimepicker, and it works fine as long as I don't try to pick a date before Jan 1, 1970. If I pick a date before then, I get a Debug Assertion error on atltime.inl, Line 167, Expression: m_time != -1.
I have never seen this before....
Here is the code that I have in the closeup function...
void Measure1::OnDtnCloseupDatetimepicker1(NMHDR *pNMHDR, LRESULT *pResult)
{
m_DateTime.GetTime(time);
int mnth = time.GetMonth();
switch(mnth)
{
case 1: Month = "January";
break;
case 2: Month = "February";
break;
case 3: Month = "March";
break;
case 4: Month = "April";
break;
case 5: Month = "May";
break;
case 6: Month = "June";
break;
case 7: Month = "July";
break;
case 8: Month = "August";
break;
case 9: Month = "September";
break;
case 10: Month = "October";
break;
case 11: Month = "November";
break;
case 12: Month = "December";
break;
}
Day = time.GetDay();
Year = time.GetYear();
*pResult = 0;
}
Thanks in advance....
|
|
|
|
|
I would guess that your time is a CTime. If so, the CTime object date limits are 1/1/1970 to 1/18/2038 (in VC6) and 1/1/1970 to 12/31/3000 in VC8 (2005).
You could use COleDateTime for your time variable instead and that should solve your problem - it will handle dates from 1/1/100 to 12/31/9999.
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
<kmedcalf@ev1.net>
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
goodoljosh1980 wrote: m_DateTime.GetTime(time);
Is 'time' a CTime object? If it is, it's limited to January 1st, 1970 to January 18th, 2038. Try a COleDateTime object instead, it has a range of January 1st, 100 to December 31st, 9999.
- Dy
|
|
|
|
|
I have an application with plenty of windows. Some of them a re CView subclasses others are controls etc.
My views usually track the mouse using the mouse events like the CWnd::OnMouseMove messages (which I have properly mapped etc).
Reading the OnMouseMove help says that:
'The framework calls this member function when the mouse cursor moves. If the mouse is not captured, the WM_MOUSEMOVE message is received by the CWnd object beneath the mouse cursor; otherwise, the message goes to the window that has captured the mouse.'
I would like to know at a given point where the mouse is, or actually if the recepient of the next mouse input message is the current CWnd or not (i.e. is it still beneath the cursor?).
I 'd like to write code like
MyClass::OnMouseMove(....)<br />
{<br />
DoMyInitialAction(); <br />
<br />
if( MouseInputStillOnMe() ) <br />
DoSomeOtherAction(....); <br />
}
If my DoMyInitialAction creates a new view it is likely that the next mouse input message will go on that one. I do not want to capture the mouse and receive any event related to it just in case that the DoMyInitialAction
does that (It's a black box. I do not know what will do).
Thus is it possible to write a MouseInputStillOnMe() query which will not post any message to my message queues but will tell me that under the current circumanstances I 'll receive the next mouse input message?
I assume that I can use the CWnd *CWnd::GetCapture( ) to find if another CWnd in my thread receives the mouse events but this does not answer if my window is still the one beneath the cursor. How do I found if it is?
Thanks a lot for any help....
Dimitris...more you ask, more you learn
|
|
|
|
|
I think you should look into using TrackMouseEvent
The TrackMouseEvent function posts messages when the mouse pointer leaves a window or hovers over a window for a specified amount of time.
I've seen better runs in my shorts! - Patches O'Houlihan
|
|
|
|
|
Or you could make use of the GetCursorPos() function and then indowFromPoint() to find out if the mouse is still over your window or not.
If you vote me down, my score will only get lower
|
|
|
|
|
Hi
Does anyone know how to execute an application with built in administrator privilege.
Thanks in advance
-- modified at 5:50 Thursday 20th July, 2006
|
|
|
|
|
ragavan wrote: how to execute an application
execute how....? from the explorer or from another application?
nave
|
|
|
|
|
You can try CreateProcessWithLogonW . You'll have to prompt the user for the credentials to use.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
ragavan wrote: Hi
Does anyone know how to execute an application with built in administrator privilege.
Is LoganUser is of any use!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi,
Is anyone aware of a simlpe technique for adding a breakpoint to every function/method in a VS2003 solution?
I'm currently having to modify the open source database Firebird. The number of entry points and curious manovers is so startling it's taking an age to track certain process.
Thanks
Tom
The greatest hinderance to the truth is not ignorance, it is the illusion of knowledge.
|
|
|
|
|
|
Recording a quick macro will be help full to an extend.
nave
|
|
|
|
|
|
could you please explain how to do this ?
Loka Samastha Sukhino Bhavanthu..!!!
( May all beings be happy and free )
|
|
|
|
|
renjith_sree wrote: Loka Samastha Sukhino Bhavanthu..!!!
( May all beings be happy and free )
nice translation.....
renjith_sree wrote: could you please explain how to do this ?
go to end of the cpp file. Now start recording the macro.Then follow below steps
1. Press ATL + up arrow -This will move the cursor to the starting of the last funtion.
2. press F9 - This will insert the break point in that line
Stop recoding the macro.
now go on playing the macro untill u reach the top of the file....
nave
|
|
|
|
|
I created a virtual drive(a Shell extention).But am not able to see the virtual drive when i open it from file->open/save as option from any application.How do i get it?
|
|
|
|
|
Hi All,
I am developing an MFC extension dll.I want to include an application into my dll.
can anyone help me out how to call the application through DLL.
Thanks in advance.
Ashok Reddy.
|
|
|
|
|
what u want is to launch an exe, u can use
ShellExecute() funtion
nave
|
|
|
|
|
This is one but the thing is ...
the sequence is as follows
My Application --->MFC EXTENSION DLL -CALLING OPEN API in dll->another application should open as well as I want to commmunicate between these two applications.
I will be very thankfull to u and waitinfg for u r reply.
Thanks......
Ashok Reddy.
|
|
|
|
|
This is one but the thing is ...
the sequence is as follows
My Application --->MFC EXTENSION DLL -CALLING OPEN API in dll->another application should open as well as I want to commmunicate between these two applications.
I will be very thankfull to u and waitinfg for u r reply.
Thanks......
Ashok Reddy
|
|
|
|
|
ashok3450 wrote: I want to commmunicate between these two applications.
what do u want to communicate?
nave
|
|
|
|
|
I want to send messages snd receive messages between applications.
Plz help me out.
Thanks
Ashok Reddy.
|
|
|
|
|
if u know the name of a window in the process ur going to create, u can get the handle of the window using the FindWindow() function, Once u get the window handle, U can send and receive messages.
nave
|
|
|
|