|
Hello,Sir
How to set font of CListCtrl header?
Thank you very mush!
Help
|
|
|
|
|
let IDC_LIST1 is ID of ListCtrl,
You can use this Small Piece of code to set Font
of CListCtrl.
<font color="00ff00">
CFont m_fArial;
<font color="00ff00">
</font>
m_fArial.CreateFont
(14,0,0,0,FW_BOLD,
FALSE,FALSE,FALSE,
DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS ,
CLIP_DEFAULT_PRECIS,
DEFAULT_QUALITY,
DEFAULT_PITCH,
"Arial");
<font color="00ff00">
</font>
CListCtrl *m_pList=(CListCtrl*)GetDlgItem(IDC_LIST1);
<font color="00ff00">
</font>
if(m_pList)
m_pList->SetFont(&m_fArial);
"I Think this Will Help"
Alok Gupta visit me at http://www.thisisalok.tk
|
|
|
|
|
Thank you.
but I want to set font in CListCtrl header not item part.
Sorry. My English is very poor.
Help
|
|
|
|
|
Hi
From what I've seen there is inherently only 1 font per list control. I'd consider having an owner-draw list control, with a second font specifically for the header.
HTH
Martin
PS: Your English is fine
|
|
|
|
|
CFont m_fArial;
m_fArial.CreateFont (14,0,0,0,FW_BOLD, FALSE,FALSE,FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS , CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH, "Arial");
ListCtrlCListCtrl *m_pList = (CListCtrl*)GetDlgItem(IDC_LIST1);
if (m_pList)
m_pList->GetHeaderCtrl()->SetFont(&m_fArial);
The key here is to get a pointer to CListCtrl's embedded Header control.
onwards and upwards...
|
|
|
|
|
basementman wrote:
if (m_pList)
m_pList->GetHeaderCtrl()->SetFont(&m_fArial);
very very silly mistake by ME.
Thanks for correcting my mistake
"I Think this Will Help"
Alok Gupta visit me at http://www.thisisalok.tk
|
|
|
|
|
It work fine.
Good for you!
Thank you very much!
Help
|
|
|
|
|
I was playing around with WinXP's task manager when I noticed that some applications never deleted some of their GDI objects. i.e. I ran a standard MFC MDI app, opened a document, took note of the GDI Object count for the app and then closed the document again and noted that the GDI object count did not return to it's initial value before the document was opened. I then open the document again and again and noted that the GDI object count climbed higher and higher. All the apps I tried at first were all MFC MDI apps (including Spy++) and they all showed the same symptoms. I also tried Visio which didn't seem to have this problem.
Could this be a bug in MFC or is there something I'm missing.
|
|
|
|
|
I am having a database application which talks to any kind of databse. I tried to fetch the data from a table and insert into another. I am new to OLEDB. I am able to insert a interger value but not a string value. I am using CDynamicAccessor class. I read in MSDN that there shud be a special handling for string data which am nt able to do. Please help me out.
Thanks in Advance
|
|
|
|
|
i suggest you can take a look at this article, it's quite good!
http://www.codeproject.com/database/caaadoclass1.asp[^]
Best Wishes,
- - - - - - - - - - - - - - - - - - - - - - - - - -
Many nights we prayed with no proof anyone could hear, we were moving moutains long before we knew we could !
Yet now i'm standing here, although we know there's much to fear, hope seems like summer bird too swiftly flown away ...
There can be miracles! When you believe, though hope is frail, it's hard to kill !
Who knows what miracles, you can achieve! When you believe, somehow you will ...
YOU WILL WHEN YOU BELIEVE
|
|
|
|
|
I am using OLEDB consumer template classes not ADO.
|
|
|
|
|
Hello Everyone!
I am a chinese programer,and my english is poor.
so i need your help everyon here at the later days.
and i really want to make friend with you!!
can you tell me where are you from?whitch controy?and your email?
i will study with everyone at the follow days.
thanx.
|
|
|
|
|
Welcome here, i'm Chinese too from Wenzhou and now worked at Hangzhou.
This is quite a good place! Enjoy yourself.
- - - - - - - - - - - - - - - - - - - - - - - - - -
Many nights we prayed with no proof anyone could hear, we were moving moutains long before we knew we could !
Yet now i'm standing here, although we know there's much to fear, hope seems like summer bird too swiftly flown away ...
There can be miracles! When you believe, though hope is frail, it's hard to kill !
Who knows what miracles, you can achieve! When you believe, somehow you will ...
YOU WILL WHEN YOU BELIEVE
|
|
|
|
|
hi,
lzzqqq wrote:
I am a chinese programer
ok, i'm a french one.
lzzqqq wrote:
my english is poor.
the most important is not your "poor" english, but what you try to say, and what we understand about it.
lzzqqq wrote:
i need your help
why not...
lzzqqq wrote:
can you tell me where are you from
France, i already said it previously in this post.
For the other CPians, you could have a look a Who's who[^] page...
but if you want to know everyone here, you will have to spend much time on that pretty site, 'cause at the moment i write this, we are about a little 1,633,561 members... good luck !!!
lzzqqq wrote:
and your email?
nop, sorry, but why not to post on personal homepage[^]s for example ???
last thing. you posted this on Visual C++ discussion board. why don't you try on The Lounge[^], or better, on The Soapbox[^] instead ???
anyway, see you
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
//Try the follow code:
//IDC_EDIT1 is your CEdit control's resource ID.
void CmscprojDlg::OnBnClickedEdit()
{
char szFileName[MAX_PATH]={NULL};
GetDlgItem(IDC_EDIT1)->GetWindowText(szFileName,MAX_PATH);
char szCommand[1024]={"NOTEPAD.EXE "};
strcat(szCommand,szFileName);
WinExec(szCommand,SW_SHOW);
}
|
|
|
|
|
the szCommand run like
"NOTEPAD.EXE C:\china.txt"
|
|
|
|
|
How can I plot graphs using VC++?
|
|
|
|
|
By buying some graph ActiveX components, or perhaps download some free graph ActiveX components or, dare I say it?, write your own graph ActiveX component.
Google is your friend, if you lack imagination try: "+'Graph'+'ActiveX'+'download'".
There are probably also some free components here at CP in the articles fora.
"After all it's just text at the end of the day. - Colin Davies
"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
|
|
|
|
|
I want to send a Alt +A message to a Window, like this:
dwTID = GetWindowThreadProcessId(handle,&dwPID);<br />
::PostThreadMessage(dwTID, WM_SYSKEYDOWN, 'A', 0x20000001);<br />
::PostThreadMessage(dwTID, WM_SYSKEYUP, 'A', 0x20000001);
it can't work. when i chang the prog like this
::SetForegroundWindow(handle);<br />
keybd_event(VK_MENU, 0, KEYEVENTF_EXTENDEDKEY | 0, 0);<br />
keybd_event('A', 0, KEYEVENTF_EXTENDEDKEY | 0, 0);<br />
keybd_event(VK_MENU, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);<br />
keybd_event('A', 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
it 's ok.why?
and i want't to put the window on foreground,how to do it?
thanks alot!
|
|
|
|
|
i think that the message can't translate data with two process. so the first method is failed.
|
|
|
|
|
Hi, i'm working in a vision system (artificial vision with a webcam), and i have de adquisition module writed in visual C++ 6.0, and the treatment processes of images writed in matlab. I've already include de matlab source in the visual c++ project, but i need to send the image in memory (a buffer) to the matlab module.
does anyone know what kind of transformation do i must do to my buffer?
or can you explain me how "matlab to VC's traslated source" manipulate the images when the "imread" command were used?
any help will be welcome.
thanks
Keep Working!
=============================
LONEWOLF4
Oscar Ramírez Torres Oscar
Cd. Madero, Tamaulipas, México
LW4_2004@hotmail.com
=============================
|
|
|
|
|
How can i check the internet connection, also how can i get recieved bytes from int. connection??
|
|
|
|
|
utkumanyaksalak wrote:
How can i check the internet connection
use InternetGetConnectedState
utkumanyaksalak wrote:
how can i get recieved bytes from int. connection??
"I Think this Will Help"
Alok Gupta visit me at http://www.thisisalok.tk
|
|
|
|
|
Yes thanks i understand first one...
"how can i get recieved bytes from int. connection?? "
I mean, How can i show internet traffic monitor on my application?
|
|
|
|
|
utkumanyaksalak wrote:
I mean, How can i show internet traffic monitor on my application?
use api getiftable and search for IPHELPER in you local copy of MSDN.
"I Think this Will Help"
Alok Gupta visit me at http://www.thisisalok.tk
|
|
|
|
|