Posts: 1,006
Threads: 330
Joined: Mar 2007
Hi,
I know how to change Font for TitleBar of ShowNote Toolbar but not for the actual contents of the note itself. Any ideas?
Thanks,
Stuart
Posts: 11,922
Threads: 138
Joined: Dec 2002
It is rich edit control. To change font can be used EM_SETCHARFORMAT message.
Background color of RichEdit20A (Only text covered)
Or use CFont class. It is somewhere in the forum.
Posts: 1,006
Threads: 330
Joined: Mar 2007
...the rest of the way.
How do I relate the the dialog function for Dialog_richedit_colors to the ShowNote. What are the shared values passed between them and where do I designate the passing.
Sorry so basic a question..
Stuart
Posts: 11,922
Threads: 138
Joined: Dec 2002
int htb=ShowNote(...)
int h=child("" "RichEdit20" htb)
now copy code from Dialog_richedit_colors and paste here
the code is between SendMessage and SendMessage
(not tested)
Posts: 1,006
Threads: 330
Joined: Mar 2007
The text between SendMessage and SendMessage in Dialog_richedit_colors
is
CHARFORMAT cf.cbSize=sizeof(CHARFORMAT)
cf.dwMask=CFM_COLOR|CFM_BOLD|CFM_FACE|CFM_SIZE
cf.crTextColor=tcol
cf.dwEffects=CFE_BOLD
strncpy(&cf.szFaceName "Comic Sans MS" 31)
cf.yHeight=400 ;;twips
I found that but I don't understand what you mean by
int htb=ShowNote(...)
int h=child("" "RichEdit20" htb)
where do I make or replace these statements: in Dialog_richedit_colors or in ShowNote function
what do I do with the three dots (...) after ShowNote. What should I fill this in with?
I am again sorry to be so slow on this. Any good reading on the following two topics:
The dialogs
Winstyles
Thanks again!!!
Stuart
[/quote]
Posts: 11,922
Threads: 138
Joined: Dec 2002
Quote:where do I make or replace these statements: in Dialog_richedit_colors or in ShowNote function
Neither. Place the code after int h=child("" "RichEdit20" htb). Also, include both SendMessage. Not tested.
Quote:what do I do with the three dots (...) after ShowNote. What should I fill this in with?
Anything.
Posts: 1,006
Threads: 330
Joined: Mar 2007
Maybe I am trying to do something beyond my level (actually definitely!) but still I might be able to muddle through with your help.
You say:
Quote:int htb=ShowNote(...)
int h=child("" "RichEdit20" htb)
now copy code from Dialog_richedit_colors and paste here
the code is between SendMessage and SendMessage
and then to place this text after the
int h=child("" "RichEdit20" htb)
line
SendMessage h EM_SETBKGNDCOLOR 0 bcol
CHARFORMAT cf.cbSize=sizeof(CHARFORMAT)
cf.dwMask=CFM_COLOR|CFM_BOLD|CFM_FACE|CFM_SIZE
cf.crTextColor=tcol
cf.dwEffects=CFE_BOLD
strncpy(&cf.szFaceName "Comic Sans MS" 31)
cf.yHeight=400 ;;twips
SendMessage h EM_SETCHARFORMAT SCF_ALL &cf
The problem is that I don't know where you mean to put all this? You say "paste here" but where is "here" In the ShowNote Function? A new function?
You say
Quote:what do I do with the three dots (...) after ShowNote. What should I fill this in with?
Anything.
What do you mean? What kind of things do I put in there? What is significant of this construction?
Sorry to be so poor at programming knowledge. I have gotten so so far with your help. If I can get one simple working example I can go from there.
Thanks again,
Stuart
Posts: 11,922
Threads: 138
Joined: Dec 2002
int htb=ShowNote("notename" "some text")
int h=child("" "RichEdit20A" htb)
SendMessage h EM_SETBKGNDCOLOR 0 0x00ffff
CHARFORMAT cf.cbSize=sizeof(CHARFORMAT)
cf.dwMask=CFM_COLOR|CFM_BOLD|CFM_FACE|CFM_SIZE
cf.crTextColor=0xff0000
cf.dwEffects=CFE_BOLD
strncpy(&cf.szFaceName "Comic Sans MS" 31)
cf.yHeight=400 ;;twips
SendMessage h EM_SETCHARFORMAT SCF_ALL &cf
Posts: 1,006
Threads: 330
Joined: Mar 2007
Hi Gintaras,
Got it working perfectly! Thanks so much for your help. Now that I got a running example, I can kind of pick it apart and reverse engineer it to fully understand the syntax and flags.
Many functions in QM have some example code (calling the function) and these have been so great for learning. Some don't. I know you are so busy with many projects. Maybe the QM community can help out and offer some examples for the various functions or share more of their work on the forum.
Thanks again for everything.
Stuart
Posts: 1,769
Threads: 410
Joined: Feb 2003
so send us a screen shot of it all pimped out and let's take a look.