|
Naveen wrote: TrackPopupMenu will return 0 if user cancels the menu.
Only if the TPM_RETURNCMD is specified. If not it will return the success or failure status.
See the MSDN documentaion.
If you specify TPM_RETURNCMD in the fuFlags parameter, the return value is the menu-item identifier of the item that the user selected. If the user cancels the menu without making a selection, or if an error occurs, then the return value is 0.
If you do not specify TPM_RETURNCMD in the fuFlags parameter, the return value is nonzero if the function succeeds and 0 if it fails. To get extended error information, call GetLastError.
|
|
|
|
|
The list control width is changed in OnNcCalcSize for placing a vertical scroll bar having larger width than normal scroll bar.Then the last column is clipped.
see the code portion below:
void CustomListCtrl::OnNcCalcSize( BOOL bCalcValidRects_i, NCCALCSIZE_PARAMS FAR* lpncsp_i )
{
CListCtrl::OnNcCalcSize( bCalcValidRects_i, lpncsp_i );
DWORD dwStyle = GetWindowLong( m_hWnd, GWL_STYLE );
bool bVScroll = ( WS_VSCROLL == ( dwStyle & WS_VSCROLL ));
if( bVScroll )
{
lpncsp_i->rgrc[0].right -= ( nScrollbarSize - GetSystemMetrics( SM_CXVSCROLL ));
}
}
Actually scroll bars are appearing at correct position but the contents of the last column is clipped.
please help me...
thanks in advance....
JKV
|
|
|
|
|
Hi ...thx for reply...here iam explaining clearly...
iam doing Chat application with out language pack installation .In this when i paste telugu,tamil characters in rtf ,and put one afxmessagebox in sending .In this afxmessagebox it will comes automatically decimal values like 3411(example).. when iam sending chinese characters from rtf the decimal values are not coming it will comes like \'d4\'a4 .
i need help how to convert \'d4\'a4 to decimal value ...plz tell...
#sanroop#
|
|
|
|
|
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.
[my articles]
|
|
|
|
|
Is it possible to develop a GraphicsPath object from a Region object?
If possible plz give detail process.
|
|
|
|
|
hi ,
i want to edit a file with non ".cpp" extenstion on vs2003. the editor displays the contents as a plain text file( no Intellisence and color scheme). is any way i can configure the editor to treat thi file as cpp source code without changing its file extension ?
Thanks & Regards
|
|
|
|
|
Set the Language as "C/C++" in the "Source File Properties". You will get it by right clicking the editor and select the "Properties".
|
|
|
|
|
NS17 wrote: right clicking the editor and select the "Properties".
the editor does not contains a "Properties" option on context menu.
i tried "view->properties" but property panel contains nothing.
iam using VisualStudio2003, doing a console application project.
thanks
|
|
|
|
|
nitin3 wrote: iam using VisualStudio2003
I am sorry, I said about VC6. I am not so sure about how to do it in VC7.
|
|
|
|
|
Tools | Options --> Projects and Solutions --> Visual C++ Project Settings --> C/C++ File Extensions.
Maxwell Chen
|
|
|
|
|
Isn't it in VC 2005? He is using VC 2003.
|
|
|
|
|
NS17 wrote: Isn't it in VC 2005? He is using VC 2003.
I only have VC2005 right now. I think that VC2003 and VC2005's IDEs are very much similar.
Maxwell Chen
|
|
|
|
|
Hmm, ".cpp" should be handled by default by Visual Studio. Are you sure you have installed the C++ component of Visual Studio?
You can always try running the VS installer and doing a repair...
Just my two cents.
Florin Crisan
|
|
|
|
|
Actually his source file has NOT cpp extension...
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.
[my articles]
|
|
|
|
|
You're right
Florin Crisan
|
|
|
|
|
Hello,
Is there away to implement a preprocessor macro that would generate a build date in the style of UNIX timestamp (like 20080103 etc.). It would be helpful to print this kind of timestamp into program's About box or include it into program's version number. I know there is __DATE__, but this outputs a different format.
Cheers
|
|
|
|
|
HenriH wrote: I know there is __DATE__, but this outputs a different format.
__DATE__ is what you need. Re-arranging string format won't be such a difficult task.
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.
[my articles]
|
|
|
|
|
--------------------------------------------------------------------------------
I use the function SetupCommitFileQueue to copy files.
When I use it, "Copy files..." window is displayed .
I don't want this window to be displayed.
How can I do it?
Thanks
Ashish
|
|
|
|
|
Hi
iam doing Chat application with out language pack installation .In this when i paste chinese characters in rtf .
And sending from rtf to Html chinese characters r converting pair of 8-bit codepoints. i need help how to convert pair of 8-bit codepoints to decimal value ...plz tell...
#sanroop#
|
|
|
|
|
You post the same yesterday. I already answered asking you for more details. Could you please be so kind to elaborate a bit?
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.
[my articles]
|
|
|
|
|
I'm trying to restrict my dialog window from being moved outside the visible screen area.
I'm doing this using this method:
void CWindowsDVRDlg::OnWindowPosChanged(WINDOWPOS FAR* lpwndpos)
{
CSkinDialog::OnWindowPosChanged(lpwndpos);
CRect rc;
GetWindowRect (&rc);
if (EnsureRectangleOnDisplay(rc)){
SetWindowPos(NULL, rc.left, rc.top, 0,0, SWP_NOSIZE | SWP_NOZORDER);
}
else{
SendMessage(DM_REPOSITION);
}
RedrawWindow(NULL,NULL,RDW_INVALIDATE);
}
The code works but its flaw is that it's still painting the dialog window outside the visible screen area just before it is repositioned inside the screen (by SendMessage(DM_REPOSITION)). Flickering is the result of this.
Can anyone help me with this? You're help would be much appreciated.
|
|
|
|
|
Use OnWindowPosChanging instead.
|
|
|
|
|
Thanx!
I tried using OnWindowPosChanging() beforehand but the problem is, it seems it cannot process the SendMessage(DM_REPOSITION) at all which is what I need to implement.
Any other ideas on preventing the program from painting windows outside the screen (results in flickering) while using OnWindowPosChanged() and SendMessage(DM_REPOSITION)?
|
|
|
|
|
You can stop painting in the OnPaint method.
Or (better) you can invalidate (if it is under your control) only the inside-screen area.
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.
[my articles]
|
|
|
|
|
demxine wrote: Any other ideas on preventing the program from painting windows outside the screen (results in flickering) while using OnWindowPosChanged() and SendMessage(DM_REPOSITION)?
I dont understand the need of this... If you are targeting to restrict the window movement, OnWindowPosChanging is enough. You only need to update the WINDOWPOS structure values passed by it. No need of DM_REPOSITION.
Is my understanding correct?
|
|
|
|