|
This Works great. Thanks alot.
Can u plz tell me or give me any e books to learn about automation (COM)
|
|
|
|
|
I saw ur message notifier using ATL and I am not able to open the source code using vc++
S.Yamini
|
|
|
|
|
yaminisridaran wrote: dont see any change in the dialog colour
can you show me the code?
You called the SetDialogBkColor() above the line
int nResponse = dlg.DoModal(); isn't it? not below na ?
nave
|
|
|
|
|
I implemented the code in initinstance for changing the formview colour and if possbile the mainframe colour..
The code in Initinstance
if (!ProcessShellCommand(cmdInfo))
return FALSE;
// The one and only window has been initialized, so show and update it.
SetDialogBkColor(RGB(255,200,100), RGB(1,1,1));
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
S.Yamini
|
|
|
|
|
ops I though its a dialog based application. In this case(SDI or MDI ) you need to handle the WM_CTLCOLOR message
nave
|
|
|
|
|
Thanks.It works
Can u give me the ebook for automation or any information regarding automation
S.Yamini
|
|
|
|
|
yaminisridaran wrote: I tried implemented SetDialogBkColor in InitInstance inorder to change the colour of my dialog box
This function is obsolete now, use method suggested by parthi or you can handle WM_CTLCOLORDLG for this,too.
|
|
|
|
|
I am getting the error message in this code
CNotifyWnd(HWND hParentWnd=NULL,int nWidth=100,int nHeight=80,unsigned int nShowTime=100,BYTE nOpacity=255 )
:m_hParenWnd(hParentWnd),m_nWidth(nWidth),m_nHeight(nHeight),m_nShowTime(nShowTime),m_nOpacity(nOpacity),m_nCurrentOpacity(0)
{
}
DECLARE_WND_CLASS("CNotifyWnd")
BEGIN_MSG_MAP(CNotifier)
MESSAGE_HANDLER(WM_CREATE, OnCreate)
MESSAGE_HANDLER(WM_TIMER, OnTimer)
MESSAGE_HANDLER(WM_PAINT, OnPaint)
MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
MESSAGE_HANDLER(WM_CLOSE, OnClose)
MESSAGE_HANDLER(WM_MOUSEMOVE, OnMouseMove)
MESSAGE_HANDLER(WM_MOUSELEAVE, OnMouseLeave)
//reflect notifications to child
REFLECT_NOTIFICATIONS()
|
|
|
|
|
I found this paragraph in MSDN:
Most drawing in a framework program—and thus most device-context work—is done in the view’s OnDraw member function. However, you can still use device-context objects for other purposes. For example, to provide tracking feedback for mouse movement in a view, you need to draw directly into the view without waiting for OnDraw to be called.
In such a case, you can use a CClientDC device-context object to draw directly into the view.
So I'd like to know what's the exact meaning of this paragraph and if there's some code to reference.
|
|
|
|
|
It means you can create a CClientDC and draw onto the view, this will then be lost when the view refreshes.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Suppose you are running a application like mspaint and draawing a line, the line need to be updated on every mouse move. This can be done in the mouse mouve message itself. No need to wait for the paint message
SomeClass::OnMouseMove()<br />
{<br />
....<br />
CClientDC dc(this);<br />
dc.MoveTo(...);<br />
dc.LineTo(...);<br />
}
nave
|
|
|
|
|
There was a project desighned using VC6.
now i installed vs2005 and I add the new component to the exisisting project .
there is no problem in compiling and debugging.
But if i click the newly added component, i am getting the error as
Debug assertion failed(press retry to debug your applicaiton).
and if i retry it will displaying an error message as[A break point is generated in the dlgdata.cpp at the line ASSERT(FALSE)]
please help me to solve this problem
-- modified at 0:11 Friday 30th March, 2007
Help Ever Hurt Never
|
|
|
|
|
An assertion failure without the context (surrounding code) is meaningless. Often there is a comment in the source near the assertion that explains the problem or it is obvious from the context. Can you post the code surrounding the ASSERT statement?
Steve
|
|
|
|
|
sonavi wrote: Debug assertion failed(press retry to debug your applicaiton).
and if i retry it will displaying an error message as[A break point is generated in the dlgdata.cpp at the line ASSERT(FALSE)]
If you see at the call stack, it would tell you exact reason for falure. And we could not guess it.
|
|
|
|
|
sonavi wrote: Debug assertion failed(press retry to debug your applicaiton).
and if i retry it will displaying an error message as[A break point is generated in the dlgdata.cpp at the line ASSERT(FALSE)]
comment that line and rebuild it.. that are there for debugging!
|
|
|
|
|
I am trying to display two lines in an edit box. The edit box is checked for multi-line. The code displays the following just fine:
one two three four five six
I want it to display:
one two three
four five six
How do I do it? Here's the code I'm using:
RawString.Format("%s %s %s %s %s %s", F1, F2, F3, F4, F5, F6);
GetDlgItem(IDC_EDIT_RawBidAsk)->SetWindowText(RawString);
Thanks
|
|
|
|
|
Put \r\n in the string to create a line break
|
|
|
|
|
Thanks. I inserted the \r\n into the string and it works fine.
RawString.Format("%s %s %s\r\n%s %s %s", F1, F2, F3, F4, F5, F6);<br />
GetDlgItem(IDC_EDIT_RawBidAsk)->SetWindowText(RawString);
|
|
|
|
|
Hey,
I need to read data coming in from a circuit into the microphone or the audio plug in C++. I looked at WaveIn** functions and the MCI library in MSDN and they all record the incoming data (sound) into a wave format, however I need to directly interface with the sound card and read voltages instead of in a wave file. Anyone knows how to do that or has examples of work done to read sound from the microphone directly from C++.
Thanks!
|
|
|
|
|
hello, I'm new to win32 and have created a ListBox where I'm hadling WM_CTLCOLORLISTBOX messages and setting the background color to black. The problem is, with application running and logging off then back in the list box doesn't repaint it self.
These are the steps to reproduce:
Launch application
press ctl + alt + delete which brings up the "Windows Security" dialog
press escape to cancel "Windows Security" dialog
Result:
Only the items in the list box have black backgrounds the rest of it is white?
The vertical scroll bar is not painted.
Dragging the window off the screen and back repaints the ListBox?
Any ideas???
Thanks Allan
|
|
|
|
|
towertsk wrote: have created a ListBox where I'm hadling WM_CTLCOLORLISTBOX messages and setting the background color to black
Can you show, how you have done this?
towertsk wrote: Launch application
press ctl + alt + delete which brings up the "Windows Security" dialog
press escape to cancel "Windows Security" dialog
Result:
Only the items in the list box have black backgrounds the rest of it is white?
The vertical scroll bar is not painted.
Can you explain this ?
|
|
|
|
|
How can I create a makefile for a VC++ project from within Visual Studio 2005? Please help
Vibhu
|
|
|
|
|
Hi,
I have a callback which is a static void function, will there be any benefit to adding an inline to this?
Is there any free profilers available for Visual C++ .NET Unmanaged code?
Thanks in advance.
|
|
|
|
|
Callbacks are usually called through a function pointer - In that case inline wouldn't be doable
I would think.
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
godspeed123 wrote:
I have a callback which is a static void function, will there be any benefit to adding an inline to this?
naah. don't do it.. as inline.. as doesn't work.. as static function force compiler to behave it as function instead of piece of code to be inserted
|
|
|
|