|
If you have ProcessID you can use of OpenProcess for get a handle to process and use of TerminateProcess
|
|
|
|
|
Can u pls tell me what happens if we ignore the token name in the macro
ex:
#define dfg
Thanks in advance.
|
|
|
|
|
Here, what the Token name means???
Come online at:-
jubinc@skype
|
|
|
|
|
It means that you've created a definition without a value. This would be used, for example, as a check if a piece of code has been compiled before, the common example is inclusion guards like
#ifndef blah
#define blah
class blah
{
}
#endif
This will compile blah the first time, and the #ifndef will fail every other time, as blah has been #defined
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hello Everybody,
I have face one problem to display list control in vc++ / mfc.
How to set different width for each sub item of list control in mfc / vc++
I want to show list control's sub items in following manner
______________________
|Heading1 |
|_____________________|
|Subject |
|_____________________|
|SubItem1 | SubItem2 |
|__________|__________|
If my problem is not possible then please give me another suggestion to display list sub item in list control.
"How to merge list control columns in MFC ?"
I think another solution of this problem by putting another list control inside sub item of upper level list control. Then one problem is face of handling event of inner list control. Because, I am want to handle user click event of Sub Item.
If it is possible then give me quick help.
Thank you
Punita Pandya
|
|
|
|
|
pandyapunita wrote: "How to merge list control columns in MFC ?"
even thought not physicaly, you can chnage the drawing in list control to appear as if they are merged. you need to handle NM_CUSTOMDRAW message for this. Check the articles in code project based on list control custom draw.
nave
|
|
|
|
|
Thank You For given reply
punita
|
|
|
|
|
Naveen R wrote: NM_CUSTOMDRAW
I try to handle "NM_CUSTOMDRAW" event for merging column. But it is not proper work to merge column.
From that I change the font color but not abstract the column.
Can any one help?
“How to merge column using Custom control event?”
For that should I implement CDRF_SKIPDEFAULT event for drawing sub item my self?
Then how to do self drawing control?
Pandya Punita
|
|
|
|
|
pandyapunita wrote: should I implement CDRF_SKIPDEFAULT
Off course i mean it. U must draw each column by your self when draw stage is CDDS_ITEMPREPAINT. And must return CDRF_SKIPDEFAULT.
nave
|
|
|
|
|
I am not as familiar with mfc.
Can you help me about draw each column by programmer.
Or you can give me any related project in which CDRF_SKIPDEFAULT return value is handle.
punita
|
|
|
|
|
try the code below
void ListCtrlEx::OnCustomDraw( NMHDR* pNMHDR_i, LRESULT* pResult_i )<br />
{<br />
NMLVCUSTOMDRAW* pLVCD = reinterpret_cast<NMLVCUSTOMDRAW*>( pNMHDR_i );<br />
NMCUSTOMDRAW &nmcd = pLVCD->nmcd;<br />
*pResult_i = CDRF_DODEFAULT;<br />
switch (nmcd.dwDrawStage)<br />
{<br />
case CDDS_PREPAINT:<br />
*pResult_i = CDRF_NOTIFYITEMDRAW;<br />
break;<br />
<br />
case CDDS_ITEMPREPAINT:<br />
{<br />
if( nmcd.dwItemSpec == 3 )<br />
{<br />
LVCOLUMN stColumn = {0};<br />
stColumn.mask = LVCF_WIDTH | LVCF_FMT;<br />
for ( int nCol=0; GetColumn( nCol, &stColumn ); ++nCol )<br />
{<br />
CRect ColumnRect;<br />
GetSubItemRect( nmcd.dwItemSpec , nCol, LVIR_LABEL, ColumnRect );<br />
CRect ColumnRect2;<br />
CString csText = "some text";<br />
if( nCol == 2 )<br />
{<br />
GetSubItemRect( nmcd.dwItemSpec , ++nCol, LVIR_LABEL, ColumnRect2 );<br />
ColumnRect.right = ColumnRect2.right;<br />
csText = "merged text";<br />
}<br />
CDC *pdc = CDC::FromHandle( nmcd.hdc ); <br />
pdc->DrawText( csText, ColumnRect, DT_SINGLELINE|DT_LEFT|DT_VCENTER );<br />
}<br />
*pResult_i = CDRF_SKIPDEFAULT;<br />
return;<br />
} <br />
*pResult_i = CDRF_DODEFAULT;<br />
break;<br />
}<br />
default:<br />
*pResult_i = CDRF_DODEFAULT;<br />
break;<br />
}<br />
}
nave
|
|
|
|
|
Naveen R wrote: GetSubItemRect( nmcd.dwItemSpec , nCol, LVIR_LABEL, ColumnRect );
How can I find proper subitem rectangle to draw text??
Punita
|
|
|
|
|
whats wrong with the GetSubItemRect?
nave
|
|
|
|
|
Sorry,
Now It is work fine.
Thank you very much Naveen to give me reply.
Punita
|
|
|
|
|
pandyapunita wrote: Thank you very much
nave
|
|
|
|
|
can someone tell me how to insert Spanish language on buttons in my MFC aplication in Visual C++ 6.0 and how to type it in code in order to get message boxes in Spanish?
zzz
|
|
|
|
|
|
my platform is xp sp2 and vs2005. I downloaded the lastest platform sdk from microsoft website. But there is no declaration of GetExtendedTcpTable in iphlpapi.h. Then i check the output section of iphlpapi.dll, and there is.
My purpose is to make the program in static link, so i neek the dll link implicitly. Is there only way i use this function by linking the dll explicitly?
Thans for everyone who give me help.
|
|
|
|
|
|
Why you write a message without title
|
|
|
|
|
I don't know why there is another message without title.
I just write a message that you replied. So I really don't know how it happened.
Sorry!
|
|
|
|
|
Maybe you click Post Message before enter subject for your question
|
|
|
|
|
|
for the benefit of other users, here[^] is your post...
|
|
|
|
|
Hi,
I am parsing C files to identify variable usage using lex and yacc.
But I am facing problem regarding macros, since a macro definition may contain some variable name. Since its within body of macro, I am not able to track the variable usage.
So I wanted to know, is there any way we can get this macro preprocessing done so that we have our C file with all macros expanded?
Any thoughts or ideas on this...please let me know
Thanks in advance.
Abhijeet Jadhav
|
|
|
|