|
Yes!
That was it, thank you!
- Sean
|
|
|
|
|
Is it possible to hide a list control item with CListCtrl::SetItemState as described in the MSDN Library:
"An application might change other state bits to disable or hide the item, or to specify an overlay image or state image."
|
|
|
|
|
It looks like bug in the documentation. They only list the following item styles: LVIS_CUT, LVIS_DROPHILITED, LVIS_FOCUSED and LVIS_SELECTED. The closest thing to item hiding would be setting the state to LVIS_CUT - Windows shell uses this style to display file icon after 'Cut' command.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Hi
Ive a MSFLexgrid control which fetches data from a database.how do i print the data's from the control.
Im using VC++/MFC Framework for developing this application?
Your help will be appreciated.
|
|
|
|
|
i have a little problem in an application where i use ado method to catch value from excel.
So, i have created an dialog box with a button which could getting data from a selected called database. the first aim of this application is to read all the first field of the database and find the same value that the value given in the dialog box by the user.
When i try to run the application, I could push my button but I have the message box which appears with this message:"Database Error cannot update Database or object is read-only"
So, anybody could explain me what happen?
thanks
gerald
|
|
|
|
|
Hi all,
I want to create files of my own defined extension and also want to have icon for them of my choice(that will i made in VC++ resouce editor). How can i assign my own made icon to file. Plz tell me as early as possible if anyone know solution.
Regards
Abid
|
|
|
|
|
can i get a skeleton code for an application developed on Win CE.
This is basically to test the bluetooth device working.
N.BHARADWAJ
Software Engineer
MICROCON INTERNATIONAL LIMITED
BANGALORE.
|
|
|
|
|
I need the specification given to software developer to write driver for any device.
Like memory, I/O, IRQ, Registry and so.on.
kindly reply
N.BHARADWAJ
Software Engineer
MICROCON INTERNATIONAL LIMITED
BANGALORE.
|
|
|
|
|
Hi All,
I've just discovered I can handle the various kernel exceptiions, like 0xc0000005 : Access Violation by using:
catch (...) {
}
Is it common knowledge that this can be done? Why doesn't everyone handle GPFs etc like this (nicely)...
By the way, does the caught exception have a type?
nb
|
|
|
|
|
Answered my own question- you can only catch them with the ellipsis
if anyone's interested in this, check out _set_se_translator() in the MSDN
cheers
\
nb
|
|
|
|
|
Hi,
I'm creating an ActiveX control to be embedded into a web page. This control contains a child dialog with a number of controls in it. The problem is that certain key presses are not received by this child dialog, specifically, TAB, cursor keys and (importantly) Backspace.
I understand that certain key presses such as TAB and cursor keys require PreTranslateMessage to be overridden in the COleControl derived class. I have done this.
I also know that I should be calling LockInPlaceActive on the control when it is activated so that I can capture these WM_KEYDOWN messages, but when I debug this control when it is embedded into a web page (and viewed in Internet Explorer), LockInPlaceActive always returns FALSE.
Does Internet Explorer disallow in place active? Is there any way that pressing Backspace in a child Edit control of the ActiveX control will actually edit the text rather than returning to the previous web page?
Thanks in advance.
Derek Waters
|
|
|
|
|
You need to implement IInputObject to receive those keystrokes. Search for IInputObject in MSDN - I know I've come across at least one article that describes how to do what you want.
--Mike--
http://home.inreach.com/mdunn/
"Holding the away team at bay with a non-functioning phaser was an act of unmitigated gall. I admire gall."
-- Lt. Cmdr. Worf
|
|
|
|
|
Thanks Michael,
I actually found that Knowledge Base article "Q168777 - PRB: MFC ActiveX Control in IE Doesn't Detect Keystrokes" helped (with a bit of fiddling).
Derek.
|
|
|
|
|
Hello All
I use ClassWizard to generate a class derived from COleDispatchDriver to warp around a COM object, but the
method that get generated say "method 'SessionOpened' not emitted because of invalid return type or parameter type"
anyone has any idea why??
psksvp/
========================
class INoteAcceptorEvents : public COleDispatchDriver
{
public:
INoteAcceptorEvents() {} // Calls COleDispatchDriver default constructor
INoteAcceptorEvents(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
INoteAcceptorEvents(const INoteAcceptorEvents& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
// Attributes
public:
// Operations
public:
// method 'SessionOpened' not emitted because of invalid return type or parameter type
// method 'SessionClosed' not emitted because of invalid return type or parameter type
// method 'UnableToOpenSession' not emitted because of invalid return type or parameter type
// method 'LockGranted' not emitted because of invalid return type or parameter type
// method 'LockTimeOut' not emitted because of invalid return type or parameter type
// method 'LockReleased' not emitted because of invalid return type or parameter type
// method 'AvailabilityChanged' not emitted because of invalid return type or parameter type
// method 'XFSErrorEvent' not emitted because of invalid return type or parameter type
// method 'BanknotesEncashed' not emitted because of invalid return type or parameter type
// method 'BanknoteProcessingComplete' not emitted because of invalid return type or parameter type
// method 'BanknotesRefunded' not emitted because of invalid return type or parameter type
// method 'BankNotesInRefundSlotError' not emitted because of invalid return type or parameter type
// method 'BanknotesRejected' not emitted because of invalid return type or parameter type
// method 'BanknotesTaken' not emitted because of invalid return type or parameter type
// method 'Enabled' not emitted because of invalid return type or parameter type
// method 'EscrowFull' not emitted because of invalid return type or parameter type
// method 'NoBanknotesEntered' not emitted because of invalid return type or parameter type
// method 'UnableToEnable' not emitted because of invalid return type or parameter type
// method 'UnableToEncash' not emitted because of invalid return type or parameter type
// method 'UnableToRefund' not emitted because of invalid return type or parameter type
// method 'BanknotesInserted' not emitted because of invalid return type or parameter type
// method 'UnableToClear' not emitted because of invalid return type or parameter type
// method 'Cleared' not emitted because of invalid return type or parameter type
// method 'BanknotesWithdrawn' not emitted because of invalid return type or parameter type
// method 'BNAExceptionEvent' not emitted because of invalid return type or parameter type
};
|
|
|
|
|
Are the intefaces of the COM object using oleautomation compatible types ? It could be that you are trying to make a wrapper object for a COM object with a custom (c++) interface by using COleDispatchDriver.
-Nick-
|
|
|
|
|
I'm VERY new to vc++. I am attempting to use DAO's findfirst function. All works OK unless there is an apostophe in the query string (for example "Joe's Place").
Code sample:
m_pMySet->FindFirst("[Favorite Bars] = 'Joe's Place'");
Will not work, but
m_pMySet->FindFirst("[Favorite Bars] = 'Joes Place'");
will.
Any help appreciated
Richard
|
|
|
|
|
Hi!
Try doubling up on apostrophes within the string you're looking for... e.g.:
m_pMySet->FindFirst ("[Favourite Bars] = 'Joe''s Place'");
this is how SQL Server treats them, anyway
nb
|
|
|
|
|
Thans Nick,
I'll give it a try!
Richard
|
|
|
|
|
Hi,
In this example Favorite Bars is field name ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hi,
Yes Favourite Bars is a field name. FindFirst works OK until a key is passed that contains an apostrophe (Joe's Place, for example). I've tried everything I know to work around this (which isn't much).
All ideas appreciated!
Richard
|
|
|
|
|
How can I
type cast a CString to a LPTSTR
to avoid this error:
'type cast' : cannot convert from 'char *(__thiscall CString::*)(int)' to 'char *'
|
|
|
|
|
Try CString::GetBuffer.;)
Oscar L.
|
|
|
|
|
I did but I get a type cast error too.
|
|
|
|
|
Code problem:
This is the structure of rvi:
typedef struct _RVITEM
{
UINT nMask;
INT iItem;
INT iSubItem;
LPTSTR lpszText;
INT iTextMax;
INT iTextColor;
INT iImage;
INT iCheck;
INT iBkColor;
UINT nPreview;
INT iIndent;
UINT nState;
LPARAM lParam;
INT iOverlay;
_RVITEM() : nMask(0), iItem(RVI_INVALID), iSubItem(-1), lpszText(NULL), iTextMax(0), iTextColor(-1), iImage(-1), iCheck(-1), iBkColor(-1), nPreview(0), iIndent(-1), nState(0), lParam(0), iOverlay(0) {};
} RVITEM, FAR* LPRVITEM;
CString strDato;
//The followin returns a CString: pBdeDb->GetFieldAsString(1,&bIsBlank);
strDato = pBdeDb->GetFieldAsString(1,&bIsBlank);
//strncpy(strDato, Dato, strDato.GetLength());
rvi.iSubItem = 0;
rvi.lpszText = strDato.GetBuffer;//<--------------Problem---------
rc.SetItem(&rvi);
|
|
|
|
|
Sorry. Use -> strDato.GetBuffer(0);
But, remember that this buffer is temporary if strDato is local variable.!! To avoid this, create a buffer :
rvi.lpszText = new char[strDato.GetLength()];
strcpy(rvi.lpszText, strDato);
Oscar L.
|
|
|
|