|
Ralf Friedrich Hain wrote:
Is there a standard way in c (not c++) to down cast
and get the maximum value if "loose significant digits"?
Answer: No!
INTP
|
|
|
|
|
Hi, can someone tell me how I can do to have a pointer from my ToolBar ?
because : I put 2 ComboBoxon the ToolBar and I want to initialise it from the App or the View and select an item before it appears.
Thanks.
|
|
|
|
|
((CMainFrame*)AfxGetMainWnd())->m_wndToolBar
cheers
|
|
|
|
|
Looking to see if someone is familiar with this senerio. Got a VC++ 6.0 .exe that must communicate using DCOM with a C# .dll, and it has been difficult to get these working together, if this is even possible. Any help would be appreciated.
Thanks,
Steve
|
|
|
|
|
stevew023 wrote:
Looking to see if someone is familiar with this senerio. Got a VC++ 6.0 .exe that must communicate using DCOM with a C# .dll, and it has been difficult to get these working together, if this is even possible. Any help would be appreciated.
Have a search on MSDN for "Com Callable Wrapper".
Michael
But you know when the truth is told,
That you can get what you want or you can just get old,
Your're going to kick off before you even get halfway through.
When will you realise... Vienna waits for you? - "The Stranger," Billy Joel
|
|
|
|
|
I want to be able to read the "cdText" that's on a music cd.
Is this possible? And more important, is there any source code I can use.
Frank van der Horst
Una Corda 33
Krimpen aan den IJssel
The Netherlands
|
|
|
|
|
I believe that it is only possible (a) if there is CD-TEXT on the disk (of course), and (b) the drive supports it.
Don't know of any source, might be worth looking on SourceForge at the CD rippers. I know that dBPowerAmp's CD grabber supports it if the drive does (at least, it's a checkable option).
Steve S
|
|
|
|
|
I am trying to create a bitmap for a DC using CreateCompatibleBitmap.
But I have the problem that my bitmap can be very large. Say 6000x4000 pixel with (32bit).
If I try to create such a large bitmap CreateCompatibleBitmap always fails and GetLastError returns ERROR_NOT_ENOUGH_MEMORY.
OK, I have a large bitmap but I should have enough memory on my PC for such a large bitmap...
So why has CreateCompatibleBitmap such problems to find enough memory?
Can I split the bitmap in more junks automatically e.g. using a DIB instead of the DDB?
Any response welcome.
Thanks in advance
|
|
|
|
|
You should be able to create bitmaps of the size mentioned, even though it does require 96000000 bytes of memory (image bits only).
CodeBrain wrote:
Can I split the bitmap in more junks automatically e.g. using a DIB instead of the DDB?
Answer: No, you would have to write your own code to split it into smaller chunks.
I recommend going to the bitmap section and see if any of those programs has the same problem.
Good luck!
INTP
|
|
|
|
|
I made some additional tests. I have found out that 6000x4000 works, but 6000x4100 does not work.
I will take a look on the bitmap section, maybe I'll find something.
|
|
|
|
|
I'm using VC++ 6.0
Yesterday I was working on one of my class files, just adding a couple if statements and such, nothing big. After I was done, I tried compiling and I'm now getting some errors that I have no clue how to fix. This class file compiled and ran just fine before I added this additional code, so to try to isolate the problem, I commented out what I had done yesterday and tried compiling again, but I'm still getting the same errors. It almost seems as though my header file, containing all the function definitions, isn't being completely recognized. For example, one of the errors is:
C:\Program Files\Microsoft Visual Studio\MyProjects\GUPIXWIN\CreateMegaFile.cpp(603) : error C2601: 'CreateBatchModeString' : local function definitions are illegal
All the errors are exactly the same, it's just that the function name (enclosed in single brackets above) changes.
I'm getting this same error for 6 of my functions, which are all defined within the included header file: CreateMegaFile.h
This is the format of the function definitions within my header file, and clearly there's nothing wrong with these definitions!:
CString CreateSetupString();
CString CreateSampleStructureString();
CString CreateDefineMatrixString();
CString CreateDefineTraceString();
CString CreateDefineFitString();
CString CreateDefineInvisibleString();
CString CreateBatchModeString();
CString CreateSpectrumFitString();
CString CreateBackgroundEdgeString();
CString CreateDigitalFilterString();
CString RemoveElementSymbol(CString original);
CString BreakString(CString cstr, int pos);
the last 6 functions are the ones that are giving the errors. Yesterday, when I was adding code into this class file, I wasn't touching any of the code within those last 6 functions. I was adding code into the first one.
Does anybody know what's going on here?!
Thanks.
|
|
|
|
|
b_girl wrote:
For example, one of the errors is:
C:\Program Files\Microsoft Visual Studio\MyProjects\GUPIXWIN\CreateMegaFile.cpp(603) : error C2601: 'CreateBatchModeString' : local function definitions are illegal
This is indicative of an extra, missing, or misplaced curly bracket.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
DavidCrow wrote:
This is indicative of an extra, missing, or misplaced curly bracket.
*ahem* yeah... just found it. wow... i feel dumb! i thought i had checked for missing curly brackets before, but i guess i must have skipped over this one by accident. thanks.
|
|
|
|
|
hey, how can I access my document class from within my CMainFrm class. I need this because I'd like to use a SplitterWnd with various dialogs on my second view. So I need a ability to access my CDoc-class from my dialogs. I think I create a membervariable on each dialog class and assign a pointer in CMainFrm.
Is there a way to access my Doc class without need of a pointer?
|
|
|
|
|
CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame();
CMyView *pView = (CMyView *) pChild->GetActiveView();
CDocument* pDoc = pView->GetDocument(); /ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Dear MFC Gurus!
My brains don't want to work. I have no ideas. I'm writting simple MFC-based application. ShellExecute doesn't
work in my application (in other words, when clicking the static control, MSIE doesn't start):
UINT err=(UINT)::ShellExecute(NULL,_T("open"),_T(WEBSITE),_T(""),_T("c:\\"), SW_SHOWNORMAL);
This returns "SE_ERR_ACCESSDENIED". Why?
By the way, I have another project in the _same_ workspace where it works fine. Moreover, I used this scheme
always but today it doesn't work! Help! Urgent!
Yours sincerely,
Alex Bash
|
|
|
|
|
What is the value of WEBSITE at the time of this call? There is nothing wrong with the code as it works for me.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Sorry,
#define WEBSITE "http://www.microsoft.com"
The problem is still not resolved. I'm in shock. Any ideas?
Yours sincerely,
Alex Bash
|
|
|
|
|
Hi,
I'm currently do some work involving images which have been stored in RAW format. Although I can perform all the necessary computing on them one 'nice' thing that has been requested is that my program displays the initial image so that different points (areas of interest) can be selected on the image instead of the co-ordinates being read in from a file. Does anyone know how to display this type of image using VS C++ 6.0 and MFC?
Also (I think I may have solved this one already, however....) how can the window be resized to a fixed size?, e.g. 320x240. The program is SDI and derived from CView.
many thanks,
Andy
|
|
|
|
|
It depends on what you mean by RAW format?
If you have direct access to the image bits then you can create a bitmap (or DIB Section) the same size as the image and write a function to translate (copy) from one format to the other.
mcsherry wrote:
how can the window be resized to a fixed size
Answer: over-ride the OnSize() handler.
INTP
|
|
|
|
|
|
I keep getting a linker Error 2005 about functions already being defined for every class I try and make in VS.net. I program my classes by putting the class definition in one file and them the actual code for the functions in a seperate file. for example:
***myclass.h file***
class myclass
{
public:
void myfunc();
.....
***myclass.cpp***
#include "myclass.h"
void myclass::myfunc()
{
.......
This will always give me a linker error that there are two definitions for the function myfunc in the object file. I can make the error become a warning if I use the linker command /FORCE:MULTIPLE but that does not seem like the best way to overcome the problem even though the program will work fine when I do that. Does anyone have some helpfull suggestions to solving this problem. (I do not want to put the meat of the function in the class definition as sometimes the functions are rather big.)
|
|
|
|
|
I doubt that in myclass.h, the function is declared as void myfunc(){ }; // with brackets. this is considered as a definition. Maybe.
|
|
|
|
|
Im not exactly sure what you are trying to say with this are. I am not useing {} with the function in the class definition and that has been the stand that worked with every borland compiler I used in the past. I just recently started using Visual Studio.NET(2002) and now the convension gives me errors. I have even gotten errors trying to compile sample cade that was included with the Visual Studio Software. I wish I had the computer in front of me with compiler on it to try things out. but i have to wait till I get home to try anything.
|
|
|
|
|
lubatomy wrote:
the class definition in one file and them the actual code for the functions in a seperate file
These are the same thing. Typically, the declaration of a class typically goes in the .h file, and the definition of a class goes in the .cpp file.
Anyway, at the top of the .h file, do you have something like:
#if !defined(AFX_MYCLASS_H__83972473_D4D1_4923_9BD8_0FD75D2FB39C__INCLUDED_)
#define AFX_MYCLASS_H__83972473_D4D1_4923_9BD8_0FD75D2FB39C__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class myclass
{
}
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|