|
Imagine there is an edit control on a dialog. The variable for that edit control is m_eEdit.
Have a look at this:
COleDateTime oledt;
oledt = COleDateTime::GetCurrentTime();
oledt.Format("%X");
m_eEdit.SetWindowText(oledt);
When compiling and so... the are no errors... BUT! the result of the time that is to be seen in
the edit control looks like this: AD0G135
Why!
/*
BETA
*/
|
|
|
|
|
Hi,
I don't know how did your code compile!!! , you must have type casted it .
Format will return the formated string.
Any way
Try this
m_eEdit.SetWindowText(oledt.Format ("%X"));
Cheers
Alfadhly
/*
It is Illogical to define an inventor by his invention
*/
|
|
|
|
|
How do I get a Bitmap and a String on the same Menu Item??
The menu is created at runtime using .CreateMenu() and CreatePopupMenu().
I'm using .AppendMenu(...) to add the items but I can only add MF_STRING or MF_BITMAP.
I tried to .AppendMenu(..) then .ModifyMenu(..) but still no luck.
Once the Menu is created it is ran through a function which sets the whole Menu to Ownerdraw but the Bitmap ain't coming up.
please throw some light into the sutuation if you can.
regards,
pgudge
|
|
|
|
|
I want to create a ActiveX Control in VC++, in which i want to use custom class(Complex) that is defined in a dll file(Complex.dll), that dll file is created in Visual basic .
I want to use that class & their properties & methods in the my activeX Control in VC++. Please help me on above as earliest. please let me know what is the best suitable way to do this.
My aim is to create a activex control which have a property of Complex type Complex class must have real & imagenary values & offcource all Complex type features.
please let me know how this is possible.
Satyen
|
|
|
|
|
I want to use doubleclick on my multiple selection listbox..
None of the CListBox class members seem to provide a way of telling which entry was doubleclicked, only which ones are selected.
Any hints?
Thanks,
Gustav
|
|
|
|
|
Errr.. if it is doubleclicked, the specific item is highlighted too
so do the following:
in the doubleclick event :
int selected;
CString itemdata;
selected=m_listbox.GetCurSel();
m_listbox.GetText(selected,itemdata);
and then you have the text of the doubleclicked item in the CString itemdata;
|
|
|
|
|
Is it possible to overload a function in another DLL?
Let's say that i would like every program on my computer to
call my own CWnd::CalcWindowRect or something like that?
I think that i found some code that describes how to do
this. But i don't understand how to use it.
Is there someone that knows how this is done, and maybe have
a simple example?
|
|
|
|
|
does itoa and ltoa work when the value is 0?
for eg:
long d = 0; // or int value
char* stop;
char* sResult;
ltoa(d, sResult, 16); //this line generates error
is the error due to the value of d being 0 or are there other reasons?
Please help. Thanks!
|
|
|
|
|
You might want to alloc some memory for sResult before using it...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Hi all,
I have a weird problem. When I debug my application in Visual Studio
the first time, everything works fine. When I press F5 again my
application has an access violation when I move the mouse over the
commandbar. Sometimes after stopping the debug, the visual studio
crashes also.
I use Visual Studio 6, WTL 3.1 and running on Windows98.
Franky
|
|
|
|
|
I've seen this, I think, or something like it on win98. Sometimes something seems to go squirrely with the common control dll (?) during a VC session and as soon as the mouse moves over a toolbar button in my app it faults. I think I've seen it when I switch to a release build.
Once this occurs, toolbars in other apps can start to exhibit the same behavior - which makes it hard to even use explorer.
Rebooting usually straightens things out.
My 98 system is a very 'feature packed' mixture of DLL pudding at this point, still proudly displaying april 98 on bootup. I think it was upgraded from the beta. Plus, it supports two monitors, each with its own driver, which might have an impact.
The prime suspect in my case might be a rollback from IE 5.0 that occurred sometime back, and left IE a bit crippled - thats why I suspect some sort of comctl32 messup - which certainly could impact on toolbar functionality, styles etc - though I don't know if I've seen this happen for the command bar.
Does this always occur? If you fire up your machine and don't open IE, going straight to VC instead, does that make any difference?
|
|
|
|
|
Thanks Tim for your reply. While searching the net I've found several identical questions about this problem. It seems that it only occurs on Win98. The problem is that comctl32.dll uses a global adress somewhere for the toolbar. This address invalidates when you debug an application. A solution is: before starting the debugger: run a application and activate a tooltip on a toolbar. Keep this application open while your debugging. This way the global adress keeps the same for as long as the application is open. This solution works fine for me now.
|
|
|
|
|
pls any one can mail me key used to unloak advanced MFC Progamming tutorial from formatics.com
Actually i been to this site, but its closed
thanks in advance
|
|
|
|
|
@5674093020-
|
|
|
|
|
At $60 you'd be better off buying a book, but I'll be sorely disappointed if anyone here is hypocritical enough to help you steal it. Even if their site is down, their copyright remains.
|
|
|
|
|
I guess I shouldn't be surprised - the anonymous posters strike again.
|
|
|
|
|
At $60 you'd be better off buying a book, but I'll be sorely disappointed if anyone here is hypocritical enough to help you steal it. Even if their site is down, their copyright remains.
|
|
|
|
|
when i play some games,such like StarCraft and Diabllo etc,i want to modify some data such as hit points,money,gas or any other data,how can i do this?
with
ReadProcessMemory()
WriteProcessMemory()?
but how?
|
|
|
|
|
Save your game and *then* you can cheat. How can you *possibly* expect to find and manipulate dynamically allocated memory ? It's not going to be at the same location, you know....
|
|
|
|
|
Hello All,
In our project i am given the module to write a PDF reader. I want to get the text matter present in the PDF file. I wanted to know if there are any API calls or COM interfaces given by Adobe Acrobat reader to get the text from the file.
Other way is that can anyone pl reply, telling the algorithms of various encoding/decoding methods like the flat decode algorithm etc.
Regards,
Amit Gholap.
|
|
|
|
|
I am trying to use the CMonthCalCtrl MFC class in a view instead of in a dialog but am running into a bit of trouble.
At first I read in the documentation, that you add an instance to your view class and call the controls create method. This I did and could actually get the window to respond to right clicks but the view would not display the calendar.
Then I found remembered CCtrlView, so I created a class that was derived from CCtrlView and passed MONTHCAL_CLASS and MCS_NOTODAY as parameters to the CCtrlView constructor
CMonthView::CMonthView() : CCtrlView(MONTHCAL_CLASS, MCS_NOTODAY)
...
But this doesn't work either and I have even less functionality than above.
I searched the KB, MSDN and Jeff Prosise's book but can't seem to find a solution. I am thinking that since it is a common control that I should be able to use them the same, like if I can find a solution that hosts say CAnimateCtrl in a view then this might lead me to the answer.
Thanks in advance for any assistance.
Terry
|
|
|
|
|
|
Thanks but like I said I am trying to use it in a view and not in a dialog and CFormView is a dialog.
|
|
|
|
|
I drawn multiple objects using pointers.i stored all pointers.how can i select a particular object using the pointer list?or any other simple method to serve the same purpose?
Please answer in detail.
thanks in advance.
eeshwar_g@nagar.com
|
|
|
|
|
Could you present the question in detail ? Are these pointers to bitmaps you have drawn ? To child windows that have been drawn in the sense of creation ?
I'd suggest that if you *need* this pointer list, and assuming they are all of the same object type, a map<int, pointer=""> and a pile of global const int declarations would solve your problems very nicely. You could use a string, but why slow things down ?
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|