|
I've created CView-derived class thats contains Stingray's objective grid. I need to arrange it as MFC extention DLL. But gxinit() function bring up assertion fault when calls AfxGetInstanceHandle(). Have any suggestions how to avoid this problem?
|
|
|
|
|
What do I need to write add-ins to explorer? Is there a special sdk to use or what?
Any Urls with tutorials / descriptions on this subject would be apreciated.
|
|
|
|
|
What type of add-ins are you referring to? DeskBands, Explorer Bars, ToolBars, Browser Helper Objects? Other?
The "Creating DeskBands with an ATL Object Wizard" in the ATL section, has links to MSDN Online resources for creating deskbands and toolbars, there are old MSJ/MIND articles that explain how to do browser helper objects and explorer bars. The links I made reference to are in the comments section of the article, in one of the postings from me.
Hope this helps,
-Erik
|
|
|
|
|
How do I retrieve the parameters that are given when the user executes the .exe file?
/XTSea
|
|
|
|
|
CWinApp::m_lpCmdLine
Corresponds to the lpCmdLine parameter passed by Windows to WinMain. Points to a null-terminated string that specifies the command line for the application. Use m_lpCmdLine to access any command-line arguments the user entered when the application was started. m_lpCmdLine is a public variable of type LPSTR.
You could use any number of the 'command line option parsers' available eitehr here or at codeguru.com to break up the command line string.
|
|
|
|
|
Is it possible to intercept and parse the HTML that IE requests before IE does?
|
|
|
|
|
Yes , it's posible . Search at msdn.microsoft for "Browser helper objects" .The parsing , that's another story ...
|
|
|
|
|
can one do the same with replacing and deletion of files within explorer too???
|
|
|
|
|
Try with the interface ICopyHook . For more details look at windows shell programming.
|
|
|
|
|
hi,
i added to my consol application (supporting MFC) the microsoft winsock 6.0 control.
my problem is : i don't know how to work with it.
i know the Create() , Bind() , Connect() function in CSocket class, but i can't do the same with CMSWinsockControl class........
can any1 write sample code or refer me to one that shows how to handle this class???
tnx again.....
uzeb
|
|
|
|
|
I make an editor with a CRichEditView, I want to add a page break function.
How can I add a page break in this control ?
I found a page break effect in PARAFORMAT2 but it's disable.
Is someone have an idea ?
Than you
|
|
|
|
|
This Microsoft article http://support.microsoft.com/support/kb/articles/Q99/8/00.ASP
says that by just calling ShowWindow(SW_HIDE) will hide the app from
both the task bar and task list. I tried in Win98 and it just hides from task bar but
NOT the task list. Any help is appreciated.
Thanks.
|
|
|
|
|
If 'Task List' means 'Process List', use RegisterServicesProcess
function. Register service program through this function,
this process will be not shown at CTRL+ALT+DEL dialog box.
To find more information, visit here,
http://msdn.microsoft.com/library/psdk/win95/95func_3t0z.htm
|
|
|
|
|
Hi all,
i am drawing the listitems by myself using OnCustomDraw().
Calculating the text length i am using pDC->GetTextExtended(s) where pDC is the DC i received in the parameter struct.
That's working fine, but if i want to calculate the text lenght in another member function using:
CDC *pDC = GetDC();
CSize cs = pDC->GetTextExtended(s);
where s is the same string, i get a different size.
Any advise.
TIA Chris
|
|
|
|
|
In MSDN Q247791 , microsoft said
"
SYMPTOMS
Modeless forms in Visual Basic ActiveX DLLs do not display in a Visual C++
application. Instead, a dialog box comes up informing the user that the
client doesn't support Modeless Forms.
CAUSE
In order to work properly, a Visual Basic modeless form requires access to
the message loop of the client application. This access is provided by a COM
object known as the Component Manager, which is integrated directly into the
message loop of the client application. In order to determine if the client
supports modeless forms, Visual Basic gets a reference to the message filter
for the application, and calls IUnknown::QueryInterface for the Component
Manager's primary interface. If this works, modeless forms can be supported.
If it fails, the client cannot support modeless forms.
"
I'm wondering how Visual Basic ActiveX DLLs get the reference to Component Manager which implemented by client in order to display modeless forms in the ActiveX DLL.
Thanks for any suggestion?
|
|
|
|
|
Can I call a CDialog's DoModal() or any other parent window (CView, CMainFrm)
functions from JScript code in HTML contained in a CHTMLView derived class?
Thanks in advance
|
|
|
|
|
You can communicate with the container of your script ( e.q. your CHtmlView derived class ) only if you extend the DHTML object model . The communication is thru the window.external object . In order to extend the DHTML object model your container must implement some interfaces : IDocHostUIHandler , etc .For details see MSDN / Workshop / Reusing Browsing technology . If you have some questions please e-amil me.
|
|
|
|
|
I'm writing a application with a nested splitter
The first spltter has 2 colomns, the second (in the right colomn) has a number of rows which I want to change programmically (between 2 and 5).
In the present implementation I delete the second splitter when i need to add or remove a pane, and "built" the new one with the right number of rows. This implementation has a flaw because although I use the InitialUpdate for every view , nothing happens. Only when I "toutch the splitter-bar, I "see" the updated splitter.
Does anyone no this problem and/or has a more elegant solution?
I saw a proposal somewhere which hides panes. But in that case, can you then still enlarge the views with the mouse (which I don not want to be possible !) ?
Thanks in advance,
Bert....
|
|
|
|
|
Here is the code who hide / show a row . This code is written especially to hide / show only a row at a time . You can use it also to hide / show more then one row, but be aware to the sequence of hide / show operations.
Derive a class from CSplitterWnd, and add this code :
void CMySplitterWnd::HideRow(int rowHide)
{
ASSERT(m_nRows > 1);
ASSERT(rowHide < m_nRows);
SetActivePane( 0, 0 );
CWnd* pPaneHide = GetPane(rowHide, 0);
ASSERT(pPaneHide != NULL);
pPaneHide->ShowWindow(SW_HIDE);
pPaneHide->SetDlgCtrlID(AFX_IDW_PANE_FIRST + m_nRows);
for( int row = rowHide + 1; row < m_nRows; row++ )
{
CWnd* pPane = GetPane( row, 0 );
ASSERT( pPane != NULL );
pPane->SetDlgCtrlID( IdFromRowCol(row - 1, 0) );
m_pRowInfo[row-1] = m_pRowInfo[row];
}
m_nRows--;
m_pRowInfo[m_nRows] = m_pRowInfo[rowHide];
RecalcLayout();
}
void CTSplitterWnd::ShowRow(int rowShow)
{
ASSERT(m_nRows < m_nMaxRows);
int rowNew = rowShow;
CRowColInfo rowNewInfo = m_pRowInfo[m_nRows];
m_nRows++;
int row;
CWnd* pPaneShow = GetDlgItem( AFX_IDW_PANE_FIRST +
m_nRows);
ASSERT(pPaneShow != NULL);
pPaneShow->ShowWindow(SW_SHOWNA);
for(row = m_nRows - 2; row >= rowNew; row--)
{
CWnd* pPane = GetPane(row, 0);
ASSERT(pPane != NULL);
pPane->SetDlgCtrlID(IdFromRowCol(row + 1, 0));
m_pRowInfo[row + 1] = m_pRowInfo[row];
}
pPaneShow->SetDlgCtrlID(IdFromRowCol(rowNew, 0));
m_pRowInfo[rowNew] = rowNewInfo;
RecalcLayout();
}
On this base you can write the functions for hide / show a colon
|
|
|
|
|
Hi
I need the complex class for (!) complex calculations (Visual C++ 5.0).
There is no problem in using the class but:
If I try to get the conjugate complex of a complex it doesn´t work !!!
In the complex.h is conjg defined but if I use conjg an error occured:
- conjg is undeclared...
e.g.
#include <complex.h>
using namespace std;
complex<double> x(1,2);
sqrt(x) is no problem, but conjg(x) doesn´t work.
Can anybody help me ?
bye and thanks,
Sascha
|
|
|
|
|
Someone messed up in the docs. The function is called conj(). (I just did a find-in-files for "conjg", found nothing, then tried "conj" and found it.)
|
|
|
|
|
How can I modify the background color of CScrollView?
Thanks
|
|
|
|
|
How can I create SQL queryes and binde whith C++ code ??
Thank You.
|
|
|
|
|
In which platform? If you're working with VisualC++, you can use a CDatabase object, open it, put the query in a CString, and call the method CDatabase::ExecuteSQL.
|
|
|
|
|
Hi , I m tryingto share memory between to process. One must send a string to the other one. The method I MUST use is :
first Global Alloc to obtain memory and fill it with the string
And second pass the handle to the other process with
SendMessage
But i doesn t work for me.
Could someone write me a piece of code for the two process please ?
Thanx
|
|
|
|