|
Thanks guys, I will try it.
Actually, I created a few "buttons" as bit-maps. It's a bit tiresome, but this way one can do anything - for example big letters and underneath small explanation, all in color, on the "button". However this "button" does not act as a real button, so I created overlay-bitmaps, which show a different state of the buttons (it does not show the button being clicked, i.e. pressed down, but it indicates, that this has been selected).
Anyway, I find it a bit sad to have to work so much for such trivias.
|
|
|
|
|
Hello,
I have a standard SDI project in VC6, based on the CFormView.
And I have made a set of my own Open file, save file, etc. menus.
However, I find, even I have removed the standard (which comes
when you create the project) "File" menu, but when I press "ctrl-O", "ctrl-p", etc, the corresponding default dialogs still comes up.
How can I stop them? I do not need them as I have create a set of my own.
Thansk a lot and have a nice day.
|
|
|
|
|
Sounds like you need to modify the accelerators, too.
|
|
|
|
|
I am writing a function, just suppose:
int Add(int a, int b)
{
return 3;
}
Now what i want is that this code get compiled if the compiler is Visual C++ 6.0 and not compile if the compiler is Visual C++ 7.0. With what macro i can detect that ??
Example if i want function to compile on unicode builds, i do something like:
#ifdef _UNICODE
int Add(int a, int b)
{
return 3;
}
#endif
|
|
|
|
|
I don't know what the version number for 7.0 is, but for 6.0 you can do the following
#if _MSC_VER > 1000
...
...
#endif // _MSC_VER > 1000
Chris Meech
"what makes CP different is the people and sense of community, things people will only discover if they join up and join in." Christian Graus Nov 14, 2002.
"Microsoft hasn't ever enforced its patents. Apparently they keep them for defensive reasons only. Or, they could be waiting 'til they have a critical mass of patents, enforce them all at once and win the game of Risk that they're playing with the world." Chris Sells Feb 18, 2003.
|
|
|
|
|
Hello,
when I try compiling my project, the compiler says:
fatal error C1076: compiler limit: internal heap limit reached, use /Zm to set a higher limit
I looked in MSDN and have done what the compiler said: I set /Zm from 100 to 200 (100 is standard, 2000 is maximum as MSDN says).
But now I get another error:
fatal error C1002: no heap memory for compiler in 2. pass available
What could I do?????
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
Dominik Reichl wrote:
I looked in MSDN and have done what the compiler said...
But have you looked at the other suggestions as well?
* Eliminate unnecessary include files, especially unneeded #defines and function prototypes.
* Eliminate some global variables. For instance, use a pointer to allocate memory dynamically, at run time, instead of declaring a large array.
* Eliminate unused declarations.
* Break up very large functions into smaller ones.
* Break up very large classes into smaller ones.
* Split the current file into two or more files and compile them separately.
|
|
|
|
|
what is the non MFC equivalent of AfxOleInit() ?
|
|
|
|
|
CoInitialize(Ex) for all the standard COM functionality, OleInitialize for "additional" OLE helpers.
"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
sighist | Agile Programming | doxygen
|
|
|
|
|
Hi All
i have a list control, which contains a list of ID's which are numeric
i have this function below which i use to remove any duplicates from
the list, however its not working, does any one have any ideas
cos im being a bit thick today and its not always working
thanks in advance
simon
void CSelectStudents::remove_dups(void)
{
int count = 1;
bool bIdExists = false;
for (int f=0; f
|
|
|
|
|
Is this better?
void CSelectStudents::remove_dups(void)
{
for (int f=0; f<= m_studentlist.GetItemCount(); f++)
{
CString ID_DupStr = m_studentlist.GetItemText(f,3);
for(int i = f+1; i<= m_studentlist.GetItemCount(); i++)
{
CString ID = m_studentlist.GetItemText(i,3);
if(ID == ID_DupStr)
{
m_studentlist.DeleteItem(i);
}
}
}
}
Should be a bit more efficient.
James
|
|
|
|
|
Sorry, just realised that that doesnt work.
You need to take do the second loop in reverse otherwise you can lose position if stuff is deleted.
James
|
|
|
|
|
Thanks James
works a treat if u was a woman id marry ya
|
|
|
|
|
While you obviously know the overall project better than us, wouldn't it be a lot better to not allow duplicates in the first place?
|
|
|
|
|
I just installed VS.NET 2003 and am trying to compile an ATL/WTL project. But the compiler complains that it cannot find _resetstkoflw() which gets called in atlalloc.h. However, I have included malloc.h, and the compiler still complains. Has anyone had similar problems?
Best regards,
Daníel
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
Never mind, the #include <malloc.h> must of course be above the line that includes atlalloc.h
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
For a standard MFC application, in the upper left corner
there is an icon. I know how to change the icon. How can
I make it not appear and move the text which describes the
program over to the left alittle more?
Please, any response any one can give me will be greatly
appreciated.
Sincerely,
Danielle (an overworked graduate student)
|
|
|
|
|
Remove WS_SYSMENU from the window style. But you will also lose the minimize and maximize boxes. Dont know if there is a way to remove the sysmenu and keep minimize and maximize. If some one else has that answer it would be interesting to know.
|
|
|
|
|
in
this msdn link
WS_MAXIMIZEBOX
Creates a window that has a maximize button. Cannot be combined with the WS_EX_CONTEXTHELP style. The WS_SYSMENU style must also be specified.
WS_SYSMENU must also be applied.... So I guess theres no straightforward way . Though, I bet there's someone who can....
In here is where it could have been applied
Best of luck...
d.
|
|
|
|
|
I don't know any direct way of doing that.
But my idea is to just make the icon invisible.
In the icon eidtor, erase the icon (make it transparent).
But that way can not move the text. See if this fits your need.
|
|
|
|
|
I have a multimedia timer that runs OK and in the Timer Function(function where the timer expires) I use a Com OBject pointer that is a class member
LIke MyComOBj *ptr ;
I am able to call Member functions from this static function , but the call to the Com OBject fails ! What initialization do i need to do on entering the Timer Function ? If this wont work , is there a means of notifying my main Thread of this ? I am using non MFC framework . Please help
|
|
|
|
|
Do the main process pass a pointer to a COM interface to the timer callback function? How does the function get access to COM?
Kuphryn
|
|
|
|
|
The class has a static pointer that is initialized to " this" during construction time. The Callback Function uses this pointer to call Member functions .
|
|
|
|
|
Hello
I've got this code
CGeneralTab* gentab;
CGeneralTab* gentab1;
gentab=new CGeneralTab;
gentab1=new CGeneralTab;
gentab->SetWindowText("xxx");
AddPage(&tab1);
AddPage(gentab);
AddPage(gentab1);
where CGeneralTab is a CPropertyPage derived class. As you can see I wanna create the tabs dinamically but how can I set the tab caption cause calling setwindowtext gives a debug assertion failure message. I've tried setwindowtext from the oninitdialog function of the tab class also but it doesn't work. How do I do that ?
Thank you!
|
|
|
|
|
Dont know how CPropertyPage works. But I dont think its constructor creates the window. And you cant call SetWindowText until you have created the window.
|
|
|
|