|
In the vc++ options (extras->options->paths/directories), you need to set the paths to your headers and libs of the platform SDK. Make sure they are at the top of the list in the options.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Thanks! It worked
Aidman » over and out
|
|
|
|
|
My menu items from the main menu stay disabled even after I add an ON_COMMAND message handler to my .cpp file probably b/c the object from that file is not receiving the message. I understand that command messages are routed by the main frame object to the view, document, and appln objects. How do I have command messages routed to objects other than those? Thanks,
Ralf.
ralf.riedel@usm.edu
|
|
|
|
|
Override your document's OnCmdMsg function and call your object's one. The object must be derived from CCmdTarget to implement a conventional message routing.
Regards,
BB
|
|
|
|
|
I have a MS Chart Control on a dialog and it displays without any difficulties on any development platform but on a test PC it fails without error. When I imported OLE Viewer and Depends to debug the system, Depends showed no difficulties but the OLE Viewer would not expand the chart control and returned an error say control was not licensed. As I have the professional version of Visual Studio, I do have redistribution rights of the control. What am I missing?
|
|
|
|
|
Hi,
I am trying to add functions to buttons on my dialog and when I double click on the button, instead of creating for me the function, it says:
"Cannot add new member"
I remember having trouble creating this dialog, is there any file I can delete/fix ?
Thanks
shay
|
|
|
|
|
I'm trying to use my friends DLL in my own DLL. I've declared it as private member and Initialized it one function, first function. It works fine here. When I call this existing object from second function, it says "cant read the memory"
I'm always wrong....whats appropriate way?
thanx in advance.
|
|
|
|
|
Hi,
I have a MDI APP with three dialog that cannot move and that intersect with each other. They must be in a specified z-order. Is it possible to do that? Actually, when I click on one of them, the clicked dialog get focus and become on top of the other two. So I would like my dialog to act so that if I click on one of them, he get focused but dont become on top of the other two.
Thanks!
Everything's beautiful if you look at it long enough...
|
|
|
|
|
Try playing with DeferWindowPos()
~RaGE();
|
|
|
|
|
Does anybody can give me link to the guides/articles/tips of creating owner drawn controls (like ButtonST).
|
|
|
|
|
|
Thanks
|
|
|
|
|
I'm trying to create an MDI app, I want any child windows to be automatically Maximised at all times.
I've overidden the Create function and removed the style WS_SYSMENU and added the style WS_MAXIMIZE. (see bellow)
The window wtill doesn't display maximised though?
What am I missing?
Cheers
BOOL CSegmentationFrame::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CMDIFrameWnd* pParentWnd, CCreateContext* pContext)
{
dwStyle ^= WS_SYSMENU ;
dwStyle |= WS_MAXIMIZE ;
return CMDIChildWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, pContext);
}
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
try moving your functionality into PreCreateWindow.
virtual BOOL CSegmentationFrame::PreCreateWindow( CREATESTRUCT& cs )
{
cs.style ^= WS_SYSMENU;
cs.sytle |= WS_MAXIMIZE;
return CFrameWnd::PreCreateWindow( cs );
}
That may help you out. Is kinda hard to tell w/o seeing more of your source. The style could be getting overriden somewhere else.
Joseph Dempsey
joseph_r_dempsey@yahoo.com
"Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning."
--anonymous
|
|
|
|
|
Cheers, but that doesn't work either.
The only other code I have in the class is the OnCreateClient function. Its displaying a splitter window as bellow:
BOOL CSegmentationFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
CRect cr;
GetClientRect( &cr);
DWORD dwStyle = WS_BORDER | WS_CHILD | WS_VISIBLE;
if ( !m_mainSplitterWnd.CreateStatic( this, 2, 1 ) )
{
MessageBox( "Error setting up splitter frames!", "Init Error!", MB_OK | MB_ICONERROR );
return FALSE;
}
if ( !m_topSplitterWnd.CreateStatic( &m_mainSplitterWnd, 2, 4, dwStyle ,m_mainSplitterWnd.IdFromRowCol(0,0) ) )
{
MessageBox( "Error setting up splitter frames!", "Init Error!", MB_OK | MB_ICONERROR );
return FALSE;
}
if ( !m_botSplitterWnd.CreateStatic( &m_mainSplitterWnd, 1, 2, dwStyle ,m_mainSplitterWnd.IdFromRowCol(1,0) ) )
{
MessageBox( "Error setting up splitter frames!", "Init Error!", MB_OK | MB_ICONERROR );
return FALSE;
}
for (int row = 0; row < 2; row ++)
{
for (int col = 0; col < 4; col ++)
{
if ( !m_topSplitterWnd.CreateView( row, col, RUNTIME_CLASS(CSliceView), CSize(cr.Width()/4, cr.Height()/3), pContext ) )
{
MessageBox( "Error setting up splitter frames!", "Init Error!", MB_OK | MB_ICONERROR );
return FALSE;
}
}
}
if ( !m_botSplitterWnd.CreateView( 0, 0, RUNTIME_CLASS(CSegmentationForm), CSize(cr.Width()/2, cr.Height()/3), pContext ) )
{
MessageBox( "Error setting up splitter frames!", "Init Error!", MB_OK | MB_ICONERROR );
return FALSE;
}
if ( !m_botSplitterWnd.CreateView( 0, 1, RUNTIME_CLASS(CHistogramView), CSize(cr.Width()/2, cr.Height()/3), pContext ) )
{
MessageBox( "Error setting up splitter frames!", "Init Error!", MB_OK | MB_ICONERROR );
return FALSE;
}
return true;
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
It works now if i just use
cs.style = WS_CHILD | WS_VISIBLE | WS_MAXIMIZE;
in PreCreateWidow.
Cheers
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
another solution which works well is the following:
void CChildFrame::ActivateFrame(int nCmdShow)
{
// TODO: Modify this function to change how the frame is activated.
nCmdShow = SW_SHOWMAXIMIZED;
CMDIChildWnd::ActivateFrame(nCmdShow);
}
|
|
|
|
|
Hi
I want to secure the network data wich is send between a client and server. What's the best method to accomplish this? Like encryption algorithm, key exchanging etc.
Thanks!
|
|
|
|
|
_Theo_ wrote:
I want to secure the network data wich is send between a client and server. What's the best method to accomplish this? Like encryption algorithm, key exchanging etc.
I would just go w/ SSL ( TLS now I think ). If you don't want to do it all yourself i think there are some articles here on CP that have pre-written socket classes that support it.
Joseph Dempsey
joseph_r_dempsey@yahoo.com
"Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning."
--anonymous
|
|
|
|
|
I have changed the font of all my property pages. But still the application is showing the default font
I saw in MSDN this :
CPropertySheet now always changes its font to the default font. Even if the font of the property pages is changed in the resource editor, property pages will be displayed at run-time with the system font. If it is necessary to change the font, call SetFont in OnInitDialog and then do an appropriate MoveWindow to resize the sheet and move and resize all controls on the page
But i dont know how to begin with
can someone help
|
|
|
|
|
I have a member function Junk::GetIPAddress() which returns u guessed it an IPAddress, as it can be slow I would prefer to spawn a new thread. Assuming this is the correct approach - unfortunately error C2664 persists.
error C2664: '_beginthread' : cannot convert parameter 1 from 'void (void *)' to 'void (__cdecl *)(void *)'
void GetIPAddress( void *dummy );
void ClassName::OnTimer(UINT nIDEvent)
{
if (nIDEvent == m_PopTimer)
_beginthread( GetIPAddress), 0, NULL);
}
void ClassName::GetIPAddress( void *dummy )
{
m_IPAddress = do_Something(); /* _endthread implied */
}
Any help greatly appreciated - u guys have been a great help
Regards
Bonnie
|
|
|
|
|
normally you cannot put a member function of your class to the _beginthread as a parameter. It is because the members of your class have calling convention __thiscall , but as compiler reminds you, he needs __cdecl .
solution - make your function static and put a this as a parameter (what you have as a dummy). Then you can cast the parameter from void* to ClassName* and call required method.
<br />
class ClassName<br />
{<br />
public:<br />
static void stGetIPAddress( void* dummy )<br />
{<br />
((ClassName*)dummy)->GetIPAddress();<br />
}<br />
<br />
void GetIPAddress( void *dummy )<br />
{<br />
m_IPAddress = do_Something(); <br />
}<br />
<br />
};<br />
<br />
<br />
_beginthread( stGetIPAddress, 0, this);
|
|
|
|
|
a little error...;) for the GetIPAdress
no argument is required for this method...
void GetIPAddress()
{
m_IPAddress = do_Something();
} is correct...
When you use this technic you must be careful for critical sections...
Regards,
Hello World!!!
from Raphaël
|
|
|
|
|
Ah, sorry. I just copy it from the original and forgot to remove that .
|
|
|
|
|
i found some code on MSDN and i need to apply it to my application.
the belowe code is example of IWMEncSource::SetInput on MDSN.
this is preparation for encoding data which is form video capture card and sound card.
so the client who connect to the encoder can see what u a seeing
HRESULT hr;
IWMEncoder* pEncoder;
IWMEncSource* pAudSrc;
IWMEncSource* pVidSrc;
.....
// Specify live stream capture from the installed
// audio and video cards.
hr = pVidSrc->SetInput(L"DEVICE://Default_Video_Device");
hr = pAudSrc->SetInput(L"DEVICE://Default_Audio_Device");
// Initialize the encoder engine.
hr = pSrcGrp->PrepareToEncode(VARIANT_TRUE);
but i would like to take data from file like mpg , avi or asf instead of live.
is it possible just to change input file.
help me!!! plz
|
|
|
|