|
int day = strTime[1] - (int) '0'; /ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Arrrrgh.
J
|
|
|
|
|
How about:
intDay = strTime[1] - '0';
J
|
|
|
|
|
Hello all,
Here's the deal I'm trying to set the font of all the controls on a CFormView to a larger font. I don't want to have to create an ID for each control and manually do a SetFont() on each. Is there an easier way to this?
Thanks.
Marcus
Make no little plans; they have no magic to stir your blood to action. Make big plans, aim high in work and hope
-- Daniel Burnham
|
|
|
|
|
Click on your form in your resources.then in the property of your form change the font then all your control have the same new font.
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
Thanks Mazy.
Marcus
Make no little plans; they have no magic to stir your blood to action. Make big plans, aim high in work and hope
-- Daniel Burnham
|
|
|
|
|
I have a form view and there are some controls,I need something like "Anchor" property.I mean when I change the size of forms my controls always have the same distance from left or right.
How can I gain this?
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
|
Thanks Joaquin
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
|
Thanks,I check it now
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
Anyone have a code snippet that returns a string of the current NT Domain where the user authenticated? I know there's a utility in the NT/Win2K Resource Kit that returns something like:
MYDOMAIN\myuser
in the output...but I'm not sure where they're getting that info from (where "MYDOMAIN" is the name of the domain the user logged-in to, and "myuser" is the username that they used).
Also, if anyone knows how this translates when moving to AD, I'd appreciate any info.
Thanks in advance!
--AJ
|
|
|
|
|
GetUserName() return the user name
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
That's the easy part. Now how do you determine where the user authenticated? (i.e. local host, NT Domain, etc.)
I need the "context" of the user's authentication.
Thanks for the reply...good quote...
--AJ
PS: I see a "GetUserNameEx" for Win2K and later...it would do what I need (I think), but I need some kind of compat. with NT4 and probably Win98 as well.
|
|
|
|
|
The follwing KB articles may be helpful:
Q111544 HOWTO: Retrieve Current User and Domain Names on Windows NT
Q155698 HOWTO: Retrieve Current User and Domain Names on Windows 95 and Windows 98
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
PERFECT!
Thanks.
--AJ
|
|
|
|
|
How do to move the cursor ("|") into a CEdit?
Thanks
|
|
|
|
|
Assuming you've set focus to the edit control (by calling SetFocus() ), you should be able to select an empty portion of the text (starting at the location of interest) using SetSel() . So, to position the cursor at the 3rd char, try:
CEdit* pEdit = (CEdit *) GetDlgItem (IDC_EDIT);
ASSERT (pEdit != NULL);
pEdit->SetFocus();
pEdit->SetSel (2, 2, TRUE);
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Alright in my MDI ap I have CFormViews. I know how to set the child frame initialy to fit the form. What I would like to do is keep it that way.
So what would be the easiest way to prevent the child frame that wraps the form from being resizeable by the user?
I have seen some solutions that invlove removing the client edge but I want it to stay looking the way it does (like a regular window).
Thx,
Richard
|
|
|
|
|
You can override the function for WM_NCHITTEST. Call the default implementation and then if it returns one of the borders, then return HTBORDER.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
You can have it the other way around (resize the parent to fit the child view) with CScrollView::ResizeParentToFit . As for having your frame window unresizable, add this PreCreateWindow handler:
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
cs.style&=~WS_SIZEBOX&~WS_MAXIMIZEBOX;
return CFrameWnd::PreCreateWindow(cs);
}
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
That did it! Perfect thanks again!
Thx,
Richard
|
|
|
|
|
Bah, that was TOO easy. Programming shouldn't be that easy!!!!
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
I think fixing the size in the WM_GETMINMAXINFO message handler is the easiest way.
Michael
|
|
|
|
|
How to make spin control work with double or float data types?
|
|
|
|