|
Ravi Bhavnani wrote:
Is your combo box in your mainframe window? Methinks not. It's probably a child of a form view, no?
That's funny huh Ravi? A combo in the frame window!!!
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
Yeah! I wonder what happens to the mainframe's ChildFrameWnd. Perhaps there's never a currently open view.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I need to make an array that holds CEdit variables. These variables represent edit boxes.
|
|
|
|
|
Use the clase CList or CArray...
Regards..
Carlos Antollini.
Sonork ID 100.10529 cantollini
I have yet to meet a C compiler that is more friendly and easier to use than eating soup with a knife.
|
|
|
|
|
CEdit *myArray[5];
or...
#include <vector>
vector <CEdit *>myArray;
it's probably nicer to use an array of pointers to CEdits than put the CEdit themselves in the array.
-c
Smaller Animals Software, Inc.
You're the icing - on the cake - on the table - at my wake. Modest Mouse
|
|
|
|
|
Hi, I implemented displaying time on status bar, but the problem is: the time will only be updated when I am moving mouse over my program. When it lost input focus, although it is still on the top of desktop, the timer info will remain as before it lost focus. It's unlike what is implemented in vc++ 6.0, when this option is selected: "Display clock on status bar".
Thank you very much in advance!
the code is as follows:
void CMainFrame::OnUpdateTimeIndicator(CCmdUI *pCmdUI)
{
CString strStatus;
char tempchar[20];
strStatus.Format(ID_INDICATOR_TIME, tempchar);
m_wndStatusBar.SetPaneText(
m_wndStatusBar.CommandToIndex(ID_INDICATOR_TIME),
strStatus
);
}
|
|
|
|
|
you have to create worker thread for it.
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
could you please give me more hint on how to do this?
Thanks!
|
|
|
|
|
You can do another thing.Use SetTimer() in your create and put the last parametr of it,name of the function you want to use to update and show time,or set it NULL and overriden WM_TIMER and in that function use the code to show time,I hope it's clear.
If you have any question about it ,don't be shy and ask it
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
Maybe you can try this at the end of OnUpdateTimeIndicator(..)
m_wndStatusBar.InvalidateRect(NULL, true);
|
|
|
|
|
I don't think that helps it
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
sorry, this doesn't work.
|
|
|
|
|
As I said to you ,it needs seprate thread to update itself regullary.set timer and overriden WM_TIMER of CMaimFraim and in that function update your status bar and use that code
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
Create a 1 second timer and update the status bar's time text. You should perform the update only if the old time text is different from the current time text string, otherwise the user may see some ugly flashing.
/ravi
"There is always one more bug..."
ravib@ravib.com
http://www.ravib.com
|
|
|
|
|
Got it running. Thank you all so much!
|
|
|
|
|
I am editing a piece of code adding SetOption to it with option:
INTERNET_OPTION_CLIENT_CERT_CONTEXT
Yet this assertion stops my program:
ASSERT(dwOption >= INTERNET_FIRST_OPTION &&
dwOption <= INTERNET_LAST_OPTION);
in the inet.cpp
I am using
VC++6 on a
NT 4 with
IE 5.5
Any help is appreciated.
mine_46
|
|
|
|
|
I saw postings in many forums from many people but still no answer to this.
Please, if somebody knows the answer - share it with us!
If you run your application from within Dev Studio IDE using "exclamation mark" button (or Ctl+F5) and your app crashes (ASSERT or some other reason) - in all Windows version before XP you'd click "Retry" and your IDE would invoke Just-in-time degugger and stop at the line of code that produced the error.
In XP - the IDE seem to be starting the debug mode but at the same time your application is terminated (you get nice message box about it with the only button OK).
VC++ 6 SP4
Win XP professional
JIT debug enabled
AEDebug registry key is pointing to MSDEV.EXE etc. etc.
Victor Rubinstein
|
|
|
|
|
Hey Guys
I have been proggramming in c++ for quite a while now but after all thsi time im still curious as to what null avtually is since this is teh one thing i haven't been able to leran. By this i mean when you initialize a value to 0 the memory location is all 0's. For instance if you initiallise a DWORD to 0 all the 32bits of it contain zero's but what about when you initialise it to NULL what does it contain all zero's again?
Peter
|
|
|
|
|
NULL is usually something similar to this:
#define NULL (void *)0
it's just a zero. and by convention, zero is a non-valid address.
you could do this: DWORD dw = NULL; but people generally only use NULL with pointers.
-c
Smaller Animals Software, Inc.
You're the icing - on the cake - on the table - at my wake. Modest Mouse
|
|
|
|
|
NULL means "invalid address for a pointer". Anything beyond that (like it being equal to zero) is implementation-specific and should not be relied on.
--Mike--
"There are only a limited number of jobs where they will ask to see the sausage. Most of them are in movies."
-- Christian Graus, 2/11/2002
My really out-of-date homepage
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
I having some interesting problems with the following code.
When the fill color is set to "White" the color displayed
is the background color of the menu. Other colors appear
to work fine. Even the outline of the rectangle appears OK.
Here is the code:
CClientDC dcScreen(this);
WORD bitmap_width = GetSystemMetrics(SM_CXMENUCHECK);
WORD bitmap_height = GetSystemMetrics(SM_CYMENUCHECK);
CRect rect(0, 0, bitmap_width, bitmap_height);
m_background_bitmap.CreateCompatibleBitmap(&dcScreen, bitmap_width, bitmap_height);
CDC dcMem;
dcMem.CreateCompatibleDC(&dcScreen);
CBrush brush(RGB(255, 255, 255));
CBrush black(RGB(0, 0, 0));
CBitmap* pOldBitmap = dcMem.SelectObject(&m_background_bitmap);
dcMem.FillRect(rect, &brush);
dcMem.FrameRect(rect, &black);
dcMem.SelectObject(pOldBitmap);
VERIFY(mmenu->SetMenuItemBitmaps(ID_SETTINGS_COLOR_BACKGROUND, MF_BYCOMMAND, &m_background_bitmap, NULL));
Any suggestions?
Thanks
Eldon Zacek
VP of Engineering
Czech-Mate Enterprises, LLC
|
|
|
|
|
Maybe this can explain what happens:
The selected and clear bitmaps should be monochrome. The system uses the Boolean AND operator to combine bitmaps with the menu so that the white part becomes transparent and the black part becomes the menu-item color. If you use color bitmaps, the results may be undesirable.
(from MDSN topic "SetMenuItemBitmaps" - Platform SDK: Windows User Interface).
|
|
|
|
|
In VS 6.0 I had some code in which I was creating Polygons from vector<LONG> iterators.
Something like this:
vector<LONG> mypoints;
...
Polygon(hdc,(LPPOINT)mypoints.begin(),point_count);
This compiled and ran fine in 6.0, and seemed like a relatively reasonable way to dynamically maintain a list of points for drawing so that I did not need to allocate and deallocate POINT arrays.
7.0, however, will not compile it. I get a ansi c++ conformance error (C2440).
I'm no compiler guru, but this behavior just does not seem intuitive to me. I can easily work around it, but I don't like it.
Any thoughts?
"Thank you, thank you very much" Elvis.
|
|
|
|
|
mypoints.begin() returns an iterator. The can be LONG* but it does not have to be. The problem could be that it was LONG* in VC6 but was changed to another type in VC7.
To fix the problem, try this
CHANGE (LPPOINT)mypoints.begin() TO
(LPPOINT)&mypoints[0]
Hope this helps,
John R. Bandela
|
|
|
|
|
Hello Stan,
The compiler does the right thing , i think,you're trying to cast from a struct tagPOINT* (LPPOINT) to a iterator of type LONG*
try casting first to void* then to LPPOINT or try with reinterpret_cast ...
and do the following experiment replace the line with the polygon function with this one
Polygon(hdc,static_cast<LPPOINT>(mypoints.begin()),2);
See if it gives the same error, the compiler are rejecting correctly
your cast, only if you casted to a universal pointer (void*), the cast would worked. If i'm speaking true on this, i have my doubts, ... then welcome to a world with much more ANSI compliance ... if not forget about all this bullshit and i'am mistaken
Hope this helps ,
Joao Vaz
|
|
|
|