|
Iain Clarke wrote:
If you expand of what you want from the caller, I may be able to help.
I want to be able change the directory of the calling explorer. More or less like the "Go To Folder" feature of http://www.shelltoysxp.com/[^].
|
|
|
|
|
Will a Separate copy of Dll be loaded for each application reference? If so, How can I share the same data between applications? could anyone explain please.
Shenthil
|
|
|
|
|
Correct. Each process gets a copy of the DLL data in its address space.
There are several solutions to data sharing across address space. One solution is memory-mapping.
Kuphryn
|
|
|
|
|
You can also mark certain data segments in a DLL as shared.
From the MSDN docs:
#pragma section ("mysectionname", read, write, shared)
__declspec(allocate("mysectionname")) int my_shared_variable = 0;
This will create a section within your DLL called mysectionname. It will be shared among the processes which loads the DLL. By using __declspec(allocate) you advise the compiler to put the variable in that section instead of it's private data segment.
--
You're entertaining at least.
|
|
|
|
|
Hello there,
I have a very stupid question to ask and I know I'm going to kick myself when I find the answer:
How do you change the font in a static text (label) box in a dialog.
Thanks in advance
|
|
|
|
|
Click the entire Dialog and Check for its properties. U'll have font attribute changing which changes the font of static text too.
Shenthil
|
|
|
|
|
But this changes the font of all the controls. I just want to increase the size of the static text control.
|
|
|
|
|
Create a CFont object to you liking settings... then
use setfont method of the static object to the font.
its really not that supid question
Programming is an art not a skill, every one can be a skilled programmer but not an artist.
|
|
|
|
|
Thanks for the reply, how do I access the objects SetFont() method?
CMyClass::SetFont( ) is wrong isn't it???
My dialog class is derived from CFormView class.
Thanks.
|
|
|
|
|
CWnd *pStatic = GetDlgItem (IDC_FONTINGSTATIC); // You need to give the label an actual ID.
... ERROR CHECK
pStatic->SetFont (...);
pStatic->Invalidate ();
Better?
|
|
|
|
|
TolTol wrote:
CMyClass::SetFont( ) is wrong isn't it???
My dialog class is derived from CFormView class.
SetFont is the member of CWnd not CFormView, but CFormView is derived from CWnd so you can use SetFont for CFormView also.
Programming is an art not a skill, every one can be a skilled programmer but not an artist.
|
|
|
|
|
|
I have a method OnBegindragUrlList() in my dialog class which implements the response to the LVN_BEGINDRAG message. I drag from a selected item in a control on my dialog onto Explorer. It maybe the desktop but it may also be an open folder. I want to know what folder my drag operation ends on so that I can then create a corresponding link. Nota that I do not want to copy or move a file and I don't want to create a link either as my file does not exist so I would get an error.
|
|
|
|
|
You need to implement IDataObject, IDropTarget, IDropSource etc to do that kinda of job, check out "drag drop" on code project just do a search on it... Micheal Dunn has written a good article on the same.
Programming is an art not a skill, every one can be a skilled programmer but not an artist.
|
|
|
|
|
I presume you mean you want to create an Internet Shortcut by dragging a URL from a list? If so, you don't have to worry about what folder is specified as your drop target. Just package your custom data up in an COleDataSource object and call the DoDragDrop() member function. To package the custom data up you will have to have an actual file that you intend to move or copy so you'll have to first create an Internet Shortcut (with a .url extension). It might sound a bit clumsy, but even if you can find the details on your drop target you would still have to create an Internet Shortcut.
"The folly of man is that he dreams of what he can never achieve rather than dream of what he can."
"If you think education is expensive, try ignorance."
|
|
|
|
|
I am using ODBC to connect to an ms access mdb file.
When trying to add a new recordset to an empty table, I get an error in CRecordSet::Update and the whole operation fails.
The code looks like this:
<br />
rs.Open(CRecordset::dynaset);<br />
rs.AddNew();<br />
rs.m_ent_id = 1;<br />
rs.m_ent_nom = "String data";<br />
rs.Update();
rs.Close();<br />
I think the reason for this is that when Update() is called and the new record is added, it then tries to return to the previously selected record, which in this case doesn't exist.
Apparently, others have come across this, as can be seen here.
Any suggestions?
Have no fear of perfection - You will never reach it
|
|
|
|
|
I've been fighting ODBC with Access tables for a couple of days, so I'm no expert. But look into the permissions on the target database. Using ADO for this in a webpage, the default is read-only; I have to specify a different access parameter in order to update the db. This same default behavior may be true using ODBC (I don't know that for certain, but I'm looking into it today).
[EDIT]
Never mind. The default for CRecordset is snapshot, which is fully editable.
[/EDIT]
"Another day done - All targets met; all systems fully operational; all customers satisfied; all staff keen and well motivated; all pigs fed and ready to fly" - Jennie A.
|
|
|
|
|
Salvador Dali wrote:
rs.Update(); // This is where the exception is thrown
And that exception is??
Salvador Dali wrote:
I think the reason for this is that when Update() is called and the new record is added, it then tries to return to the previously selected record, which in this case doesn't exist.
CRecordset is smart enough to know that a previous record does not exist. If you'll step through the code, you're apt to see exactly is happening.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
"Unhandled exception in MyApp.exe (MFC42D.DLL): 0xC0000005: Access violation"
The last functions in the call stack at that point are:
<br />
CTime::GetYear()
RFX_Date(...)<br />
CMyRecordset::DoFieldExchange(...)<br />
CRecordset::LoadFields()<br />
CRecordset::UpdateInsertDelete()<br />
CRecordset::Update()<br />
Have no fear of perfection - You will never reach it
|
|
|
|
|
In the constructor of your CRecordset -derived class, you need to initialize the CTime member variables. Something like:
CMeetSet::CMeetSet(CDatabase* pdb) : CRecordset(pdb)
{
m_strName = _T("");
m_nFields = 2;
m_dtDate = CTime(NULL);
m_nDefaultType = snapshot;
}
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Thanks David, it seems to work.
I assumed that classwizard handles all the variable initialization needed at class creation.
Have no fear of perfection - You will never reach it
|
|
|
|
|
Salvador Dali wrote:
I assumed that classwizard handles all the variable initialization needed at class creation.
Normally it does, but there is a known issue with time-related variables.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Do anybody this under vc++ 6 ?
Thanks
---Ranger---
|
|
|
|
|
Hi,
I am currently struggling getting the title bar color changed. I want to change it to something that matches the dialog colors/bitmaps. Ive read a few articles but i just cant comprehend them.
Any comments or advise is welcome, thanks
|
|
|
|
|
The problem is displaying the text in FlexGrid cell. when number of characters in the cell exceeds 682 characters the text is getting overlapped. I have tried to solve this problem using WordWrap API and SetColWidth API. But I didn't get the solution. If anybody knows the solution, please post the solution.
Ramanan
|
|
|
|