|
additionally, there's another simple way to do it...
Convert the string to a global atom: GlobalAddAtom
ATOM GlobalAddAtom( LPCTSTR lpString );
this converts the string to a handle -- which you can transmit via Post/Send Message to any other process. Use GlobalGetAtomName() on the other end to convert it back.
It's a simple way to send small strings (255 chars or less).
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.santacruznetworks.com">Santa Cruz Networks</A>
|
|
|
|
|
Hello all,
I am using a CSplitterWnd. I would like to prevent the user from dragging
the splitter any closer than a certain distance from the edge of the window.
I found that CSplitterWnd::SetRowInfo() and CSplitterWnd::SetColInfo() allow
you to set a "minimum" size. However, it's not the case that the user can't
drag the splitter past this minimum. It's just that if he does so drag the
splitter, the window size will become 0.
Is there a way to do what I wish and pysically disallow the splitter to move
past a certain point?
Thanks,
Jitendra
|
|
|
|
|
I'm wrote a simple code to creates a empty Dialog. But I've an exception with him. Why?
DLGTEMPLATE dlg;
dlg.x = 0;
dlg.y = 0;
dlg.cx = 200;
dlg.cy = 200;
dlg.style = WS_BORDER|WS_CHILD|WS_VISIBLE;
dlg.dwExtendedStyle = 0;
dlg.cdit = 0;
CDialog Dialog;
Dialog.InitModalIndirect(&dlg);
DoModal();
Best regards,
Eugene Pustovoyt
ICQ UIN: 161325180
|
|
|
|
|
From MSDN: "To create a modal dialog box indirectly, first allocate a global block of memory and fill it with the dialog box template. Then call the empty CDialog constructor to construct the dialog-box object. Next, call InitModalIndirect to store your handle to the in-memory dialog-box template."
Here is the most IMPORTANT part:
"first allocate a global block of memory"
It does not matter which version of InitModalIndirect you call, the DLGTEMPLATE must be in a globaly allocated memory block. That means using GlobalAlloc(...).
If this is not the cause of exception, then the MSDN remarks section may be wrong.
The only question that remains is: who is responsible for freeing the memeory?
Search the MSDN for the sample code:
"DLGTEMPL: Creating Dialog Templates Dynamically"
Good Luck!
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
Hi all
can anyone recommend the best way of accessing an omnis database ?
at the moment im using an mfc odbc consumer class connection using crecordset to access it
but it sooo slow when querying
or maybe anyone knows how to export the tables from omnis to say access in c++
any ideas
thanks
si
|
|
|
|
|
I'm creating a library with som custom controls. How can I have a bitmap drawn on a custom button?
When the button control is in a .lib - where to put the image?
What about resource conflicts?
Thanks for any comment
|
|
|
|
|
Put them in a DLL or ActiveX library, both types of libraries have there own resources. Their resources can not conflict with your resources, unless the DLL treats externaly supplied resource IDs the same as internaly supplied IDs.
For buttons:
http://www.codeproject.com/buttonctrl/[^]
For libraries visit the COM or Libraries section of codeproject.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
To make it simple, I made this small utility that converts a binary file into an array of unsigned chars for the compiler to read. This enables me to #include the binary chunk directly into the source.
Wooh, does this smell like good old times..
|
|
|
|
|
Hi,
I'm using SQLBulkOperations(m_hstmt,SQL_ADD) in one of my methods when trying to bulk copy a table from one db to another.
It was tested and worked fine for copying from Oracle to mdb, but when trying to copy from mdb to oracle or oracle to oracle I get SQL_NEED_DATA.
I checked over and over and the code seems fine to me (buffers were created and assigned). The SQLBulkOperation call looks like these:
ODBC_CALL(::SQLSetStmtAttr(m_hstmt, SQL_ATTR_ROW_ARRAY_SIZE, (void*)wRow, 0));
if(!Check(nRetCode)){
}
ODBC_CALL(::SQLBulkOperations(m_hstmt,SQL_ADD));
Can anyone help ?
Thanks
|
|
|
|
|
Hello Friends,
I am using CFormView on which I have a combo box and a Tree Control. When any item is being inserted depending upon some boolean variable the color for the item should be either red or black.
For example;
bool valid = false;
if(valid)
treecontrol item text color = red;
else
treecontrol item text color = black;
I am not using CTreeView, but I have CFormView on which they are two controls.
I am not able to set the color for the individual items.
Please help regarding the above matter.
Thanks in Advance.
Neelesh K J Jain.
|
|
|
|
|
Neelesh K J Jain wrote:
I am not able to set the color for the individual items
Thats because there are no options to set individual display properties, both for the Tree Control and the List Control.
If you need such control, have a look at using Custom Drawing. Take a look at this[^] and this[^] to start.
I Dream of Absolute Zero
|
|
|
|
|
I am trying to implement a web page filter. I define the invoke method and pass the IE events to my application thanks to the Advise method. It works well but I can only obtain the content of the current page when the DOCUMENTCOMPLETE event is triggered. I would like to have it when the BEFORENAVIGATE2 event is triggered to prevent some pages from displaying. It would also fit to tell IE to wait until a page is completely download before displaying it. I am trying to get the HTML content of a web page before IE starts displaying it. I don't know how to do it.
Thanks for your help.
|
|
|
|
|
|
EDIT CONTROL looses the connection
Hi,
I am currently working on a program in VISUAL C ++ 6.0 (MFC) in which I would like to include an ADO DATA CONTROL 6.0 and a MS MASKED EDIT CONTROL.
The EDIT CONTROL is connected with the DATA CONTROL after program start-up.
All desired fields are indicated with the EDIT CONTROL.
Should the RECORDS SOURCE of the DATA Controls be changed or be limited during the runtime , the EDIT CONTROL looses the connection to the DATA CONTROL.
I have already tried everything REFRESH ()..., BindDefaultProperty or BindProperty, unfortunately, without success.
I could not find a Solution to this problem or topic even in the Internet.
I would be thankful for a hint or for your assistance.
thanks
elo4711
|
|
|
|
|
hi all the experts,
i'm glad that at last i found a place where i can look for helps.i'm
now doin my final year project using the 8bit Rabbit microprocessor
(RCM3400). i'm developing a wireless tracking system using the GPS
and the rabbit microprocessor.what i'm planning to do is i wish to
add in the speech recognition function to help turn on the system.i wish some feedback or guideline on how to programm the speech
recignition into my rabbit microprocessor.is it hard?what i am worry
about is whether the microprocessor that i'm using suitable for this
function or not.all i wish to do is just a very simple or maybe low
end speech recognition.
Regards,
Joneo
|
|
|
|
|
I'm sure it involve LVS_EX_GRIDLINES attribute.
but ClistCtrl::SetExtendedStyle(LVS_EX_GRIDLINES | LVS_REPORT);
didn't work!
|
|
|
|
|
maybe LVS_REPORT has to be set through
ClistCtrl::SetStyle( LVS_REPORT );
and then try setting
ClistCtrl::SetExtendedStyle( GetExtendedStyle() | LVS_EX_GRIDLINES );
i think that LVS_EX_... means Extended style, and can be set only through SetExtendedStyle()
|
|
|
|
|
Hi, What's wrong with my VC++ 5.0 Compiler? It complains,
C:\VC\excel\excelDlg.cpp(130) : error C2039: 'SetStyle' : is not a member of 'CListCtrl'
C:\VC\excel\excelDlg.cpp(131) : error C2039: 'SetExtendedStyle' : is not a member of 'CListCtrl'
C:\VC\excel\excelDlg.cpp(131) : error C2039: 'GetExtendedStyle' : is not a member of 'CListCtrl'
Or You guys are wrong.;P
|
|
|
|
|
If you ever dealt with CAB-project this might be an easy question.
I’ve created a CAB-project and added an .ocx (ActiveX). When adding the CAB to my webpage the ActiveX will be registered and works good.
The problem is that my .ocx now uses a .dll that I also want to be registered so it can be used properly.
When I’m adding the .dll to the CAB-project that already contains my .ocx it doesn’t become registered when users loads my CAB. (The .ocx is still registered accurately.)
How do I make One CAB-file and force all it’s containing files (dll’s and ocx’s) to be registered?
When I make a new CAB-project and only adds the .dll it is registered as it should be.
_____________________________
...and justice for all
APe
|
|
|
|
|
In the Open File common dialog, is it possible to modify the "places" bar (the list where Desktop, My Files, Network environment etc. are displayed)
Our software offers standard locations for certain file types, which I'd like to put there.
we are here to help each other get through this thing, whatever it is Vonnegut jr. boost your code || Fold With Us! || sighist | doxygen
|
|
|
|
|
|
See my reply here.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
hi all,
I am doing a Project using MFC and Access DataBase.In the Access Database, there is a Field called "Details" which data type is "OLE Object"..
How do we retrieve Valid data from that field using C++.?
I am trying like this:
BYTE * m_details;
CDatabase c1;CString s1;
c1.Open("demo");
CRecordset rs( &c1 );
rs.Open( CRecordset::forwardOnly, _T( "SELECT Details FROM ABC"));
do{
rs.GetFieldValue( (LPCTSTR)"Details",s1);
//I retrieve data like this:
m_details=(BYTE*)(LPSTR)(LPCTSTR)s1;
rs.MoveNext( );
}while( !rs.IsEOF( ) );
Program is compilling ...But I can not retrieve Valid value from the "Details" Field.."Details" is not integer or text..Data type of "details is Ole Object..
..
Can any body please reply me how to retrieve Correct and valid data from "Ole Object" data type field in a Access DataBase?
Thanks in advance..
|
|
|
|
|
This might be a stupid quistion for experienced developers, but is confusing me to much;
What is SDK? why it exists (any special reason)? why it is needed?
After some search on SDK, I have come to know that it is a s/w application /tool that allows to do low level API programming, here is the confusion i.e. when all APIs can be called in VC then why one should go for an SDK?
|
|
|
|
|
(1) VC contains part of the Platform SDK which is necessary to develop Windows applications (without that part you couldn't do it in VC)
(2) You need a newer Platform SDK if you want to access features available in new Windows versions
(3) If you are using a different compiler, you need the paltform SDK, too.
we are here to help each other get through this thing, whatever it is Vonnegut jr. boost your code || Fold With Us! || sighist | doxygen
|
|
|
|