|
please read this[^] and edit your message to use <pre></pre> tags when posting code
|
|
|
|
|
As toxcct mentioned, please reformat your post so we can read your code without our eyes
bleeding
You shouldn't be getting any flicker unless maybe the window you're blitting to is redrawing
its background.
You're using double buffering so there's no need to set the BkMode of the memory DC to
TRANSPARENT.
Also, a possibly simpler solution is to use ScrollWindowEx to scroll a windows contents and then
only the newly exposed portion of the window needs to be repainted. No flicker and no double
buffering required
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
I'm standing right here:
CString cs;
void CNotePadApp::OnFileOpen()
{
}
void CNotePadView::OnDraw(CDC* pDc)
{
CNotePadDoc* pDoc = GetDocument();
pDc->TextOutA(0,0,csText,csText.GetBufferLength());
286? WOWW!
|
|
|
|
|
Well since you are using the Doc/View architecture, the usual practice is to store the string in a member variable of your CDocument derived class (CNotePadDoc??).
This can then be easily accessed from your view.
<br />
void CNotePadApp::OnFileOpen()<br />
{<br />
CString strText = _T("Some string ");<br />
CNotPadDoc* pDoc = GetDocument();<br />
pDoc->SetMyString(strText);<br />
}<br />
<br />
..<br />
void CNotePadView::OnDraw(CDC* pDc)<br />
{<br />
CString csText;<br />
CNotePadDoc* pDoc = GetDocument();<br />
<br />
csText = pDoc->GetMyText();<br />
pDc->TextOutA(0,0,csText,csText.GetBufferLength());<br />
..<br />
I Dream of Absolute Zero
|
|
|
|
|
You open a file, using the "open" in the winapp window menu. Now you store the content in a string.. Now, how do you send it to the view. Please note, you are now away from the view class. Where is the view class's object created?
In general the question goes like this:
You are inside a class far away from the view class. How do print a string from the far away class into the view(The client window that's displays content). You get me now?
286? WOWW!
|
|
|
|
|
Thanks RChin, I'll try that.
286? WOWW!
|
|
|
|
|
|
Thanks dude!
----------------------------
286? WOWW!
|
|
|
|
|
Wow!!! Just checked very nice articles! thanks for sharing!
----------------------------
286? WOWW!
|
|
|
|
|
hi
I want write the code for :
char *strcpy(char *s1 , const char *s2 )?
char *strncpy(char *s1 , const char *s2 , int size)?
char *strcat( char *s1 , const char *s2 )?
char *strncat( char *s1 , const char *s2 , int size )?
int *strcmp( const char *s1 , const char *s2 )?
int *strncmp( const char *s1 , const char *s2 , int size)?
help me please
|
|
|
|
|
what's your question exactly ? you want to rewrite thos function ?
what for ?
moreover, if you work with C++ strings, you'd better forget those old char*. they are a legacy from the C language, kept for compatibility.
however, you should use the std::string class instead; which class proposes all the functionnality you want to redevelop here (if i get you well)
|
|
|
|
|
toxcct wrote: you want to rewrite thos function ?
yes, i think he wants to rewrite those functions.
and i also feel its part of an assignment/homework given to him.
Regards,
Vijay.
God may not give us what we 'want', but he surely gives us what we 'need'.
|
|
|
|
|
What exactly do you want ? Please be specific while posting.
Regards,
Paresh.
|
|
|
|
|
I think you should reffer to some good books on C and C++ (Ex: C and C++ Programmers Bible)
|
|
|
|
|
You shouldn't be using these low level and old fashioned string manipulations routines without a compelling reason to do so. Instead use a string class such as the standard library's std::string or MFC's CString .
Steve
|
|
|
|
|
i am retrieving a unicode field from a database table using getfieldvalue function. but due to some data loss it is displaying question marks. how can i retrieve a double byte value from database in vc++
|
|
|
|
|
Please elaborate on the question ?
Regards,
Paresh.
|
|
|
|
|
roli_sri wrote: but due to some data loss it is displaying question marks.
You need to track where data is lost. I would start with setting up a break point where I start reading date from the database.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
I want to add maximize and minimize buttons in a property sheet implemented as Dialog based MFC application.
|
|
|
|
|
wrote: I want to add maximize and minimize buttons in a property sheet implemented as Dialog based MFC application.
start by adding a name to your codeproject account. i like to know who i speak to.
then look in the properties dialog over your propertySheet in the resource editor, and spot the minimize/maximize options...
|
|
|
|
|
toxcct wrote: start by adding a name to your codeproject account.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
toxcct wrote: start by adding a name to your codeproject account.
this is exactly what i was about to tell him.
Regards,
Vijay.
God may not give us what we 'want', but he surely gives us what we 'need'.
|
|
|
|
|
:->
an advice : type with your nose, you'll be long faster !!!
|
|
|
|
|
toxcct wrote: an advice : type with your nose, you'll be long faster !!!
Regards,
Vijay.
God may not give us what we 'want', but he surely gives us what we 'need'.
|
|
|
|
|