If ur ok 2 handle Ownerdraw then just override MeasurItem and set the item hight as u like by using the struct parameter in MesureItem.
Mil10
Posts
-
can i set the height of the item in CListViewCtrl and add a image for every item? -
How to write text to desktopAn alternative is use
GetDc(GetDsktopWindow())->DrawText("skjjkajsa",x,y,whatever the params....)
-
Detecting workstation accessHi What about
c:\>NET Session
at the command prompt. best wishes ...mil10 -
Display name of componentsHi, What Victor mentioned is correct. Modifying the helpstring in IDL/ODL, will reflect in the tlb listing dlg. If you are not getting it, might be somthiing else is wrong. best wishes..mil10
-
HOW TO IMPORT A TAB DELIMITED TEXT FILE INTO AN ACCESS DATABSE PROGRAMMATICALLY?Hi, BUlk insertion is not possible in MS Access, but u can do it in Sql Server, just chk out the documentation of
BULK INSERT
in MSDN, and use_ConnectionPtr
to connect to datasource using ADO. best wishes..mil10 -
trap a-z keys!!!Not clear from where u want to trap the keys. if it is from ur app dialog just use ON_WM_KEYDOWN - OnKeyDown msg handler. Otherwise, if u want system wide key trap , see documentaion of the API SetWindowsHookEx. Best wishes..mil10
-
default properties on COM interfacesSeems very strange..if u mind to send me the source code I am ok to debug. otherwise try unregister/reregister or more safely try on another mechine. Because I had faced almost simialr prblm early. Initialy the DISP_ID was 1. After registration with 1, I changed it to 0 to set it as default. Again registred the component but, showed err in my mechine but worked fine in another mechine( with fresh registry entries). best wishes..mil10
-
default properties on COM interfacesTry to debug into
CField::put_Value
from vb exe and see what is happening insideCField::put_Value
. Since u r not a vb prgmr , i donno whether u familier with debugging into an atl dll from vb. anyway FYI - Just create the vb app with the codemsg.Segment.Field = "blahh"
into an EXE. Then change ATL project build setting to Win32Debug Goto "Project->Settings->Debug->Executable for debug session:" and browse the VB exe path into the text field. Put break point inCField::put_Value
, then run the ATL project by F5. best wishes..mil10 -
Property sheet in MDI projecthi Just declare a member variable of your propertysheet class in the view class, override OnInitialUpdate, create the member propertysheet as a child.
void CMdiView::OnInitialUpdate() { CView::OnInitialUpdate(); CMySheet *m_pMySheet = new CMySheet("foooo"); m_pMySheet->Create(this,WS_CHILD|WS_VISIBLE,0); }
best wishes..mil10 -
Shockwave Flash in dialogHi Give the full path of swf file (
m_FlashCtrl.put_Movie(_T("c:\sample.swf"));
) and try. Best wishes..mil10 -
default properties on COM interfacesHi Dave,
Dim fld As Test.Field fld = msg.Segment.Field fld = "blah" This always works
I couldn't understand how the code above works without error. Because 'fld' is just a variable of type IField, not an instance of IField. So the statement 'fld = msg.Segment.Field' shouldn't work. Even if u r callingCComObject<CField>* pFld; hRes = CComObject<CField>::CreateInstance(&pFld);
inSegment
, that line should be**set** fld = msg.Segment.Field
. Thenfld = "blah"
is ok. Because now field is refering to an active instance of IField in 'msg.Segment' Sameway ifmsg.Segment.Field = "blahh"
gives a type mismatch error, thenmsg.Segment.Field
might not be an active instance, make sure u had calledhRes = CComObject<CField>::CreateInstance(&pFld);
does this make sense...? best wishes ... mil10. -
COM/ASPHi, Yes u r right. IScriptingContext interface - as per MSDN, it's an obsolete interface. But , still u can use it. Because it is working even in IIS6.0 U can also use IObjectContext if your component need com+ transaction support. Otherwise IScriptingContext is enough. (But use at ur risk ;). Because future versions of IIS may stop supporting IScriptingContext). U can use microsoft provided wrapper class Context.cpp and Context.h to get the ASP objects from IObjectContext. best wishes...take care ..bi..mil10