|
Are there any tutorials or samples sources out there for creating a timeline editor (like those found in Dreamwaever/Flash/etc).
Maybe even in extension libraries like Stingray's of Dundas'?
I have tried creating one myself, but I just can't figure out how to do it.
Thnk for any help,
James Corrie
|
|
|
|
|
When I set a break point in the server project mfc disables the breakpoints. I select the debug executable (The client that exists on the same machine) by selecting the menu item
"project-Settings" and then going to the debug tab to choose the executable for the debug session. I didn't think setting up a debug session would be so hard. If you have any
suggestions on how to set this up I would really appreciate the help.
Thanks,
Steve
|
|
|
|
|
Have you tried attaching the debugger to the process? (from the VC IDE, Build | Start Debug | Attach to process). (Note - on w2k you might have to get the proc name from task manager).
I guess I'm suggesting that you have the server running, attach to that process, then run the client - or another copy therof - possibly triggering an _asm int 3 in the server code or some such.
Or try placing a DebugBreak() in the code instead of the VC beakpoints - that should invoke the crash dialog, and you can hit cancel to debug. The problem with this option may be the way in which a server process is subservient to the SCM, and subject to certain access restrictions (like the debug priv) that you wouldn't expect to be an issue. May just result in a serious hang of the server.
|
|
|
|
|
I want to change the size of close button (also, maximize and minimize)on the title bar of application.
and if i don't like " x " within the close button can i change it?
can anyone help me,please?
Thanks.
|
|
|
|
|
You can change the sizes of the buttons (not individually, but as a group) in your appearance editor in the Display properties (where you change colors and such). Just click on the buttons and change the size.
As for changing their appearance, That's much more difficult. Why not just get Window Blinds from Stardock (http://www.stardock.com/)
|
|
|
|
|
How I do to write (and read) text files in my VC++ application?
thank you
|
|
|
|
|
Hi,
You can use the Win32 file functions like CreateFile, ReadFile and WriteFile. You can find more information about it in MSDN.
Regards,
Alex Gorev,
Dundas Software.
|
|
|
|
|
Hi Antonio,
You may try CStdioFile, use WriteString() to write a line of text from a CString variable (but remember to append a '\n' to the string), and ReadString() to read a line into a CString.
Paolo.
|
|
|
|
|
I am using moveto and lineto in order to draw a line graph on a dialog. My question is how do I erase the last line in order to redraw the new line with the variables controlling the line changes.
|
|
|
|
|
Hi,
The easiest thing to do is to clear the background and redraw all the lines again.
Regards,
Alex Gorev,
Dundas Software.
|
|
|
|
|
How do you clear the background? Also, there are many edit boxes on the dialog that contain values associated with sliders, will these be cleared as well. I suppose I can just simple refill those values if they are. I am trying to find how to refresh the dialog to clear the lines, any help on this one?
|
|
|
|
|
and use LockWindowUpdate() on the control window first to stop the redraw being visible ... no?
|
|
|
|
|
hello,
I would grately appriciate an answer to the following
question, since ive tried to solve it myself for a long
time, with no effective results.
Im developing in VC++ (MFC), under WIN 95 OS.
Im trying to place in a CScrollView derived class, a large image (*.jpg, OR *.gif, OR *.bmp ) and zoom into it till 1000%. This is successful until 420%, but beyond that the program gets thrown out, and even harms other running applications.
I tried to use the methods "DrawDibDraw" and also "StretchDIBits", but was still unsuccessful.
I would greatly appreciate any help in this matter.
|
|
|
|
|
Most likely you are running out of memory when stretching the bitmap. Only draw the portion of the window that will be shown.
|
|
|
|
|
Depending on how large the bitmap is, you may be running into the 16 bit limitations of the Windows 95 GDI. This means your maximum number of pixels is limited to 32,000 pixels.
|
|
|
|
|
GDI and drivers just have lots of limitations you have to avoid. For example, they are basically 16-bit on Windows 95/98/Me, so any coordinate about 32767 would be troublesome.
For your problem, divide the bitmap into smaller pieces, or do multi-stage zommin using a memory DC.
|
|
|
|
|
How can I create the main window from a resource, instead of writing CreateWindowEx?
Thanks.
Erik
|
|
|
|
|
Unless your window is a dialog, you can't. Well, at least not easily (it would require reading the dialog resource template and creating all the windows and buttons based on that in your own code).
|
|
|
|
|
Hi all,
I created a OCX using MFC Activex Control Wizard. I also add a dialog
resource to my project. My dialog class name is CMyDialog. COleControl
drived class is CMyOCXCtrl. I created a pointer of the CMyDialog in
CMyOCXCtrl class (m_pDialog). From the OnCreate() function of CMyOCXCtrl
class, I create the dialog box ..see following code...
int CMyOCXCtrl ::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (COleControl::OnCreate(lpCreateStruct) == -1)
return -1;
m_pDialog = new CMyDialog(this);
if (!m_pDialog->Create( IDD_ADPWINDOW, this))
{
delete m_pDialog;
m_pDialog = NULL;
return 0;
}
m_pDialog->ShowWindow(SW_SHOW);
return 0;
}
After all of this process, I inserted the OCX in a VB form. It is working
smoothly.. but my problem is that, I cant switch focus to buttons by Tab
Key..
Tab key is not working.... Any comments are welcom.....
Thanks in advance,
Regards,
Kareem.
|
|
|
|
|
Check MSDN
PRB: Modeless Dialog Box in a DLL Does Not Process TAB Key
ID: Q233263
Igor
|
|
|
|
|
Thanks for your reply....It is working !!!!!....
Regards,
Kareem.
|
|
|
|
|
I want to know (get) ICommandWithParameters implementation code of a oledb data provider.
Where can I get it ??
(I got the some codes
-->(ex) ICommandWithParametersImpl.h file in SimpleDataObject project at this site ; .
but it is very simple.
so I can't refer it.
)
help me.....
|
|
|
|
|
I've posted this question on other sites/BBSs w/o success...
So I'm trying to write custom new and delete functions, in order to find a bunch of memory leaks in a program I'm working on. (This is in MSVC 6.) My new function I've defined as follows:
void *__cdecl operator new(size_t, debug_class);
I invoke it with
char* ptr = new (debug_class()) char[10];
my custom routine then storing appropriate info. This works fine. But for this to work correctly, I need to have a matching delete routine. I've tried something similar, defining it as so:
void __cdecl operator delete(void*, debug_class);
But how do I invoke it? I've tried several possibilities, to whit
delete (debug_class()) ptr[];
delete (debug_class(), ptr);
delete (ptr, debug_class());
etc., but mainly end up with compiler errors. The last example compiles fine, but calls the default delete operator nonetheless. Any ideas how I'd invoke it? TIA
Walter Gildersleeve
IVU-Umwelt GmbH
Freiburg, Germany
|
|
|
|
|
In a his discussion of the placement new operations Stroustrup ($10.4.11) describes a deletion mechanism using a Destroy fn which:
1. Calls the destructor of the object explicitly.
2. Frees the memory associated with it (in this case calling free(), since the operator new called alloc).
delete is not used.
On another tack, note also that the array version of delete cannot be overridden by one at class scope:
From "The operator delete Function" (MSDN):
"There are global and class-scoped operator delete functions. Only one operator delete function can be defined for a given class; if defined, it hides the global operator delete function. The global operator delete function is always called for arrays of any type"
You can, I think, overload a global operator delete[] if arrays are the problem, but this is not somewhere I have visited.
The _crtBreakAlloc mechanism is a great way to track leaks, but it's ease of use is lessened if your allocations are not predictable.
Sounds like a fun class - might be interesting to see more of the layout.
Refs:
[Stroustrup] The C++ Programming Language, 3rd Edition, 1977, Addison Wesley
|
|
|
|
|
Here's a generic test, for discussion purposes...
#include <stdio.h>
#include <malloc.h>
struct test{
int a;
int b;
int c;
void * operator new(size_t);
void operator delete(void*);
void * operator new[] (size_t);
void operator delete[] (void*);
};
void * test::operator new(size_t sz)
{
return malloc(sz);
}
void __cdecl test::operator delete(void* t)
{
free(t);
}
void * test::operator new[](size_t sz)
{
return malloc(sz);
}
void test::operator delete[](void* t)
{
free(t);
}
int main(int argc, char* argv[])
{
printf("Hello World!\n");
test* t = new test;
delete t;
t = new test[20];
delete []t;
int * p = new int;
delete p;
return 0;
}
This works as 'expected' on both Borland CPP Builder 4 and MS VC6, but leaves me with another question - I didn't expect to be able to provide an operator delete[] at class scope! Interestingly, if I try to scope the new and delete of the test class (e.g. test::new), I get errors - Borland simply gives 'Expression syntax', whereas VC6 says 'operator xxx must be globally qualified'.
What gives?
|
|
|
|