|
i ran into some issues with CBrush::CreatePatternBrush that win2k handled but win98 failed on (fatally, took down the OS). it happens when you create a brush that's larger than 16x16 (i think, maybe even 8x8). the docs mention the limit, but they don't mention that you can kill the OS with it.
-c
Democracy is the worst form of government except all those other
forms that have been tried from time to time.
-- Winston Churchill
|
|
|
|
|
This doesn't help you but you might be interested to know that there is a product out there that allows you to run multiple operating systems simultaneously instead of having to bring in separate machine (H/W)for each OS you want to test on. It is called Virtual PC from Connectix Corp. I use it and like it very much. However, it will not always work correctly for testing DirectX applications.
http://www.connectix.com/support/vpcw_online.html
|
|
|
|
|
I want to create a special kind of status window. A transparent window just floating somewhere on the desktop, and I want all mouseclicks to somehow be directed to the window below. In my case I only want the X in the corner to be possible to click. I know this is possible, but I can't figure it out myself.
This is taken from the feature list of another app:
"Transparent - You can make the desktop preview windows transparent in the form of click-through-able. This means that when you click on a desktop preview window, you're not actually clicking on the desktop preview window, but on the window under it. The only place you can click the preview window is on the header."
Sprudling
|
|
|
|
|
Seems like returning HTTRANSPARENT to the WM_NCHITTEST message would do the trick (haven't tried myself).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Please,help me.
I have ComboBox,that has style-Simple.And I want when I write first letter in edit field of ComboBox,show this selection in List of ComboBox(blue selection).How can I do this?
Thank's.
|
|
|
|
|
Hi there
I want to increase and decrease the volume of a wave file inside the wave file, thus not using any waveOutSetVolume type of functions. The simple logic is propably to multiply each wave bit by a constant, but how can this be done.
Thank you
Jolene
|
|
|
|
|
Receiving the following unresolved errors from a build using VisualStudio C++ (6):
nafxcwd.lib(timecore.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcwd.lib(apphelp.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcwd.lib(filelist.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc
.\bin\serialization.exe : fatal error LNK1120: 3 unresolved externals
Trying to use the afx.h MFC extensions to simply create a file pointer (dvs. CFile* pFile = new CFile();) then later serialize an object to disk. Throw in the necessary MFC library directory via the LIBPATH (C:\Program\MICROS~2\VC98\MFC\Lib) link option.
Heard something about using dynamic binding to fix the unresolved errors?
Matthew
|
|
|
|
|
Have you got "ignore all default libraries" set in project settings > link
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
Howdy!
I've managed to build a status bar and I can assign it a
value when the application starts, but how can I update it while
the application is running?
In the CMainFrame::OnCreate I can use
m_wndStatusBar.GetStatusBarCtrl() to get the address of
the StatusBarCtrl, but how could I get it outside CMainFrame class?
-Marko H.
|
|
|
|
|
If you want to set the text in leftmost part of status bar, use CFrameWnd::SetMessageText. For other statusbar panes, use normal ON_UPDATE_CMD_UI mechanism.
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
uh-oh... I'm a newbie.
What I meant is that from a CDocument class function I
want to change the status bar first pane text.
How can I write status bar from there?
I don't have inside CDOcument class the address of the CFrameWnd
class object to use CFrameWnd::SetMessageText.
|
|
|
|
|
Use this:
static_cast<CFrameWnd *>(AfxGetMainWnd())->SetMessageText("I'm on status bar now");
Keep in mind that this changes the status bar text until next idle update UI cycle is executed. Do you want to change this text permantently?
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
Still baffled...
I added the code, no effect.
I want to show on the status bar when the data was last time
saved successfully. Now it just shows the date & time once,
when CFrameWnd is created. CDocument object function
should be able to update the information permanently.
|
|
|
|
|
Anonymous wrote:
I want to show on the status bar when the data was last time
saved successfully
Instead of standard 'Ready' message, right? If this is the case, override CFrameWnd::GetMessageString:
void CMainFrame::GetMessageString(UINT nID, CString & rMessage) const
{
if (AFX_IDS_IDLEMESSAGE == nID)
{
rMessage = "I'm on status bar";
return;
}
CMDIFrameWnd::GetMessageString(nID, rMessage);
}
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
|
The link is a dead end...? Or is it just my Netscape Navigator 4.75?
|
|
|
|
|
Use ((CFrameWnd*) AfxGetMainWnd())->SetMessageText("...");
|
|
|
|
|
I take that you're able to create a status bar in MainFrame (including setting pane # and size). Once outside of MainFrame, youneed to get a pointer to it to modify the status bar remotely.
#include "MainFrm.h"//or equivalent .h
.
.
.
CMainFrame* pFrame = (CMainFrame*)AfxGetApp()->m_pMainWnd;//pointer to mainframe object
.
.
.
pFrame->UpdateStatus(1, "1st panel message...");//and so on
ralf.riedel@usm.edu
|
|
|
|
|
Aaaahh... I'm a moron (but not moron enough not to write under anonymous
1st: status bar has this default feature to show "ready" or tooltip on it. I forgot that.
I had made my own simple status bar, and I mixed on the way SetMessageText
and SetPaneText.
2nd: I couldn't get my hands on the CMainFrame object. Thanks to the
replies, now I could!
3rd: (back to the being stupid) When I was instructed to use pFrame->UpdateStatus(1, "1st panel message...")
I was just baffled ".. but there is no UpdateStatus in CFrameWnd class..."
Ok, here is how it works now, in case this helps someone else. I am NOT
updating the default message text on the status bar, I have created my own
pane with a text:
in MainFrm.h must be lines
public:
void UpdateStatusBar(CString sMessage = "");
- - - - - -
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
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
}
UpdateStatusBar();
return 0;
}
- - - - - -
void CMainFrame::UpdateStatusBar(CString sMessage)
{
CWinApp* pApp = AfxGetApp();
// the values are read from the registry
CString strValue, strValue2;
strValue = pApp->GetProfileString("Latest update","Date");
strValue2 = pApp->GetProfileString("Latest update","State");
if (strValue.IsEmpty()) {
m_sPaneText = "Data saved: n/a"; }
else {
m_sPaneText.Format("Data saved: %s, %s", strValue, strValue2); }
CStatusBarCtrl &stCtrl = m_wndStatusBar.GetStatusBarCtrl();
// Let's keep it simple...
stCtrl.SetSimple();
// in case you want send a different message to the status bar
// m_sPaneText is a member of CMainFrame
if (sMessage.IsEmpty())
stCtrl.SetText(m_sPaneText,255,0);
else
stCtrl.SetText(sMessage,255,0);
}
- - - - - -
...and then at the same in another class...
In AppDoc.cpp must be line
#include "MainFrm.h"
- - - - - -
void CAppDoc::SaveDataToServer()
{
// blah blah blah... save data and other dull jobs...
// in my case write to registry. The values are read in
// UpdateStatusBar later on and displayed.
// update the status bar from CDocument class object
CMainFrame* pFrame = (CMainFrame*)AfxGetApp()->m_pMainWnd;//pointer to mainframe object
pFrame->UpdateStatusBar();
return;
}
- - - - - -
|
|
|
|
|
Hi again everyone,
Does anyone know of a good web resource or a book where I can find information regarding vtables and how to manipulate them with C++.
Thanks,
Pankaj
|
|
|
|
|
pankajdaga wrote:
where I can find information regarding vtables and how to manipulate them with C++.
What do you mean by 'manipulating vtables'?
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
I was just wondering if it is possible to directly access the contents of a vtable.
Pankaj
Without struggle, there is no progress
|
|
|
|
|
pankajdaga wrote:
if it is possible to directly access the contents of a vtable
It isn't possible in portable manner. Why do you want to do this?
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
Just for educational reasons. I am a student at a university. Just wanted to know if it was possible to access the vtable pointer from the C++ code.
Pankaj
Without struggle, there is no progress
|
|
|
|
|
The main topic is not vtables, but there is very nice code, i like this link
http://www.codeproject.com/atl/atl_underthehood_.asp
regards
-----
Mit freundlichen Grüssen/Best Regards/Un cordial saludo.
Ing. José Manuel Hostalet Wandosell, Fraunhofer IPA, Abt.323/Robotersysteme
Nobelstrasse 12, D-70569 Stuttgart (Germany)
mailto:jose.hostalet@ipa.fhg.de, http://www.ipa.fhg.de
|
|
|
|