|
Dear List
I have a problem while i'm drawing lines into my Childview.
Some background: i'm Meassuring some events and the result is plotted to the view. Fore that i use:
<br />
void someMethod(long color)<br />
{<br />
CClientDC cDC(this);<br />
OnPrepareDC(&cDC);<br />
CPen pen(PS_SOLID,1,color);<br />
cDC.SelectObject(&pen);<br />
<br />
cDC.MoveTo(from_pt);<br />
cDC.LineTo(to_pt);<br />
}<br />
I Use this method quiet offten (recalled after 25 milliseconds). So fine.
Now moving the mouse over the toolbar is fine until the tool tip (or any tool tip belonging to the mainframe) is shown. It seems like the tooltip is shown between MoveTo and LineTo.
So it might the easiest for me ether to deactivate tooltips at all - i don't know how to do this - or to have another possibility to draw a line.
Please any suggestions might help
THX
Tim
PS Oh i forget to say not all Window machines behave the same way - i mean on some machines this happens on others not.
|
|
|
|
|
maybe you could create a bitmap for your line drawing and then BLT the bitmap to the cDC?
cje
|
|
|
|
|
tbrake wrote: So it might the easiest for me ether to deactivate tooltips at all
call CToolBarCtrl::GetToolTips to get CToolTips class pointer associated with the Toolbar and then Call CToolTipCtrl::Activate() to deactivate it
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi All,
I am working on implementing a callback function in this manner :
void CALLBACK InternetStatusCallback(HINTERNET hInternet,
DWORD_PTR dwContext,DWORD dwInternetStatus,
LPVOID lpvStatusInformation, DWORD dwStatusInformationLength)
and then I make a call as
hInetOpen = InternetOpen("MY_FTP",INTERNET_OPEN_TYPE_DIRECT,NULL,NULL,
INTERNET_FLAG_ASYNC);
INTERNET_STATUS_CALLBACK inetStatusCallback =InternetSetStatusCallback(hInetOpen
,(INTERNET_STATUS_CALLBACK)InternetStatusCallback );
if(inetStatusCallback == INTERNET_INVALID_STATUS_CALLBACK)
{
CString szErrMsg;
szErrMsg.Format("%s: %d", "InternetData : InternetSetStatusCallback: ",GetLastError());
return false;
}
The problem is that the callback function is never called.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
_AnShUmAn_ wrote: he problem is that the callback function is never called.
is it necessary to use Windows api.. could you use MFC Classes!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
It has to be done in WIN32 , No MFC
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
_AnShUmAn_ wrote:
It has to be done in WIN32 , No MFC
Somethings seem HARD to do, until we know how to do them.
look for amhttputil class! here in codeproject!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
_AnShUmAn_ wrote:
It has to be done in WIN32 , No MFC
Somethings seem HARD to do, until we know how to do them.
here is the class
http://www.codeproject.com/internet/amhttputils.asp
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
i found the same!
Thanks
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi,
I would like to freeze one column of my listview which is in report style, just like the way it can be done in excel.
If the listview has a lot of columns, to navigate to the last column we use the scroll bar. While scrolling I would like the 1st column to remain where it is and not disappear while scrolling.
Please can you give me an idea how to do this?
Thanks,
Tara
Fortitudine Vincimus!
|
|
|
|
|
Tara14 wrote:
If the listview has a lot of columns, to navigate to the last column we use the scroll bar. While scrolling I would like the 1st column to remain where it is and not disappear while scrolling.
Unfortunatly you cannot do that with ListVie, you need Flex Grid or other grid control for that!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi,
I am new to this VC++. I just want to know the difference between VC++ and MFC.
Mathumala
|
|
|
|
|
C++ is a language; VC++ is short for "Microsoft Visual C++" which is Microsoft's C++ compiler (and linker and IDE...)
MFC is a framework, written in C++, for making applications for Windows in C++ and comes with (MS)VC++.
Steve
|
|
|
|
|
VC++ is the environnement. Visual C++ IDE allow you to program in C/C++, or C++/CLI.
MFC is only a C++ framework that wraps the Win32 methods and allow you to handle them more easily...
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
mathumala wrote: I just want to know the difference between VC++ and MFC.
VC++ = Visual C++ = Microsoft Visual C++ = IDE for developing C/C++/CLI components and applications
MFC is a C++ library (set of classes) that wraps the Win32 API (which is in written in standard C).
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
You know C right? You make a lot of thing in the console. But if you want to create a windows button ? a textbox ?and the things that targets MS Windows. So we need a visual API right? It's called Win32API. 32 is to say the API is for 32 bit Windows OS. It's fully "C" based.
Now C++, why do you need C++ when you have C?
C is all function oriented. When your program get into 1000s of lines . It becomes a hell. C++ has a lot of features that complies to OOD(Object Oriented design). It makes things much easier to control when projects expand out of boundary. So why not Use C++ instead of using "C" for visual programing with the Win32 API. Here comes MFC , It wraps all your raw win 32 Apis and gives everyting as classes. You create an Object to that class, and play with it easily. MFC is the Object Oriented framework in C++.
Win32,MFC,ATL,WTL etc comes under VC++. VC is the compiler provided by Microsoft for creating these programs. So never say MFC or VC++, may be you can say.. Win32 or MFC.
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
I dont know why the hell the script for voting 5 is disabled only for me??
|
|
|
|
|
how do i retain items in the list control so that even when i close the application, the items would still be availiable in the list control.
|
|
|
|
|
Save it to a file. At the time of retrieval just read from the file
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
how can i do that, i am very new in programming
|
|
|
|
|
Read the items from the list control. When you are closing your application/relevant dialog write the contents of the list to a file.
Use CFile, CStdioFile, fread() / fwrite() to put/get the data to/from the file and put it in the corresponding rows/columns of the list control when you are calling the list control dialog to display again
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
jokefake wrote: i am very new in programming
So have you not studied up on file I/O? That's very basic stuff, that should be mastered before advancing on to more difficult topics.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
if you have for example a listbox
(1) Create a file with CFile or CStdioFile
(2)read items in the loop from listbox m_litsbox.GetText(i,str);
(4)write to file
(3) close file
And read MSDN and a good book
whitesky
|
|
|
|
|
Hi all ,
I am new to VC++.Net 2005 version.
can u help me how to bring ActiveX control on Dialog window.
We do this in Vc++6.0 like
project|Add to project|components and controls and add it to project. Can you help me how to make this in .Net version.
Thanking you,
sheshidar
|
|
|
|
|
Hi all,
I am able to Read only one Message Using MapiFindNext(...) and MapiReadMail(...) Please let me know where i have gone wrong.
//==========================================================================
HINSTANCE hMapi; //Instance handle of the MAPI dll
hMapi = LoadLibrary(_T("MAPI32.DLL"));
LPMAPILOGON MAPILogon; //MAPILogon function pointer
LPMAPILOGOFF MAPILogoff; //MAPILogoff function pointer
LPMAPISENDMAIL MAPISendMail; //MAPISendMail function pointer
LPMAPIRESOLVENAME MAPIResolveName; //MAPIResolveName function pointer
LPMAPIFREEBUFFER MAPIFreeBuffer; //MAPIFreeBuffer function pointer
LPMAPIFINDNEXT MAPIFindNext;
LPMAPIREADMAIL MAPIReadMail;
MAPILogon = (LPMAPILOGON) GetProcAddress(hMapi, "MAPILogon");
MAPILogoff = (LPMAPILOGOFF) GetProcAddress(hMapi, "MAPILogoff");
MAPISendMail = (LPMAPISENDMAIL) GetProcAddress(hMapi, "MAPISendMail");
MAPIResolveName = (LPMAPIRESOLVENAME) GetProcAddress(hMapi, "MAPIResolveName");
MAPIFreeBuffer = (LPMAPIFREEBUFFER) GetProcAddress(hMapi, "MAPIFreeBuffer");
MAPIFindNext = (LPMAPIFINDNEXT) GetProcAddress(hMapi, "MAPIFindNext");
MAPIReadMail = (LPMAPIREADMAIL) GetProcAddress(hMapi, "MAPIReadMail");
ULONG err;
LHANDLE lhSession; // Need a session for MAPIFindNext.
CHAR rgchMsgID[513]; // Message IDs should be >= 512 CHARs + a null.
MapiMessage *lpMessage; // Used to get a message back from MAPIReadMail.
int i; // Ubiquitous loop counter.
int totalLength; // Number of characters printed on a line.
err = MAPILogon(0L,"MicrosoftExchangeServer",NULL,0L, 0L, & lhSession); // Session handle.
if (err != SUCCESS_SUCCESS) // Make sure MAPILogon succeeded.
MessageBox("Error: could not log on");
do
{
err = MAPIFindNext(lhSession, // explicit session required
0L, // always valid ulUIParam
NULL, // NULL specifies interpersonal messages
NULL, // seed message ID; NULL=get first NULL,
MAPI_LONG_MSGID, //MAPI_LONG_MSGID |
0L, // reserved; must be 0
rgchMsgID); // buffer to get back a message ID.
// retrieve the message
err = MAPIReadMail(lhSession, // Explicit session required.
0L, // Always valid ulUIParam.
rgchMsgID, // The message found by MAPIFindNext.
MAPI_SUPPRESS_ATTACH, // TO DO: handle attachments.
0L, // Reserved; must be 0.
&lpMessage); // Location of the returned message.
if(err != SUCCESS_SUCCESS) // Make sure MAPIReadMail succeeded.
{
MessageBox("Error");
}
if((lpMessage->lpOriginator->lpszName != NULL) && lpMessage->lpOriginator->lpszName[0] != '\0')
AfxMessageBox(lpMessage->lpOriginator->lpszName);
else
AfxMessageBox(lpMessage->lpOriginator->lpszAddress);
}while(err == SUCCESS_SUCCESS);
//=========================================================================
uday.
|
|
|
|
|
See Here[^]
maybe it is some helpful to you
whitesky
|
|
|
|