|
What about this one[^]? Or this one[^]?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Have you had a look at CP articles [^]?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
See here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
This is again related to the Listboxes in VC++ MFC. I have a listbox containing the list of parameter names which are retrived from a text file say XXX.txt.In this XXX.txt,the values are stored in the format as given bellow.
Parameter No1.
Parameter Name1.
Parameter Value1.
Parameter No2.
Parameter Name2.
Parameter Value2....and so on...
So for example it is as:
1
abc
ee34
2
rtrt
ff45
.
.
.
and so on..
So now among these values,all the parameter names are listed in the particular listbox. Now using this listbox,if I double click on the a particular parameter name among the list listed in the listbox,that parameter name must be retrived from the listbox along with its parameter number and its parameter value which are available in XXX.txt text file and should get stored in another text file say YYY.txt.Similarly I must be able to do multiple selection of parameter names from the listbox and store all of them along with their parameter number and parameter value at once in YYY.txt.
Can anyone suggest me how to go about the above problem.
|
|
|
|
|
And what is your doubt about?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
You should associate the number and value to the name when populating the list box.
Here's how you can do it.
Create a structure having one member for number and another for name.
When reading the first name, create an instance of the structure and initialize its members.
For example when "abc" is read, the created structure instance will contain "1" and "ee34".
Use the CListBox::SetItemDataPtr to associate the structure instance to the index where "abc" is inserted.
To retrieve it you would then use CListBox::GetItemDataPtr to get an instance of the structure.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I'm just going to take a stab in the dark here and hope someone has some information about this.
We need to move our development environment inside of Citrix. Unfortunately we are still using Visual Studio 5.0, and haven't been able to upgrade due to compatability issues with third party software we are using.
I cannot get our project to build inside of Citrix. I get an "Error executing Link.exe", with no other errors at all. The first thing it's trying to build is a static library, and I can see that it creates all of the .obj files, but apparently never creates the .lib and then the Link.exe error occurs.
Just to eliminate the possibility that my large project can't find something it needs, I created a new "Test" workspace, created a new static library with just some comments in it and built, and outside of Citrix it builds fine, but inside Citrix I get these results:
Compiling...
Test1.cpp
Creating library...
Error executing link.exe.
Lib Test.lib - 1 error(s), 0 warning(s)
Then I tried a new .exe, just accepted all the Wizard defaults and tried to build, and also get the same type of error in Citrix:
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
ChildFrm.cpp
MainFrm.cpp
TestMFCApp.cpp
TestMFCAppDoc.cpp
TestMFCAppView.cpp
Generating Code...
Linking...
Error executing link.exe.
TestMFCApp.exe - 1 error(s), 0 warning(s)
So it kind of appears that I'm unable to build anything inside of Citrix. I thought it could be a permissions issue, but I now have Admin rights and am still getting the same error.
So I have a feeling there may be a compatibility issue with our old version of Visual Studio in Citrix, and unfortunately Microsoft doesn't support 5.0 anymore, so I'm afraid we may be in a bit of a bind. (I.e., my development may come to a screeching halt when they move all of our servers next weekend).
If anyone has any information about this and/or knows of any potential workaround to try, I would be most grateful.
Thanks in Advance.
|
|
|
|
|
AmVal wrote: We need to move our development environment inside of Citrix
'need'? Is that because your IT department/management have told you that you have to? If so, not being able to update a (mission-critical?) app is probably good leverage for keeping your current development setup
It appears that your problems are with linking - is it possible to see if a later linker works a) under Citrix, and b) with VC5?
AmVal wrote: haven't been able to upgrade due to compatability issues with third party software we are using
Is there maybe a workaround for those issues?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
The reason we 'need' to move to Citrix is that when our app runs it connects to various databases, and all of our database servers are being moved across the country (instead of being housed in the same building where I work). So... outside of Citrix, I'd still be able to write and build code, but to do any sort of debugging or just running the app to see if things are working would be painfully slow. So, it seems like for perfomance reasons, we're almost going to need everything to be in Citrix.
We've asked about potentially keeping a test server here with some fake copy of the databases we're using, just enough for us to be able to run with... But were told flat out "NO".
So... How would I go about trying a later linker? Thank you.
|
|
|
|
|
AmVal wrote: The reason we 'need' to move to Citrix is that when our app runs it connects to various databases, and all of our database servers are being moved across the country (instead of being housed in the same building where I work). So... outside of Citrix, I'd still be able to write and build code, but to do any sort of debugging or just running the app to see if things are working would be painfully slow. So, it seems like for perfomance reasons, we're almost going to need everything to be in Citrix.
What about building external to Citrix, deploying to a network drive available to Citrix and using remote debug between host & Citrix?
AmVal wrote: So... How would I go about trying a later linker? Thank you.
To get a later linker, copy link.exe from a later install of Visual Studio. To try it out, I'd create a makefile from your VS project (you could do that in VS5.0, yeah?) and use that. Before running the makefile, add the directory containing the link.exe to path in front of the Visual Studio directories.
I'm afraid it's difficult to be of much more 'help' - I moved off VS5 about 10 years ago, and haven't used anything older than VS2003 since about 2004.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Well, I did discover that when I try to build in Citrix, I am getting some failures/errors showing up in the Event Viewer. The Security tab shows a Failure Audit related to Privilege Use. And the System tab shows some TermServDevides Errors.
I've been put in the Admin group and had the C drive completely opened up to me security-wise, but I still get those errors.
Others who are building with newer versions of Visual Studio aren't having any problems at all.
Any other ideas how to get around that???
Otherwise I will probably start looking into Remote Debugging, which I'm not familiar with. I hope I can find that for 5.0!
|
|
|
|
|
AmVal wrote: Otherwise I will probably start looking into Remote Debugging, which I'm not familiar with. I hope I can find that for 5.0!
Try Debugging Tools for Windows[^] - that's pretty much independent of the Visual Studio version (and is very useful to have around anyway!).
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi
I did following:
CBitmap *pBitmap = Gdiplus::FromFile(wfname);
Gdiplus::Graphics gr(dc);
gr.SetPageUnit(Gdiplus::UnitPixel);
gr.DrawImage(pBmp, p, 3);
The image drawing is very slow. How can I improve the image drawing? how can I force image be loaded into memory?
Thanks,
|
|
|
|
|
transoft wrote: How can I improve the image drawing? how can I force image be loaded into memory?
By doing this:
transoft wrote: CBitmap *pBitmap = Gdiplus::FromFile(wfname);
only once maybe ? Make the pBitmap variable a member of your class and load the bitmap from the file only once.
|
|
|
|
|
Hi
I tried debug it. I found that CBitmap *pBitmap = Gdiplus::FromFile(wfname) got loaded just once.
It is weird. When I just attach image, the image drawing is OK. But when I opened a project file, image drawing is very slow.
In the project file loading, when there is anything else is loaded, the image drawing is slow. If I comments out all other loading, only load image, the image drawing will be OK.
Thanks,
modified on Monday, June 8, 2009 11:39 AM
|
|
|
|
|
The disc operations are very costly. So please avoid loading the image during paint operations. Load the image during the dailog or window initialization or whenever requested by user( according to your context). Once the image is loaded in your memory there won't be much delay in operating.
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
i am not able to interpret what this code do...can somebody help me out.
This code is for accessing the data from the RecordSet Database
sprsRecordset->Fields->GetItem (vtFieldName)->GetValue ()
Can we write such a code in diffrent statements..
|
|
|
|
|
As a guess I would say it returns the value of the field for the record based on the current cursor position in the recordset. Probably as a type VARIANT. I would have to look at the documentation to verify that. Perhaps you could do that part, you know, looking at the documentation.
|
|
|
|
|
pandit84 wrote: sprsRecordset
This is a RecordsetPtr , you know.
pandit84 wrote: sprsRecordset->Fields
This gives the Fields collection of the recordset, as FieldsPtr .
pandit84 wrote: sprsRecordset->Fields->GetItem (vtFieldName)
Here you obtain the FieldPtr pointer corrensponding to the field <vtFieldName> of the current record.
pandit84 wrote: sprsRecordset->Fields->GetItem (vtFieldName)->GetValue ()
Eventually you get the value of the of the field object.
This example [^] probably helps.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I need to be able to control the bass and treble on the computer sound card. I was looking at the setaudio command here http://msdn.microsoft.com/en-us/library/ms713256.aspx but could figure out how to use it. Is there a sample project that demostrates how to do this?
|
|
|
|
|
hiii
I'm trying to copy the used clusters of a hard disk partition(NTFS,windows os) to another partition.
I used the "FSCTL_GET_VOLUME_BITMAP" to get the cluster usage details.And I'm getting the used and free cluster counts correctly.And the cluster number I got is continuous.This makes problem for me. I wanna copy the used clusters to a different partition.
What type of cluster number I'm getting.? ; but the answer is correct.It makes confusion to me.
|
|
|
|
|
LPDISPATCH pDisp;
LPUNKNOWN pUnk;
CLSID clsid;
BeginWaitCursor();
::CLSIDFromProgID(L"Excel.Application", &clsid);
if(::GetActiveObject(clsid, NULL, &pUnk) == S_OK)
{
VERIFY(pUnk->QueryInterface(IID_IDispatch,(void**) &pDisp) == S_OK);
m_ExcelApp.AttachDispatch(pDisp);
pUnk->Release();
m_ExcelWorkbooks.AttachDispatch(m_ExcelApp.GetWorkbooks());
m_ExcelWorkbook.AttachDispatch(m_ExcelWorkbooks.GetItem(_variant_t(m_strTmepFileName)));
COleVariant covFalse((short)FALSE);
m_ExcelWorkbook.Close(covFalse,covFalse,covFalse);
m_ExcelApp.Quit();
m_ExcelWorkbook.ReleaseDispatch();
m_ExcelWorkbooks.ReleaseDispatch();
m_ExcelApp.ReleaseDispatch();
pDisp->Release();
}
EndWaitCursor();
I have used WebBrowser to display an Excel document,then I want to display another one which was saved as the same temperory file name,but the Excel process can be found in the task mannager,so I must kill it first.
m_ExcelWorkbooks.AttachDispatch(m_ExcelApp.GetWorkbooks())
m_ExcelApp.GetWorkbooks() method can not execute, I debuged it and found:0x00730069 unhandled exception: 0xC000001D: Illegal Instruction in excel _Application.GetWorkbooks method's InvokeHelper line. Can anybody tell me why? thx very much.
|
|
|
|
|
Hi,
Please clarify my doubts.
I have had the idea that passing pointers to a function chnages the actual value. So my follwing code should change the value of str
char *str="abc";
fun(str);
cout<<str;
.
.
fun(char *str)
{
str="gggg" ;
}
but="" its="" still="" showing="" abc...why?
now="" if="" i="" change="" the="" function="" definition="" to="" as="" follow
fun(char="" ;
}
it="" works="" fine....
but="" it="" doesnot="" allow="" me="" any="" character="" like...str[0]="str[0]+32;
Please" clarify="" my="" doubts
thanks="" in="" advance=""
<div="" class="ForumSig">-----------------------------
I am a beginner
|
|
|
|
|
himangshuS wrote: char *str="abc";
This creates a constant pointer.
So you cannot change its value.
You need to declare str as char str[X] instead of char *str;
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Sorry, wrong - str is not a constant pointer. The literal is points at is likely read-only, but that's by-the-by. The trouble is that the OP changes the pointer value that he passes to the function, NOT the value that the pointer refers to.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|