|
Yeah - you need to handle scrolling yourself. You need to:
- When the view is resized, work out if it's big enough to display all the controls. If it is, then disable the scroll bars. If it isn't, then you need to use
SetScrollInfo [^] to tell the scrollbars how to display themselves. - You need to add OnVScroll and/or OnHScroll handlers to deal with scroll messages. Use SetScrollPos[^] and ScrollWindow[^] to tell the view about the scrollbar parameters so it can work out which bit of the form should be displayed
Yeah, it's a pain. Microsoft do supply a CScrollView...but that inherits from CView, as does CFormView - and MFC is a bit backward when it comes to OOP.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi,
I am compiling the legacy code in VS.Net 2008 64 bit platform. I am getting the above error in the following line
static HRESULT copy(destination_type* pTo , const int source_type* pFrom)
how to resolve the above error?
Please help me
Regards
|
|
|
|
|
What are destination_type and source_type meant to be?
Also - "const int source_type* pFrom" looks wrong no matter what source_type is (unless it is nothing)
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
This is the definition
template <class MapType, class DestinationType = MapType::referent_type>
and source type is defined as
typename MapType::value_type source_type;
what is wrong here?
|
|
|
|
|
const int source_type* pFrom
You have two types in that parameter declaration. Let us say that source_type is std::string - that translates to
const int std::string* pFrom
That doesn't make sense, now, does it?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
get out to what the original types are solved.
Try to make the first or the second paramater to void* to check which parameter is the error.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
I figured out why it doesn't work in visual studio c++. Here is the correct code I used to fix my error C2143:
#include "Wave.h" /* This header file has the CWave class in it */
CWave *wave1;
int main()
{
wave1.Load(_T("C:...\Music.wav"));
wave1.Play();
Sleep(100000);
}
|
|
|
|
|
Hello All ,
I create win32 dll .with simple function Add(int,int).
using dumpbin i can see add function is in my dll.
Then i create new c# console application. in that folder i put trydll.dll,trydll.lib .
then in .cs file i add using System.Runtime.InteropServices;
my class was like this
------
class Program
{
[DllImport("trydll.dll")]
public static extern int Add(int a, int b);
static void Main(string[] args)
{
int c;
//int a=2;
c = Add(5, 6);
Console.Write(c);
}
}
-------
when i run prog .i get run time exception
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'trydll.dll
': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at dlltry.Program.Add(Int32 a, Int32 b)
at dlltry.Program.Main(String[] args) in C:\Documents and Settings\........
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
What is my mistake
|
|
|
|
|
ashish8patil wrote: in that folder i put trydll.dll,trydll.lib .
Is that the working directory of your application ? Make sure this is the case. I'm not a C# expert but I suppose you can find that in the project options.
|
|
|
|
|
yes i put it in working dir
|
|
|
|
|
you need to put the mangled name for the function.
[DllImport("/*put the path of the dll*/")]
public static extern int Add/*mangled function name instead of Add*/(int a, int b);
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Any way to know the physical sectors that a file occupies?
|
|
|
|
|
Hi,
I am using visual studio 2005.I have developed MFC application.I need to maintain version information of data files and code.I am new to MFC.I have seen Version under Resource view.How can I use that resource to display version of Project.Can anyone suggest me.Meanwhile I will also search in google.
|
|
|
|
|
hemlat wrote: I need to maintain version information of data files and code.
Are you talking about any Source Code Management tools ?
Please go through these sites and rephrase the question ...
Microsoft Visual Source Safe[^]
Subversion[^]
|
|
|
|
|
|
Hi thanks for your reply. Link is very useful for me.
|
|
|
|
|
This article[^] has what you need - a class to read the version resource of a module.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi thanks for your reply. I needed this kind of code.I will work on that and let you know.
|
|
|
|
|
Hi,
I am able to implement version information.Thanks for your reply.
|
|
|
|
|
can n e one give me the code for getting ful file path i hav eused this code but it only returns the file name
CFileDialog dlg(true);
dlg.doMOdel();
CString path=dlg.getFileName();
from this only file name is returned
and there is an other method: getFolderPath(), which only returns the path of the file...but not the file name
plz help me out!!!!!!!
|
|
|
|
|
Use CFileDialog::GetPathName
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
You are not superman you are a super-fast-man!
|
|
|
|
|
|
MahaKh wrote: plz help me out!!!!!!!
You've already been helped 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
|
|
|
|
|
Hi
I want to use a C++ program as a part of a project in C#
and I know how can I do this when the program is Managed CPP
But I want to know how can I include my Standard Cpp code in a C# project
and I use Visual Studio 2008 and I want to know is there any template for creating
a standard CPP project apart from the "Empty Project"?
I appreciate your answers
thank you
|
|
|
|