|
prithaa wrote: Did you answer the question ?
No. I was mainly just wanting some clarification about your "I have an application which is not having the document - view architecture...Can I derive the view from CSrollView ?" comment. You can't have both.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello,
You mean to say if I don't have document-view architecture than I cannot derive my view from CScrollView.
Is that so
Prithaa
|
|
|
|
|
You apparently have two requirements: 1) not to use the doc/view architecture, and 2) derive a view from CScrollView. Can you not see how #2 contradicts with #1? You can do either, just not both in unison.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello,
Then can I derive my view from CWnd and provide the scrolling facilities myself.
Prithaa
|
|
|
|
|
I would presume so, but having never done that before, I can't say with any degree of authority.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks for your replies.
I'll do it after understanding CScrollView and other MFC's.
Prithaa
|
|
|
|
|
prithaa wrote: can I derive my view from CWnd and provide the scrolling facilities myself.
It's not a view if you're not using doc/view. It's a window. You can implement scroll bars
on the window just like any other window
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
Hello,
In one of the mails Mr David Crow said the following
You apparently have two requirements: 1) not to use the doc/view architecture, and 2) derive a view from CScrollView. Can you not see how #2 contradicts with #1? You can do either, just not both in unison.
Can you tell why are the statements contradicting ?
I sort of understood when Mr Mark Salsberry said that the ChildView is a simple window derived from CWnd.
And how difficult it will be to implement scrollbars for my view
Thanks for all answers.
It was of great help
Prithaa
|
|
|
|
|
prithaa wrote: Can you tell why are the statements contradicting ?
Since CScrollView is derived from CView, it is meant to be used with the doc/view architecture.
So to use a CScrollView without the doc/view architecture is the contradiction.
Scrollbars are fairly easy to implement. One way is to create a CWnd-derived class and create
the window with the WS_HSCROLL and/or WS_VSCROLL style(s). You'll need to keep track of scroll
ranges, usually based on how much information there is to display relative to how large the client
area of the window is. You can respond to scroll events WM_HSCROLL/WM_VSCROLL to handle when
the user manipulates a scrollbar. CWnd::GetScrollInfo/CWnd::SetScrollInfo can be used to adjust
the scroll bars. etc.
See the "Scrolling Functions" section of CWnd Members[^] for more details.
Mark
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
When executing my program, I receive an Assertion Failure Dialog Box and if I press Retry button, program control goes to the following line,
VERIFY(::SendMessage(m_hWnd, TVM_GETITEM, 0, (LPARAM)&item));
in the winctrl2.cpp.
What to do?
|
|
|
|
|
T.RATHA KRISHNAN wrote: VERIFY(::SendMessage(m_hWnd, TVM_GETITEM, 0, (LPARAM)&item));
This means that, TVM_GETITEM sending message is failed, check item parameter.
m_hWnd is handle to tree view control, isn't it ?
|
|
|
|
|
T.RATHA KRISHNAN wrote: When executing my program, I receive an Assertion Failure Dialog Box...
What line of what file is asserting?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
How can I load bitmap image?
From open dialog i have to load bitmap image. then display it. then use pattern. they spay colors int the image.
How can i do this??
Help me
|
|
|
|
|
mazhar_cse wrote: How can I load bitmap image?
You can use of LoadImage or CImage class for load image and for show it use of WM_ERASEBKGND
|
|
|
|
|
I am working with a CListCtrl. Is it possible to set different text color of different back ground color for different index? Suppose index 1 would have red colored text while index 2 would have green. Is it possibl?
|
|
|
|
|
refer this[^] article by Michael Dunn.
|
|
|
|
|
|
Can any one give me brief idea how to use the PX_BLOB in the acticex control?
Tell me how to give the argument in this function.
Thanks in Advance
Mallikarjun
|
|
|
|
|
Isn't that provided in documentation ?
|
|
|
|
|
it is not given in document.so i kindly request u to tell me how can we use PX_BLOB in activex control?
|
|
|
|
|
|
Hi.
In my application I am trying to read all the fonts from system’s font folder and loading them in a drop down box so that user can pick any of the available fonts.
I am using EnumFontFamProc() for reading all the fonts from Fonts folder and here is the code snippet for that….
int CALLBACK CFontCombo::EnumFontFamProc(ENUMLOGFONT FAR *lpelf,
NEWTEXTMETRIC FAR *lpntm, int FontType, LPARAM lParam)
{
if(FontType & TRUETYPE_FONTTYPE)
{
CFontCombo *pxFC = (CFontCombo *) lParam;
pxFC->AddString(lpelf->elfLogFont.lfFaceName);
}
return 1;
}
Application successfully reads all TTF (Tru Type Fonts) but fails to read OTF (Open Type Font) that are present in Fonts folder.
What’s the solution for this problem?
Thanks
Sameer Thakur
|
|
|
|
|
int CALLBACK CFontCombo::EnumFontFamProc(ENUMLOGFONT FAR *lpelf,
NEWTEXTMETRIC FAR *lpntm, int FontType, LPARAM lParam)
{
<font color=red>if(FontType & TRUETYPE_FONTTYPE)</font> <-- What is this doing here??
{
CFontCombo *pxFC = (CFontCombo *) lParam;
pxFC->AddString(lpelf->elfLogFont.lfFaceName);
}
return 1;
}</blockquote>
|
|
|
|
|
Hi,
once I wrote a similar thing, but I used EnumFontFamiliesEx because it uses another callback proc which uses EnumFontFamExProc. There you get an NEWTEXTMETRICEX pointer and there you can test the
ntmFlags member of the ntmTm member:
if ( ( ( lpntme -> ntmTm.ntmFlags & NTM_PS_OPENTYPE ) == NTM_PS_OPENTYPE ) ||
( ( lpntme -> ntmTm.ntmFlags & NTM_TT_OPENTYPE ) == NTM_TT_OPENTYPE ) )
{
// this is an open type font
...
}
Cheers
Stefan
|
|
|
|
|
Hi, I need to change menu caption while the app is running.
Please help me.
Thanks
Papais
|
|
|
|