|
ok ok
nave
|
|
|
|
|
sivaprakashshanmugam wrote: ry
{
}
catch(CException *objException)
{
}
try catching com based error through _com_error wrapper class
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Is there any subset of Win32API that is capable of dealing with TrueType Fonts like picking up a Glyph from the TrueType and rasterizing it.... (While the font is'nt installed in Fonts folder)
Please let me know...
Best regards,
Mohsin Hijazee
Polite Programmer
More Object Oriented then C#
|
|
|
|
|
See AddFontResourceEx( , R_PRIVATE, ) to load a font from a file into the application space.
Once the font is added to the application space you can get a font handle just like you would for a system font, load it into a DC (bitmap), and then write the required text to the DC.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
TrueType Fonts is new in the .NET Framework version 2.0.
So use the following namespace to get that,
System.Windows.Forms.VisualStyles Namespace
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
Uh.. which part of Win32 API did you not understand?
|
|
|
|
|
Hi,
I have a used the list box to display the output of the function, Function generates output like
Required Output in the list box.
Filename1
213,456,645,654,647,990
Filename2
534,534,534,543,534,534
Filename3
434,545,655,765,788,1422
Output generated,
213
456
645
654
647
990
534
534
534
543
534
534
434
545
655
765
788
1422
Filename1
Filename2
Filename3
---------------------------------
Function :-
void CSearchDlg :: disp ()
{ int i = 0;
while (strlen (shWord[i].file_name) > 1)
{
m_SOUT.AddString(shWord[i].file_name);
int k = 0;
while (shWord[i].w_offset[k] != -1) {
TCHAR buffer[50];
int f=shWord[i].w_offset[k];
_itoa(f,buffer,10);
m_SOUT.AddString(buffer);
k++;
}
i++;
}
}
-------------------------------------------------
Can anyone help with this function and to generate proper output in the list box.
|
|
|
|
|
I guess your ListBox items are getting sorted. Disable sorting and check.
Nibu thomas
Software Developer
Programming Tips[^]
|
|
|
|
|
Hi Nibu thomas,
Thanks a lot ,yes i had forgot to disable the sort ,
Now its working fine....
|
|
|
|
|
vinaycool wrote: Thanks a lot ,yes i had forgot to disable the sort ,
Now its working fine....
You're welcome.
Nibu thomas
Software Developer
Programming Tips[^]
|
|
|
|
|
vinaycool wrote:
Can anyone help with this function and to generate proper output in the list box.
Try the following code
void CSearchDlg :: disp ()
{
int i = 0;
while (strlen (shWord[i].file_name) > 1)
{
m_SOUT.AddString(shWord[i].file_name);
int k = 0;
TCHAR buff[100];
strcpy(buff,"\0");
while (shWord[i].w_offset[k] != -1)
{
TCHAR buffer[50];
int f=shWord[i].w_offset[k];
_itoa(f,buffer,10);
strcat(buff,buffer);
strcat(buff,",");
k++;
}
buff[strlen(buff)-1]='\0';
m_SOUT.AddString(buff);
i++;
}
} As well use proper indentation, so that others can understand your code.
I have not tested the code, hope this works
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Hi Laxman,
Thank you very much for formating the output,code is working great....
I had used indentation,after copy paste of code it was altered....
Thanks once again .....
|
|
|
|
|
Hi,
I have a Custom ListCtrl in my application. I have to resize this listCtrl as and when the Size of the View changes. A tried a lot but the only this i am able to do is To change the ColumnWidth of Header Tabs acc. to the Size of the View.
Plz help me out......
Vinod C S
|
|
|
|
|
vinivc wrote: I have a Custom ListCtrl in my application. I have to resize this listCtrl as and when the Size of the View changes. A tried a lot but the only this i am able to do is To change the ColumnWidth of Header Tabs acc. to the Size of the View.
Plz help me out......
See the following link
http://www.codeproject.com/listctrl/xlistctrl.asp
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
try this
LVCOLUMN stColumn = { 0 };
stColumn.mask = LVCF_WIDTH;
stColumn.cx = 100/ the widht u required
m_List.SetColumn( nColumnnNumber, &stColumn );
nave
|
|
|
|
|
Naveen R wrote: try thisLVCOLUMN stColumn = { 0 };stColumn.mask = LVCF_WIDTH;stColumn.cx = 100/ the widht u requiredm_List.SetColumn( nColumnnNumber, &stColumn );
How can we Increase or decrease the Size of listctrl by using it.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
only size the header ctrl
nave
|
|
|
|
|
Naveen R wrote: only size the header ctrl
Sorry to be sound rude.I believe that is not the question?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
vinivc wrote: have a Custom ListCtrl in my application. I have to resize this listCtrl as and when the Size of the View changes. A tried a lot but the only this i am able to do is To change the ColumnWidth of Header Tabs acc. to the Size of the View.
Handle WM_SIZE message in View and use SetWindowPos or MoveWindow api to change size of the ListCtrl accordingly.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
the following is the code I found in MSDN.
Anybody can explain about the hatchbits? I didnt get anything from the code.
See the code below
// Create a hatched bit pattern.
WORD HatchBits[8] = { 0x11, 0x22, 0x44, 0x88, 0x11,
0x22, 0x44, 0x88 };
// Use the bit pattern to create a bitmap.
CBitmap bm;
bm.CreateBitmap(8,8,1,1, HatchBits);
// Create a pattern brush from the bitmap.
CBrush brush;
brush.CreatePatternBrush(&bm);
// Select the brush into a device context, and draw.
CBrush* pOldBrush = (CBrush*)pDC->SelectObject(&brush);
pDC->RoundRect(CRect(50, 50, 200, 200), CPoint(10,10));
// Restore the original brush.
pDC->SelectObject(pOldBrush);
SaRath
|
|
|
|
|
SaRath bm.CreateBitmap(8,8,1,1, HatchBits);
You are creating an 8x8 pixel monochrome bitmap. In the supplied bits array a bit of 0 will be black and a bit of 1 will be white. As a byte is 8 bits, you need 8 bytes to get the required number of bits for the bitmap (8x8).
So what you have is:
BYTE Bits Colours
0x88 10001000 |* * |
0x44 01000100 | * * |
0x22 00100010 | * * |
0x11 00010001 | * *|
0x88 10001000 |* * |
0x44 01000100 | * * |
0x22 00100010 | * * |
0x11 00010001 | * *| which is a bit-pattern bitmap.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
thanks for your reply.
I saw a nice article regarding this.
http://www.codeproject.com/gdi/custom_pattern_brush.asp
Once again thanks for ur reply
SaRath
|
|
|
|
|
Hi,
My Application is Dialoged based Application
My application will be launched by another application using ShellExecute().
As it will start running it will have no user interaction that means user will manualy not trigger any event like clicking on button or so.
My application will display only data in some listbox or in MultiEdit box countiniously. ( basicaly its purpose is to show data/results)
As the dialog will cross OnInitDialog then it will wait for user's interaction , but in my application user has no interaction.
Can I handle this all in OnInitDialog() before returning of this method. Is it a right approach
OR Is there any other way to handle it .
thanks
Regards.
|
|
|
|
|
zahid_ash wrote: As it will start running it will have no user interaction that means user will manualy not trigger any event like clicking on button or so.
I think this will solve by setting the Dialog Style as 'Disabled'
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Would the setting to Disable will run the calculation menthods by itself,
I think I have to call them some where in the application,
Regards.
|
|
|
|