|
E.g., Yahoo.com
When I move the cursor on the Yahoo.com, how can I get the URL of this link from outside. I will not host the internet browser. In other words, is there a function that I can hook to retrieve the URL? Thanks.
|
|
|
|
|
|
Thanks. This is very helpful.
|
|
|
|
|
I am working on some functionality using AnimateWindow() and I was curious to know if anyone had a good example of a WM_PRINTCLIENT implementation.
Any help would be appreciated.
Thanks,
David Ramsey
|
|
|
|
|
Hiya where is the Project->Settings in Visual Studio.NET, that is in Microsoft Visual 6.0. Need to add some .lib files to my project..
Thanks,
grahamoj.
|
|
|
|
|
Go to your project in the solution explorer, right click and choose properties. When the dialog comes up choose Linker and then input. Additional Dependencies is the first item on the page.
Hope this helps.
|
|
|
|
|
When you do this, make sure you right click on your PROJECT, and not on the solution! The properties for the Solution is pretty much worthless.
You can pick your friends, and you can pick your nose, but you can't pick your friend's nose.
|
|
|
|
|
You might be trying to add lib file before starting the project. First select new project and do its settings .
-------------
Fist of all, select
File =>Projects and choose the type of project u want to make ie. MFC exe .
Then complete the steps for project settings
After finishing that then see at menu options on top , click on
Projects==>Setttings==>Click on Link tab and add the lib files in Obje:-Dct/Library module
|
|
|
|
|
You might be trying to add lib file before starting the project. First select new project and do its settings .
-------------
Fist of all, select
File =>Projects and choose the type of project u want to make ie. MFC exe .
Then complete the steps for project settings
After finishing that then see at menu options on top , click on
Projects==>Setttings==>Click on Link tab and add the lib files in Object/Library module
|
|
|
|
|
I have a CFormView. In the lower right corner,
the user can stretch or compress the application.
How can I make the CFormView stay a fixed size
or in other words, how can I get rid of those
slanted bars in the lower right corner so that
a user can not adjust the size?
Please, any response any one can give me will be
greatly appreciated.
Sincerely,
Danielle (an overworked graduate student)
|
|
|
|
|
The ability to size an application is owned by the frame; your CFrameWnd class which is probably in your mainfrm.cpp file. If you override the PreCreateWindow function to look something like the following, I think you'll get what you're looking for:
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
cs.style = WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_MINIMIZEBOX;
return CFrameWnd::PreCreateWindow(cs);
}
Ron Ward
|
|
|
|
|
The resizing is due to the frame window, the view is a child of the framewindow.
Do this :-
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
cs.style &= ~WS_THICKFRAME;
return TRUE;
}
Regards
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Another solution is to handle ON_WM_GETMINMAXINFO().
-----
void CMainFrame::OnGetMinMaxInfo(MINMAXINFO* lpMMI)
{
// TODO: Add your message handler code here and/or call default
CFrameWnd::OnGetMinMaxInfo(lpMMI);
lpMMI->ptMinTrackSize.x = ...;
lpMMI->ptMinTrackSize.y = ...;
lpMMI->ptMaxTrackSize.x = ...;
lpMMI->ptMaxTrackSize.y = ...;
}
-----
Kuphryn
|
|
|
|
|
Does anyone know how to derive a CBitmap pointer to a CImageList entry, so that an individual list entry(image) can be access and manipulated ?
Cheers.
|
|
|
|
|
The function CImageList::GetImageInfo(int nImage , IMAGEINFO * pImageInfo) returns the image information of image at entry number nImage into pImageInfo .
The IMAGEINFO contains a member HBITMAP hbmImage , which is the handle to the image list's HBITMAP . The image list stores all the image in a single image strip, so there is another member RECT rcImage the contains the rect of the image inside the bigger bitmap. You may attach the hbmImage in a CBitmap then manipulate it within the given rect.
I have tried it and failed, but could not identify the problem. If it failed with you, then there will be no other way (as far as I know) except to create a new CBitmap then call CImageList::Replace() passing to it the image entry and the CBitmap pointer to set a new bitmap for the entry. If you need to retreive the image at an entry you may use CImageList::DrawEx() to draw the image at certain entry on a give DC
|
|
|
|
|
Yes, Ive tried the same thing already and it does not work for me either.
I think that I might just cut my ImageLists up into bitmaps just to make my life more easy !
As for DrawEx .. no good .. I need to construct complex images based on multipe images... for custom dragging and dropping!! oh well
|
|
|
|
|
Hi. Im having a rather stupid problem:
I have a Cwnd class that has a CTypedPtrArray variable. On a handler, i want to create a Modal dialog and intialize it with some values from the CTypedPtrArray variable in the parent. After i get a valid address to the parent, i can access any variable. My problem is when i try to access the objects in the CTypedPtrArray. The address from "m_array.GetAt(i)" returns ok but the class public variables have bad pointers. Even during normal dialog execution, i cant access it, although i can access all other parent's variable, including a normal pointer to an object of the same class of the CTypedPtrArray array.
Any suggestion?
thanks in advance
Miguel Lopes
|
|
|
|
|
How exactly are you getting a pointer to the parent? Is there any multithreading involved?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
There is no multithreading, at least for now.
Im creating it like this:
CMyParent* wnd=(CMyParent *)this->GetParent();
int size=wnd->m_array.GetCount(); //<----this works well
CString str=wnd->m_array[i]->m_inner_variable; //<--bad ptr, and its valid outside it!
/////////////////////////////////////////////////
ANOTHER EXAMPLE
i have an array of CMyObject; i created in the dialog a class member CMyObject* obj;
then, when i create in the parent window
CMyDialog dlg;
dlg.obj=m_array.GetAt(i);
then when i access "obj" from the OnInitDialog funtion, it works fine!!!
The problem is that by this way, i cant add it dinamically, except if i duplicate the whole array.
|
|
|
|
|
Hello? HELP!!! Im getting despered!!
|
|
|
|
|
Dears,
I´m trying to use createdirectory in visual c++ on a mfc application. I´m compiling this on .NET and i got a problem.
This function don´t run on windows 98 only in windows XP.
Some know how to solve this problem ?
Regards,
Luciano Fávaro
luc_favaro@yahoo.com.br
Luciano
|
|
|
|
|
|
This is the routine that i got a problem, it basiclly copy all files located in sPath to dPath.
The function CreateDirectory and CopyFile ar not running on windows98. I generated a log file and i discovered that on windows 98 the string dPath became invalid like:
original: "c:\teste"
garbage: "Y:\teste"
I read some articles and some of them indicate that the problem is Unicode conversion, but i try to follow the articles steps but it´s unusably.
One thing,
if in the function call CreateDirectory((LPCTSTR)dPath,NULL);
i change (LPCTSTR)dPath by a constant like "c:\\teste" the function run.
Please if you could help me, i´m thank,
LFávaro.
BOOL Cteste11Dlg::CreateTree(CString &sPath, CString &dPath)
{
CreateDirectory((LPCTSTR)dPath,NULL);
fstream f;
try
{
f.open("c:\\arq_log", ios::app);
// log para debug
// dt = _datetime_t::now();
//f << dt.fmt() << "DEBUG - Abriu arquivo de log\n";
}
catch (CFileException * pEx)
{
// log para debug
// dt = _datetime_t::now();
// f << dt.fmt() << "DEBUG - Ocorreu erro ao abrir arquivo\n";
TCHAR sz[1024];
pEx->GetErrorMessage(sz, 1024);
// log - erro gerado por excecao
// dt = _datetime_t::now();
//f << dt.fmt() << ERRO << sz;
pEx->Delete();
return FALSE;
}
f << "|" << (LPCTSTR)dPath << "|\n";
f.close();
CFileFind finder;
CString sWildCard = sPath + "\\*.*";
//CString sDestFile;
CFileFind finderDestFile;
BOOL bFound;
BOOL bWorking = finder.FindFile(sWildCard);
bFound = bWorking;
while (bWorking)
{
bWorking = finder.FindNextFile();
if (finder.IsDots())
continue;
if (finder.IsDirectory())
{
CString s = finder.GetFilePath();
CString temp=dPath+"\\"+finder.GetFileName()+"\\";
BSTR bstr2 = temp.AllocSysString();
BOOL a=CreateDirectoryW(bstr2,NULL);
DWORD d=GetLastError();
CreateTree(s,temp);
continue;
}
// copy files
if (CopyFile(finder.GetFilePath(),(dPath+"\\"+finder.GetFileName()), FALSE))
{
DWORD dwAttrs = GetFileAttributes(finder.GetFilePath());
if (!(dwAttrs & FILE_ATTRIBUTE_READONLY))
{
SetFileAttributes((dPath+"\\"+finder.GetFileName()),
dwAttrs | FILE_ATTRIBUTE_READONLY);
}
}
/*else
{
DWORD l=GetLastError();
MessageBox("Couldn't copy file.");
} */
}
return bFound;
}
LFávaro
|
|
|
|
|
luc_favaro wrote:
I generated a log file and i discovered that on windows 98 the string dPath became invalid like:
original: "c:\teste"
garbage: "Y:\teste"
Hmmm, this looks like you are overwriting memory somewhere, a bad pointer perhaps. The problem is not with CreateDirectory or CopyFile. If you corrupt the string that you pass to those functions, then obviously they will fail. Trace through your code and try and locate when the string that you pass gets corrupted.
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Hi folks..
I've created an activex control for a website that uses javascript to fetch data..
Now, the problem is that i can't manke that control DO anything even though the function is added to the project..
My question is HOW to create "PUBLIC" functions to use on my website..
This is what i'm using on the website..
<br />
<script><br />
<br />
function winamp() {<br />
<br />
myStr = MyControl.MyFunction;<br />
<br />
alert(myStr);<br />
<br />
return;<br />
}<br />
<br />
</script><br />
<br />
<br />
<OBJECT ID="MyControl" WIDTH=0 HEIGHT=0 CLASSID="CLSID:3BD88955-B9EB-4185-9F47-FEA07F6109B8"><br />
<PARAM NAME="_Version" VALUE="65536"><br />
<PARAM NAME="_ExtentX" VALUE="2646"><br />
<PARAM NAME="_ExtentY" VALUE="1323"><br />
<PARAM NAME="_StockProps" VALUE="0"><br />
</OBJECT><br />
<br />
This *SHOULD* give an alertbox - saying "Hello World".. but i get "Object not supported"
I really need some help!
|
|
|
|