Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
GeneralRe: Justify alignment in c# ritchtextbox control!!! Pin
Heath Stewart29-Apr-04 4:48
protectorHeath Stewart29-Apr-04 4:48 
GeneralRe: Justify alignment in c# ritchtextbox control!!! Pin
hassan azizi29-Apr-04 12:24
hassan azizi29-Apr-04 12:24 
GeneralRe: Justify alignment in c# ritchtextbox control!!! Pin
Heath Stewart29-Apr-04 14:08
protectorHeath Stewart29-Apr-04 14:08 
GeneralRe: Justify alignment in c# ritchtextbox control!!! Pin
hassan azizi1-May-04 7:49
hassan azizi1-May-04 7:49 
GeneralRe: Justify alignment in c# ritchtextbox control!!! Pin
Heath Stewart1-May-04 9:05
protectorHeath Stewart1-May-04 9:05 
GeneralRe: Justify alignment in c# ritchtextbox control!!! Pin
hassan azizi1-May-04 14:19
hassan azizi1-May-04 14:19 
GeneralRe: Justify alignment in c# ritchtextbox control!!! Pin
Heath Stewart1-May-04 14:23
protectorHeath Stewart1-May-04 14:23 
GeneralRe: Justify alignment in c# ritchtextbox control!!! Pin
hassan azizi1-May-04 14:57
hassan azizi1-May-04 14:57 
ifound that :
#define WM_USER 0x0400
i use send message like below :

..........
public const int EM_SETPARAFORMAT = 1095;
[DllImport("user32.dll")]
private static extern int SendMessage(IntPtr hWnd, [MarshalAs(UnmanagedType.U4)] int msg,
int wParam, ref PARAFORMAT2 format);
[StructLayout(LayoutKind.Sequential)]
public struct PARAFORMAT2
{
public UInt16 cbSize;
public UInt64 dwMask;
public double wNumbering;
public double wEffects;
public long dxStartIndent;
public long dxRightIndent;
public long dxOffset;
public double wAlignment;
public short cTabCount;
public long[] rgxTabs;
public long dySpaceBefore;
public long dySpaceAfter;
public long dyLineSpacing;
public short sStyle;
public Byte bLineSpacingRule;
public Byte bOutlineLevel;
public double wShadingWeight;
public double wShadingStyle;
public double wNumberingStart;
public double wNumberingStyle;
public double wNumberingTab;
public double wBorderSpace;
public double wBorderWidth;
public double wBorders;
};


PARAFORMAT2 Format = new PARAFORMAT2();
Format.dwMask = 0x0008;
Format.wAlignment = 0x0004;
Format.wNumbering = 0;
Format.cbSize = (UInt16)Marshal.SizeOf(Format);
Format.wEffects = 0x00400000;
Format.rgxTabs = new long[]{0};
Format.cTabCount = 1;
Format.bOutlineLevel= 0;
SendMessage(PickControl.SelectedControl.Handle,EM_SETPARAFORMAT,0,ref Format);

...........

but it's execution takes no effect to my richtextbox!
and sendmessage returns zero value!
what is my problem?
GeneralRe: Justify alignment in c# ritchtextbox control!!! Pin
Heath Stewart2-May-04 5:55
protectorHeath Stewart2-May-04 5:55 
GeneralRe: Justify alignment in c# ritchtextbox control!!! Pin
hassan azizi2-May-04 9:18
hassan azizi2-May-04 9:18 
GeneralRe: Justify alignment in c# ritchtextbox control!!! Pin
Heath Stewart2-May-04 10:09
protectorHeath Stewart2-May-04 10:09 
GeneralRe: Justify alignment in c# ritchtextbox control!!! Pin
ZyX3-Aug-10 3:32
ZyX3-Aug-10 3:32 
Questionis there any free rtf parser component? Pin
hassan azizi28-Apr-04 22:39
hassan azizi28-Apr-04 22:39 
AnswerRe: is there any free rtf parser component? Pin
Heath Stewart29-Apr-04 3:48
protectorHeath Stewart29-Apr-04 3:48 
GeneralRe: is there any free rtf parser component? Pin
hassan azizi29-Apr-04 12:21
hassan azizi29-Apr-04 12:21 
AnswerRe: is there any free rtf parser component? Pin
Anonymous29-Apr-04 4:51
Anonymous29-Apr-04 4:51 
Questionwhy does this not work? Pin
robmays28-Apr-04 22:19
robmays28-Apr-04 22:19 
AnswerRe: why does this not work? Pin
Corinna John28-Apr-04 22:31
Corinna John28-Apr-04 22:31 
GeneralRe: why does this not work? Pin
robmays28-Apr-04 22:36
robmays28-Apr-04 22:36 
GeneralRe: why does this not work? Pin
robmays28-Apr-04 22:44
robmays28-Apr-04 22:44 
Questionhow can i create a new bitmap file? Pin
lowiq28-Apr-04 20:35
lowiq28-Apr-04 20:35 
AnswerRe: how can i create a new bitmap file? Pin
CWIZO28-Apr-04 20:58
CWIZO28-Apr-04 20:58 
GeneralRe: how can i create a new bitmap file? Pin
lowiq29-Apr-04 3:42
lowiq29-Apr-04 3:42 
AnswerRe: how can i create a new bitmap file? Pin
Heath Stewart29-Apr-04 3:44
protectorHeath Stewart29-Apr-04 3:44 
GeneralPerformance Issues Pin
Member 105947128-Apr-04 19:59
Member 105947128-Apr-04 19:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.