|
I searched through the stuff but nothing came up, who feels like a loser now :P
|
|
|
|
|
Does the code you need?
//////////////////////
#define WM_SYSTRAY WM_USER +100
BEGIN_MESSAGE_MAP(CAppDlg, CDialog)
//{{AFX_MSG_MAP(CAppDlg)
ON_MESSAGE(WM_SYSTRAY,OnNotifyMsg)
END_MESSAGE_MAP()
///////////////////////////////////////////////////////////
// add to systray
NOTIFYICONDATA niData;
HICON hIcon;
hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
niData.cbSize = sizeof(NOTIFYICONDATA);
niData.hWnd = m_hWnd;
niData.uID = 100;
niData.uFlags = NIF_ICON|NIF_MESSAGE|NIF_TIP;
niData.hIcon = hIcon;
niData.uCallbackMessage = WM_SYSTRAY;
sprintf(niData.szTip,"app name");
Shell_NotifyIcon(NIM_DELETE ,&niData);
///////////////////////////////////////////////////////////
// message handle
afx_msg LRESULT CAppDlg::OnNotifyMsg(WPARAM wParam, LPARAM lParam)
{
switch(lParam)
{
case WM_LBUTTONDOWN:
break;
case WM_LBUTTONDBLCLK:
this->OnRestore();
break;
case WM_RBUTTONDOWN:
....
}
Our way isn't a soft-glass
It is a mountain with path is rock
But it goes towards, forward upward the sun.
|
|
|
|
|
Hi,
Anyone knows how to implement a class similar to RichEdit control (i.e. with text formattings) and the method we can get the mouse click on some words (or "links") in its content ?
Thanks
|
|
|
|
|
hi,
I got a dll file in which one of its function process time
is about 5 seconds.
When I do iteration, the process time becomes 5 seconds x
number of iterations which makes my application very slow.
I tried to create multiple threads in my application
but it didn't have effect because those thread will
share a single thread of the dll.
According to what I've read in MSDN, all windows application
share the same dll process in memory. So if many application
use it, its process becomes slow.
My question is, Is there a way to create multiple process
of the DLL in memory? So I can use different processes of
DLL for each iteration? any pointers or any article suggestions..please..thanks in advance
Himanshu
|
|
|
|
|
I have a small challenge I need some help with. I have a
CScrollView derived class that displays columns, and each column has a header associated with it. I want the headers to always be displayed even when the view is scrolled. Thanks in advance for your response.
|
|
|
|
|
A solution could be to use two views in the frame, one for the data and one for the column header.
Angels banished from heaven have no choice but to become demons
Cowboy Bebop
|
|
|
|
|
Hi,
After reading article at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvc60/html/redistribvc6.asp ... I am very surprise that we have to do a lot of steps to distribute a single Visual C++ application working with MS Access & DAO
Is there any simple way to include every thing in a single CD? Here are what I have:
a) An Visual C++ 6.0 application: Trial.exe
b) A Trial.mdb that is needed for the Trial.exe (MS Access2000)
What I need more to put in the package and install them in a PC that has Window98 (or later) without having MS Access & Visual C++?
I do know one thing, if I install in that PC ---> Visual C++ only with Access Database option ... it will work! How can I do a similiar task without installing Visual C++?
Thanks for any help
|
|
|
|
|
You need MDAC and Jet 4.0 Service Pack 3 from here[^].
Pavel
Sonork 100.15206
|
|
|
|
|
Hi All,
I have a vexing problem related to CListCtrls within nested CPropertysheets.
Very standard stuff here, the invisible CListCtrl is on CPropertyPage along with several visible CButton controls.
DWORD dwStyle = LVS_REPORT | LVS_SHOWSELALWAYS | WS_CLIPCHILDREN |
WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP | LVS_EDITLABELS ;
DWORD dwEXStyle = LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | WS_EX_CLIENTEDGE;
It must be obvious but I cannot see it.
If there are any kind souls out there - please help
Regards In Advance
Bonnie
Bonnie2
|
|
|
|
|
Do you have a group box on the property page as well? If you do, check the tab order as it can hide any controls under it. Try putting it before/after the control being hidden in the tab order.
Roger Allen
Sonork 100.10016
WHats brown and sticky?
A stick or some smelly stuff!
|
|
|
|
|
How do i add multiple document/views to an MDI app??
Is there something else that has to be done other than add additional
document/view classes and AddDocTemplate statements to the InitInstance of the mainframe?
thx
perseus
|
|
|
|
|
I recently just started to design a tool to help me at work, it works kind of like a Hotel Reservation system. Before we used a program called "Calendar Creator" to manage all the reservations for a given day; however there are a lot of other ways we need to view the data as well. For example sometimes we need to submit reports on how many people are staying in certain buildings and percentages. So I decided to write a tool to manage all this. Everything is going good so far, but one problem.. I need this tool to be able to write all the added entries to a calendar. So I figured I would create a "Calendar View" that would display a calendar with all the added entries. However I soon found that there are no standard or popular calendar controls. So far ever Calendar controls I have seen are really just date pickers. So I figured I would write one myself, however I'm bad at math.. so the question.
1. Do I have to write one myself? (I don't want to re-invent the wheel)
2. If I do have to write it myself, how would I be able to tell that say Feb 10 2003 would be on a Monday?
Any help would be appreciated.
Thank you.
|
|
|
|
|
ROK_RShadow wrote:
1. Do I have to write one myself? (I don't want to re-invent the wheel)
I've worked with the Microsoft calendar controls and they seem to be full of lots of frustrating bugs, so I'd say you're probably better of working from scratch
ROK_RShadow wrote:
2. If I do have to write it myself, how would I be able to tell that say Feb 10 2003 would be on a Monday?
The Doomsday Algorithm[^]
http://www.codeproject.com/datetime/DoomsdayDate.asp[^]
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
CDotNetTabCtrl ....
http://www.codeproject.com/wtl/TabbingFramework.asp
Seems like MDI tab sample:
http://www.codeproject.com/tabctrl/mditabs.asp
Just don't want to waste time converting XP UI
|
|
|
|
|
Hi, is there a simple way to program complex equations in MFC AppWizard(exe)??? For the equation z = z^2 + c, where 'z' and 'c' is (r + i), I was able to program it like this:
//r2 and i2 the user gives the values for
//r and i are the 'x' and 'y' values on the complex plain
//r5 and i5 is the final 'z' value
r3 = (r2 * r2) + (-(i2 * i2));
i3 = (i2 * r2) + (i2 * r2);
r5 = r3 + r;
i5 = i3 + i;
r2 = r5;
i2 = i5;
I need the final answer in complex form (r + i) so I may be able to put those values back into the equation as 'r2' and 'i2'... I want a simpler way to do this so I can use bigger equations like:
z = ((z^5 + c)/(z^3 + z^2 + z + 1)) + sin(z)
Thanks...
|
|
|
|
|
Use the Standard C++ complex class.
#include <complex>
std::complex<double> z, c;
z = std::pow(z, 2) + c;
|
|
|
|
|
How would I get the 'r' and 'i' values from the 'z'???
|
|
|
|
|
How would I get the Real and Imaginary values from the 'z'???
|
|
|
|
|
double real, imag;
complex cplx;
T = complex(1.0, 2.0)
real = cplx.real();
imag = cplx.imag();
|
|
|
|
|
It gives me an error saying 'complex' is "undeclared identifier"...
What I need to do after I got 'z' is this:
Final = abs(pow(pow(z[REAL PART], 2) + pow(z[IMAGINARY PART], 2), 0.5));
'double Final' is a single value...
Thanks...
|
|
|
|
|
#include <complex>
using namespace std;
double final;
complex<double> z(1.0, 2.0);
final = abs(z);
pow(x, 0.5) is the same as sqrt(x) .
abs(z) where z is a complex number calculates the same value as your formula.
|
|
|
|
|
When I do the calculations this way:
z = (2, 3);
c = (-4, -5);
z = std::pow(z, 2) + c;
Final = abs(sqrt(pow(z.real(), 2) + pow(z.imag(), 2)));
I get a different answer than this:
r2 = 2; i2 = 3;
r = -4; i = -5;
r3 = (r2 * r2) + (-(i2 * i2));
i3 = (i2 * r2) + (i2 * r2);
r5 = r3 + r;
i5 = i3 + i;
r2 = r5;
i2 = i5;
Final = abs(pow(pow(r5, 2) + pow(i5, 2), 0.5));
The second way seems to give me the correct answer... Thanks...
|
|
|
|
|
Nevermind, I figured it out... I had "complex<double> z = (2, 3);" instead of "complex<double> z(2, 3);"...
|
|
|
|
|
When a modal dialog box is closed using EndDialog does it's parent window recieve a message to notify it that the dialog has closed? I want to update some info in my status bar as soon as the dialog is closed.
Thanks in advance,
Paddy
|
|
|
|
|