|
Hi,
I am looking for an easy way to change text color in CListCtrl header.
Thank you in advance.
csgogogo
|
|
|
|
|
If you use MFC, you will probably have to created your own class derived from CHeaderCtrl.
This article[^] will indicate you how to use the Header Control.
HTH,
K.
And all the girlies say I'm pretty fly for a white guy
|
|
|
|
|
|
Hi:
Q1: How do I remove all breakpoints in project at once.
I used to be able to do that in older VC++ versions, but I can't figure out how to do it in VC7.0.
Q2: In older VC++ versions, when I open new window of same source file and if cursor is in middle of it, the newely opened file will also open up with cursor pointing to same location. In VC7.0 it opens up pointing to first line. I don't like that, how can I change that.
Thanks.
|
|
|
|
|
|
Q1:
Simply on Debug menu click on the Clear All Breakpoints or use Ctrl+Shift+F9.
Q2:
This problem in not important i think that in older version editor open the file at begining of it.
in erlier version if windows has been opened and u open it again the view of this was active and u see it at the same location. in this version if u wasn't close the window u will see the same as older version.
|
|
|
|
|
I'm trying to make an Edit Box automatically scroll down while the program is running. As I get data in to the edit box, I want to follow the latest data string in the box, however the focus is at the top of the edit box and even though the vertical scroll bar shrinks, all I see is the first data strings entered into the edit box. Any ideas on how to do this? I'm using MS Visual C++ 6.0. Thanks!
tsc
|
|
|
|
|
|
when i did this sort of thing i always used a list control
then just added the new string at the top or the bottom depending where i wanted it to scroll
"there is no spoon" biz stuff about me
|
|
|
|
|
I have a problem with using _inp & _outp in windows 2000 .
when I this instructions Execute, windows prompt this error message :
The exception Privileged instruction.
how can I get Privilege For process to solve this problem.
(I'm so sorry for my English )
Iman Ghasrfakhri
|
|
|
|
|
These are kernel-mode instructions that can't be called from a user-mode application. They are typically called by a device driver (which runs in kernel mode).
Nick Hodapp
This posting is provided “AS IS” with no warranties, and confers no rights. You assume all risk for your use. © 2003 Microsoft Corporation. All rights reserved.
|
|
|
|
|
you mean its imposible ? to use this instruction ?
Iman Ghasrfakhri
|
|
|
|
|
|
hi,
if i drag an objekt from my CScrollView window to the top of the area of a scroll bar, i want the view to scroll automatically in the same direction.
Could you plz tell me how to do it?
Thanks!
withoutdruck
|
|
|
|
|
Normaly you should set timer, when in drag mode and cursor x pixels from top; and then inside OnTimer handler scroll window.
Brian
|
|
|
|
|
Thanks Brian.
But when I tried to identify the runtime class according to the cursor position, it told me always it was of the same CSrcollView class, although the cursor was just above the scroll bar.
|
|
|
|
|
how do i set up a floating toolbar so that it will be displayed vertically? (all buttons displayed in column, not in row)
|
|
|
|
|
// in your CMainFrame class, create a CToolBar
// that includes the TBSTYLE_WRAPABLE and
// CBRS_SIZE_FIXED flags.
// next, call the SetRows() method. have a look
// at the MSDN docs for a full desciption of the
// method and its parameters.
int numRows; // TODO: initialise this value
m_wndToolBarFloat.GetToolBarCtrl().SetRows(numRows, true, 0);
// last, dock the tool to the left or right side
// of the MDI frame
m_wndToolBarFloat.EnableDocking(CBRS_ALIGN_LEFT | CBRS_ALIGN_RIGHT);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBarFloat);
|
|
|
|
|
Hi,
I would like see if I can get the system date in a few lines of code?
any ideas?
Thanks
Ehsan Behboudi
|
|
|
|
|
look up time_t in the MSDN.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
#include <time.h>
time_t now;
struct tm *newtime;
char todaysDate[128];
// get the number of seconds since January 1, 1970
time(&now);
// get the current system date
newtime = localtime(&now);
todaysDate = asctime(newtime));
|
|
|
|
|
If using MFC,
COleDateTime dt = COleDateTime::GetCurrentTime();
Regards,
Alvaro
He who laughs last, thinks slowest.
|
|
|
|
|
Its very Simple.
SYSTEMTIME systime;
GetLocalTime ( &systime );
then
systime.wDay is the Day
systime.wMonth is the month and
systime.wYear is the year.
itn't it cool ?
Best Regards,
Jijo.
The nice thing about standards is that there are so many of them to choose from.
|
|
|
|
|
I have to get all the child windows from my main window. Once I have the hwnd How do I find out which window it is, I know I can call GetClassName on the hwnd but that's not good enough for me because most of my windows don't have names, I tried calling GetDlgCtrlID on the hwnd but it crashes because my hwnd is just enumerated. So what can I call to get either the resource ID of the window or some other information that will tell me which window it is. The following is the code I wrote to get the windows:
if(!EnumChildWindows ( AfxGetMainWnd()->m_hWnd, EnumChildProc, NULL))
{
TRACE("Unable to get child windows???\n");
return;
}
BOOL CALLBACK CMyDlg::EnumChildProc(HWND hwnd,LPARAM lParam)
{
TRACE ("Enumerated Child Window : %x\n", hwnd);
}
Is there some other function besides EnumChildWindows that can be used & will give me more useful data?
Thanks in advance
|
|
|
|
|
There are plenty of ways to accomplish this...
You can iterate with GetWindowTop, GetNextWindow;
To get class name: GetClassName
If you are the one creating them make all windows support some protocol:
make them all respond to some message like "WM_APP+100" with some value, or use existing message such as WM_GETTEXT.
If not, install some hook via InitCommonControlSex....
Anyway... good luck
|
|
|
|