|
In my program i'm creating an editor like visualc++..
in this u can display the line no,column no of the editor part in statusbar ..the editor is based on scintilla..below to that editor i'm having an output window exactly like the output window of vc++..
so if i keep the mouse in output window and if i move the cursor it should show that corresponding line nd colmn no..
the output window is a richedit control...
i'm having code for detecting line no nd colmn no...
but how will detect that the cursor is in mainwindow or output window so that i can display the corresponding lineno,colmn no in the status bar?
aqny help..thanx in advance...
|
|
|
|
|
Can you use of WM_MOUSEMOVE on the output window then you can use of CPoint for get x and y position of mouse and then set status bar.
|
|
|
|
|
in the window you have WM_MOUSEMOCE else
with TrackMouseEvent(...) you can get a message when leaving for window.
Greetings from Germany
|
|
|
|
|
Hi,
I am getting following compile time error "error C2664: 'CPropertySheet::AddPage' : cannot convert parameter 1 from 'CPropertySheet *__w64 ' to 'CPropertyPage *'", Does any one now how to resolve that?
Best Regards,
Mushq
Mushtaque Ahmed Nizamani
Software Engineer
Ultimus Pakistan
"English is my second language; please excuse any grammatical or spelling mistakes"
|
|
|
|
|
You pass a wrong argument to a function. Why do you pass a CProprtySheet pointer to the AddPage function ? You need to pass a CPropertyPage pointer instead.
Sorry, without more explanation and a code snippet it is difficult to say more.
|
|
|
|
|
Thanx for that, I think I need a cup of coffe.
Best Regards,
Mushq
Mushtaque Ahmed Nizamani
Software Engineer
Ultimus Pakistan
"English is my second language; please excuse any grammatical or spelling mistakes"
|
|
|
|
|
Looks like, you have passed address of CPropertySheet object instead of CPropertyPage .
Prasad
MS MVP - VC++
|
|
|
|
|
Can you show your code "CPropertySheet::AddPage(?)"
|
|
|
|
|
Hi,
my application is in MultiByte - CharecterSet ( Project Properties)
Another "Console2" (third-partie)project is in Unicode
If i make a CDC::TextOut of a string where the first element is equal to a value of i=1 to i=1600
so i get a Character-Table of the printed characters/symbols ... i see only the standard characters
No DOS-Related characters, ( See Table[^] --> Codepage 850 the 4th last line (different blocks and pipes) )
Need i to set the whole project to Unicode to display those special characters?
Big thanks !
|
|
|
|
|
I think it would be the best to use unicode character set.
You string handling is much easier than using MBCS.
If you are not able to change your setting you have to convert the unicode characters to MBCS.
To convert Unicode (=widechar) to MBCS use: WideCharToMultiByte
to convert wide to unicode char use: MultiByteToWideChar
|
|
|
|
|
Hello everyone,
In Visual Studio 2005, I find that when we enable all Exceptions from Debug --> Exceptions, when exception happens (even if I catch them and do not through again), the debug process will be interrupted. Is that correct?
Two further questions,
1. I do not understand why the debug process is interrupted even if the exception is caught and is not thrown again. What is the purpose of interrupting debug process? The usability is not good;
2. For user defined exceptions, will the debug process be interrupted as well?
thanks in advance,
George
|
|
|
|
|
1. Yes, you get always a "special exception" in Debugging Mode under Visual Studio.
If you start the .EXE alone, you get only your exception message or the standard-message if you don't
handle the exceptions
2. No idea, sorry
I hope my informations are correct, because i don't used the exceptions still some years
( i know not a good style of programming )
|
|
|
|
|
This is right. To break on the raise of an exception helps you to find the right place and cause of it.
I think there is an option to only break for unhandled exceptions.
Greetings from Germany
|
|
|
|
|
I have an Dialog based application.
When I run with a certain resolution set, the Dialog size and controls are fitting within the screen.
When I change the resolution, The Dialog size goes out of the screen limits.
I want to adjust the size of the dialog and also the controls on the dialog with the current screen resolution.
Thanks in advance
|
|
|
|
|
The message WM_DISPLAYCHANGE ist sent to all windows on the screen (dont know about hidden ones, though!).
wParam ist the new color depth, lParam the new screen resolution.
Just have your dialog react to that.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
CRect dkRect;
(CWnd::GetDesktopWindow())->GetClientRect(dkRect);
and then use the left, up, right, bottom of dkRect to set the new size of your dialog
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?
|
|
|
|
|
And you can use of WM_SIZE with MoveWindow or SetWindowPos.
|
|
|
|
|
If the resolution changes you get a message about it.
I wrote an article about positions of windows: http://www.codeproject.com/useritems/Multimonitor.asp
Greetings from Germany
|
|
|
|
|
I have an SDI application ,I want to disable toolbar and menuitems
for certain users. Toolbar buttons get hidden but menu items remain as it is. I checked cmu does not get null value.
this code is in MainFrame.cpp.
*- Instead of m_hWnd I tried ::AfxGetMainWnd() and
*- AfxGetApp()->GetMainWindow().GetMenu() but result is worse.
////////////////////////////////current code
CMenu* cmu = (CMenu*)::GetMenu(m_hWnd);
if(right[0] == 0)
{
ctb.SetState(ID_ADD_CUSTOMER,TBSTATE_HIDDEN);
UINT ui = cmu->EnableMenuItem(ID_ADD_CUSTOMER,MF_DISABLED);
}
if(right[1] == 0)
{
ctb.SetState(ID_INACTIVATE_ACCOUNT,TBSTATE_HIDDEN);
UINT ui = cmu->EnableMenuItem(ID_INACTIVATE_ACCOUNT,MF_GRAYED);
}
}
|| ART OF LIVING ||
|
|
|
|
|
What was the return value EnableMenuItem ?
|
|
|
|
|
I can get Graphics from CDC by using
Graphics g(pDC->GetSafeHDC()); // pDC is a pointer of CDC
for GDI+.
Is there any way to get reverse? That means I want to get CDC from Graphics.
Is it possible?
|
|
|
|
|
u can call CDC::FromHandle(graphics->GetHDC())
If u can Dream... U can do it
|
|
|
|
|
Thank u very much for your help.
It is working
|
|
|
|
|
when i doubleclick on the trayicon ... i want it to show the dialog i hav made..i used showdialog() but it did not work..u may say that dialog appear for few micro seconds only and i could not see it clearly...what should i do now??
|
|
|
|
|
thanks a lot for not providing me help... i solved it myself only...thanks...enjoy
|
|
|
|