|
kumar sanghvi wrote: but the increased height of the title bar is not shown properly
This is because you are changing the bounding rectangle of the client area not the caption bar. The default window procedure will adjust this rectangle based on the height of the title bar, the height of the menu (if present) and any other non-client component managed by the window. You have however gotten one step close as you now have extra space reserved at the top of the window for your caption bar.
The next step is to handle the WM_NCPAINT message and draw your custom caption bar with the desired height.
I am a lean mean ground beef machine!!!
|
|
|
|
|
I need a "universal font",
1. which can display most of languages (charecters).
2. whose size can be changed smoothly (i.e. height can be 13, 14, 15 ... pixels).
font "MS Shell Dlg" looks good, but its size can not be changed smoothly.
Any suggestion?
Thanks
|
|
|
|
|
Arial Unicode MS[^]? Think that comes as standard with Windows.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Segoe UI[^] is being used as the system font in Vista and later. Give it a try.
MS Shell Dlg is not a real font, but a "logical" one. It maps to a real font based on a registry setting.
|
|
|
|
|
Hi all
In order to implement NTLM authentication we have implemented code which requires support of Wininet.dll which ships with IE . The problem is - the behavior of our HTTP connections faces problems due to different versions of wininet.dll . All of a sudden we find that our application is at the mercy of the build versions of wininet.dll .
is there any other way , other than being dependent on wininet.dll , to support NTLM authentication ?
redindian
|
|
|
|
|
dharani wrote: to implement NTLM authentication
Is this in a client application? If it is, you probably want to look for an SSPI library - I believe that's how (for example) Firefox and Chrome implement NTLM authenticaiton in their browsers.
I found the one I had vague memories of - neon[^] is an HTTP client library that includes SSPI (including NTLM) authentication.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I have made an application with MFC that has run for years with no problems. Suddenly it has started to crash when one module in the program is opened. On my own developer PC it works fine. But on my wife's PC it crashes. Both have Windows XP. It appers that users that have had older versions of the program and has recently upgraded to the latest version, experience no problems. But on PC's that get the program for the first time it tends to break.
The error report says it is a Windows problem, and that the error is in mfc42.dll. I first thought it was a LoadLibrary() function failure, but now i suspect CMSFlexGrid. This ActiveX control is only used in this particular module.
This is very frustrtaing. Has anybody had this similar problems with CMSFlexGrid? How should I proceed to find out what is breaking the program, CMSFlexGrid or anything else.
Best regards, Haakon S.
|
|
|
|
|
Can you try viewing the crashing dll in Dependency Walker?
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
I am not familiar with this tool, but I will try it. Thank you for your help.
Haakon.
|
|
|
|
|
|
Sorry, Randor. I had high hopes that this would be the reason . But it isn't . The error is exactly the same. Thank you for your help anyway. Have a good weekend!
Regards, Haakon.
|
|
|
|
|
Haakon S. wrote: The error is exactly the same.
Haakon,
May we see the error message?
Thanks,
-David Delaune
|
|
|
|
|
Sorry, Randor. On further investigation I see that it is the kill bit issue that is causing the problem. I also see it is a serious matter because it involves changing client machines, which I don't intend to initiate. I will remove the ActiveX control alltogether, and use another grid component.
Thank you for your help.
Regards, Haakon.
|
|
|
|
|
union U
{
int x;
int y;
}u;
u.x=0;
u.y=200;
cout<<u.x+u.y<<endl;< b="">
Why does this code print 144?
I don't understand, please help me!
Thanks you very much!
|
|
|
|
|
ideally it should print 400.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Anshuman is right - it should be 400...
But I notice a coincidence... 256+144 = 400. Are you on some weird architecture? I;ve never heard of 8bit ints, but...
If you'd put in BYTE, or char, I'd be sure of the answer.
Try:
cout << sizeof (U);
u.x = 100;
cout << u.x;
u.y = 127;
cout << u.x;
u.x = 257;
cout << u.x;
cout << (double) (u.x);
This should set some light on your problem.
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
In string table im having resource ID as IDR_TEST and its string value as "test". Now i want to change the string value at runtime. I have tried with LoadString. But its not working. Anyone please tell me how to load string value at runtime?
|
|
|
|
|
You've got the basics wrong there. Entries in a string table are not meant to be modified, whatsoever.
If you need a string that needs to be modified, what's wrong with having a member variable?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
i want to change the default title of SDI window.So, I want to change the Resource ID IDR_MAINFRAME in string table.
|
|
|
|
|
Can't you just edit that particular entry in the string table? Also, there's SetWindowText()[^]
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
No.I will give that title in a ini file.So, the title will change. SetWindowText is not working.
|
|
|
|
|
Will you PLEASE read the guidelines[^] and post messages that people can understand?
Why are you using an ini file to store the Window's title? What's wrong with using a string table? What exactly are you trying to achieve?
Karthika85 wrote: SetWindowText is not working.
And what does that mean? What does your code look like?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
First,i want to change the default title of a window. I can change the default title in String table.In future,If somebody wants to change the title of my application, again they have to change the string in resource,again they need to compile the whole application.So i want to configure the title in ini file.
I added SetWindowText function inside OnCreate function.Its not working.
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
!m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
}
int *num,i,j=m_wndToolBar.GetToolBarCtrl().GetButtonCount();
num=new int[j+1];
memset(num,0,(j+1)*sizeof(int));
num[0]=j;
for(i=0;i<j;i++)
{
if(ID_SEPARATOR == m_wndToolBar.GetItemID( i ))
num[i+1]=1;
}
//·Ö¸ô·ûËãÊÇÒ»¸ö°´Å¥£¬¿í¶ÈÓÀԶΪ6
//ÉÏÃæµÃµ½µÄ°´Å¥¾ØÐÎÓÀÔ¶±È¹¤¾ßÀ¸±à¼Æ÷ÀïÃæÉ趨µÄ³¤¿í¸÷´ó7
//Èç¹ûΪ¹¤¾ßÀ¸ÉèÖÃÁËλͼ£¬°´Å¥µÄÐÎ×´ÓÀÔ¶Ö»Óë´´½¨Î»Í¼Áбíʱָ¶¨µÄ´óСһÖ£¬ÓëÆäËûµØ·½µÄÉèÖÃÎÞ¹Ø
m_wndToolBar.SetFullColorImage(IDB_BITMAP2, RGB(255, 0, 255), num);
delete []num;
if (!m_wndStatusBar.Create(this) ||
!m_wndStatusBar.SetIndicators(indicators,
sizeof(indicators)/sizeof(UINT)))
{
TRACE0("Failed to create status bar\n");
return -1; // fail to create
}
// TODO: Delete these three lines if you don't want the toolbar to
// be dockable
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar);
SetWindowText("Test");
return 0;
}
|
|
|
|
|
try this way
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)<br />
{<br />
cs.lpszName = "Test";
<br />
return TRUE;<br />
}
maybe you need add following statement before the cs.lpszName = "Test";
cs.style &= ~FWS_ADDTOTITLE;
|
|
|
|
|
Thanks.I got it.
We should call SetWindowText inside OnInitialUpdate function.
void CToolbarView::OnInitialUpdate()
{
CView::OnInitialUpdate();
CMainFrame* pFrame = (CMainFrame*) AfxGetApp()->m_pMainWnd;
pFrame->SetWindowText("title");
}
|
|
|
|