|
When I click on an item in a listctrl, it doesnt make it highlighted and blue. How do I get this to happen?
|
|
|
|
|
Has the control focus while it doesnt make the selection highlighted and blue? The selection is not displayed in blue while the control isn't focused if the "Show selection allways" is not set.
Pavel
Sonork 100.15206
|
|
|
|
|
the "show selection always' did the trick. Many many thanks!
ns
|
|
|
|
|
I have a file that I read character by character. However, the file is scattered with '^Z' (control-Z) characters so the process stops at the first of them due to
end-of-file. Is there a way to ignore these characters and continue reading till I
reach the "real" end of the file?
Thanks!
|
|
|
|
|
You need to open the file in binary (not text) mode. Are you using stdio or iostream?
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
Thanks! That solved the problem. (I'm using iostream.)
|
|
|
|
|
HI ALL
I'm searching for code posted between 12 Aug 2002 and 19 Aug 2002 on CodeProject.
The article title: Exclusive Drag Drop enabled Tabbed Control
Does anybody have source for this article ??
If yes, please send me it.
|
|
|
|
|
I'm having a problem running my executable. The project has compiled and built successfully, but once I try to execute it, I receive the error message "The memory could not be written". If I debug, I receive an Unhandled Exception error, with Access Violation on NTDLL.DLL.
Please help! How do I grant myself write access to this file? I am the administrator of my machine.
Thanks!
Cintia
|
|
|
|
|
Cintch wrote:
How do I grant myself write access to this file?
You have a problem with invalid/uninitialized/dangling pointer, not with 'access to ntdll.dll'. Check the call stack when excetpion happens - you should see where's the error.
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
Did you feel any temptation to be slightly malicious with that response?
STL is a religeon. Enquiries to Reverend Christian Graus
|
|
|
|
|
Jon Hulatt wrote:
Did you feel any temptation to be slightly malicious with that response?
I did
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
I had a similar problem when I ran a dialog application which OnPaint is done by OpenGL functions. The project compiles and runs well in Windows 2000, and terminate approperly. but when I ran it in Windows XP, when I close the application, after every object was destructed, I got this NTDLL.DLL write access unhandled exception error. If I debug it, the call stack is full of USER blah blah, and the code is all in assembly.
Could you give me any clue? Thanks!
|
|
|
|
|
lucy wrote:
the call stack is full of USER blah blah, and the code is all in assembly.
1) examine *full* stack - below series of USER32 calls, you may find your code
2) try switching between threads using Debug/Threads menu option; there's a chance the crash happened in some background thread and stack doesn't reflect the right context.
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
I want to update values in a combo at runtime.
I have a combo box that allows the user to select between "metres" and "feet".The form shows a value in [m].
I want this value to change if and when the user chooses [ft] and I want the choice to be shown in static text next to the edit box.
Any suggestions
Kash
|
|
|
|
|
Alright kash....
Use Class Wizard to attach a CString to the Static Control, and a CComboBoxCtrl to the ComboBox.
Then Use Class Wizard again to catch the Message CBN_SELCHANGE for the ComboBox
in the function generated for that action,
OnSelChange...
int i = m_comboBox.GetCurSel();
switch (i) {
case 0:
m_string = "meters";
case 1:
m_string = "feet";
};
UpdateData(TRUE);
or something like that.
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
Jawache wrote:
UpdateData(TRUE);
Thats bad!!!
From now on, clicking cancel has changed your data.
This should not happen, because a user that clicks cancel specifically wants to leave the dialog *WITHOUT* change in the data.
But the call to UpdateData() copied the control status of all controls into the corresponding variables. So with cancel, they are changed.
So - do not fill the DDX-variable yourself and call UpdateData() !
Better use a control variable of type CStatic and do a SetWindowText() on it.
|
|
|
|
|
It should have been UpdateData(FALSE) anyway.
Usually you have the data stored seperately anyway.
if (Dialog.DoModal() == IDOK)
{
m_String = Dialog.m_String;
}
so only after a user clicks OK is the data stored away otherwise the old data is valid.
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
try ON_CBN_SELCHANGE notify
I am seeking...
For what?
Why did you ask me for what? I don't know!
|
|
|
|
|
I've created a progress bar that works, except it is misplaced. How do I make my progress bar a child of my status bar? The vertical position is the only one wrong. My progress bar shows at the top of the screen. Here's the OnSize code:
void CMainFrame::OnSize(UINT nType, int cx, int cy)
{
CFrameWnd::OnSize(nType, cx, cy);
if (IsWindow(m_wndStatusBar.m_hWnd) &&
IsWindow(m_ProgBar.m_hWnd) &&
m_ProgBar.GetSafeHwnd()) {
CRect rect;
m_wndStatusBar.GetItemRect(2, &rect);
//Reposition the progress control correctly
m_ProgBar.SetWindowPos(&wndTop,
rect.left,
rect.top,//returns 2 (of main window, not status bar)
rect.right - rect.left,
rect.bottom - rect.top,
NULL);
}
}
Thanks,
Ralf.
ralf.riedel@usm.edu
|
|
|
|
|
RalfPeter wrote:
How do I make my progress bar a child of my status bar
By passing pointer to CStatusBar instead of CMainFrame to CProgressCtrl::Create. Did you read the KB article?
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
KB article? Which one is it? I've read many articles on the subject. My code seems to conform to all of them and I don't remember seeing any article addressing pointer to CSatusBar, even though it makes sense to me. Could you help me further by giving me an article title or, better, by giving me a one-liner for the piece I need. Something like:
CStatusBar *status = (CStatusBar*)AfxGetApp()->m_pMainWnd;
Thanks for your reply,
Ralf.
ralf.riedel@usm.edu
|
|
|
|
|
|
Hi,
I'm trying to add multiline tooltip support to my normal, (CToolBar in CReBar in CMainFrame) ToolBar.
I've found lots of code for MultiLine ToolTips for normal buttons in Dialogs etc.. but nothing specifcaly for ToolBars.
Currently I'm trying to get COXToolTipCtrl to work,
I've set the tooltips as normal with AddTool etc...
I've relayed the Pretranslate messages from CMainFrame to the ToolTip but it only shows the first tooltip and not the others.
Does anyone have any advice?
cheers
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
Sorry i'm an idiot,
didn't read the comments at the end of the article properly.
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
I don`t want save my XML message to disk and than call Navigate2. It should be more beautiful algorithm.
|
|
|
|