Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Font Settings in ShowNote
#1
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
#2
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.
#3
...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
#4
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)
#5
The text between SendMessage and SendMessage in Dialog_richedit_colors
is
Code:
Copy      Help
    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

Code:
Copy      Help
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]
#6
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.
#7
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

Code:
Copy      Help
int h=child("" "RichEdit20" htb)
line

Code:
Copy      Help
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
#8
Code:
Copy      Help
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
#9
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
#10
so send us a screen shot of it all pimped out and let's take a look.
An old blog on QM coding and automation.

The Macro Hook


Forum Jump:


Users browsing this thread: 1 Guest(s)