|
This is the easiest way in most cases.
John
|
|
|
|
|
If you can get a handle to the other app the SedMessage( .. WM_CLOSE .. ) or something like that should work fine.
Please don't SHOUT at us.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
I am working with WinXP, and i have a problem with Tab control.
All control like CStatic,CheckBox,slider.... haven't transparent backround, it's a little gray.
(i found this picture http://wallsoft.form08.com/Tab.jpg[^] )
Do you know how to get transparent background ?
thx in advance
|
|
|
|
|
hello
how do you make(step) to add one DIALAGBAR in my application in the right of the window ,and this DIALOGBAR can contain soe buton and Slider ,.....
|
|
|
|
|
thomask wrote:
Here is some Code, which shows how i create the Barcode 128:
So your point is ... ?
~RaGE();
|
|
|
|
|
You could try using a LOGFONT structure and the CreateFontIndirect function ?
~RaGE();
|
|
|
|
|
Please explain how the sample is not working. With the information that you give it is impossible to know what is wrong without compiling your sample, testing it and trying to figure out what it is supposed to do. There is an article on this site that has sample code did you try there first?
http://www.codeproject.com/bitmap/barcode5.asp?target=barcode[^]
Is that where you got this sample? Did you ask your problem there?
John
|
|
|
|
|
Hello i ve a question concerning MFC applications.
I am creating an interface with MFC.(an SDI application) I ve choosen a FormView for my main window.
I ve built a CTreeCtrl in this formview and i want now to build a drawing area where i could draw chronogramms. I don t want to draw directly in the main FormView i would like to have a specified area with scrollbar... Could you tell me how could i do ???
so for my english i am french
Frackasse
|
|
|
|
|
What you need is a CSplitterWnd, to split your form in two (or more) views.
Someone has also recently posted (here on CP) an article about a wonderful class to draw graphs, if you also need help to draw the chronographs.
Et pas besoin de s'excuser pour l'anglais (a fortiori quand il est bon), meme les anglais ecrivent de travers ici.
~RaGE();
|
|
|
|
|
i try to subclass a static control using the following method. i add extra attribute to the static control (once i click on it, a msgbox pop up). however, after i subclass it, i found that although it has the new attribute, but it loses its parent attribute.
-----------------------------------------------------------------------
// CxStatic is extended frm CStatic
BOOL Cxstatic::CreateFromStatic (CWnd* pwndParent, UINT wID)
{
BOOL bSuccess = FALSE;
CWnd* pwndStatic = pwndParent->GetDlgItem (wID);
if (pwndStatic != (CWnd*) 0)
{
DWORD dwStyle = pwndStatic->GetStyle();
CString strText;
CRect rectStatic;
// Get the window text
pwndStatic->GetWindowText (strText);
MessageBox(strText);
// Get the window position and convert from screen -> client
pwndStatic->GetWindowRect (rectStatic);
pwndParent->ScreenToClient(rectStatic);
pwndStatic->DestroyWindow();
bSuccess = CWnd::Create (NULL,
strText,
dwStyle,
rectStatic,
pwndParent,
wID,
NULL);
}
return (bSuccess);
}
void Cxstatic::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
MessageBox("MFC Rules");
CStatic::OnLButtonDown(nFlags, point);
}
-----------------------------------------------------------------------
BOOL CXxxDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
// m_wndClockSmall is Cxstatic
m_wndClockSmall.CreateFromStatic(this, IDC_STATIC);
}
void CXxxDlg::OnButton1()
{
// TODO: Add your control notification handler code here
m_wndClockSmall.SetWindowText ("JAVA Rules");
}
------------------------------------------------------------------------
the following code will coz:when i click on the static control on the dialog, a msgbox pop up. however, when i click on the button1, the text just wont shown up
how can i solve this problem to make the extended static control remain its parent attribute?
thank you.
regards
yccheok
|
|
|
|
|
Hi all,
C. Ghisler, author of Total Commander program, in his FAQ wrote:
Q: Why can't I change the date of a directory?
A: This is a limitation of DOS and Win32. To change the date of a file, DOS must open the file. Since you cannot open directories for reading or writing, you cannot change their dates. However, there is a special function on Win95/98 which allows this, so Total Commander 4.0 and later supports this function on Win95/98 only.
I am a lover of Visual C++ programming and I tried to change the date of a directory on Win95/98 without success.
I ask you: what is this "special function" on Win95/98 which allows to change the date of a directory?
Regards.
Piccinano
|
|
|
|
|
I don't know of a special API call to do this, but if you save a file in the directory, the directory's date will be change to the current date.
Chris Meech
"what makes CP different is the people and sense of community, things people will only discover if they join up and join in." Christian Graus Nov 14, 2002.
"Microsoft hasn't ever enforced its patents. Apparently they keep them for defensive reasons only. Or, they could be waiting 'til they have a critical mass of patents, enforce them all at once and win the game of Risk that they're playing with the world." Chris Sells Feb 18, 2003.
|
|
|
|
|
I have a splitter window which is static, i have two panes. i want one of them to hide when i click on some button. Let me mention, the pane i want to hide is First of all simple window derived from CFrameWnd then i have created a view in that window ( CFormView) . How to hide this window like we can hide one pane in MSDN?
i am using ShowWindow(FALSE) and DeleteColumn() but its not working. small code snippet will be highly appreciated.
|
|
|
|
|
ShowWindow does not take TRUE or FALSE as parameters, but SW_SOMETHING.
So try
ShowWindow(SW_HIDE);
~RaGE();
|
|
|
|
|
Just a little problem but it is very frustrating.
I am using a property sheet for data entry in a DB application. I want to ask the user for confirmation when they press the cancel button.
I have tried different methods, but nothing seems to work!
Any help would be much appreciated
|
|
|
|
|
I just found the answer...
If you're interested it's
Hacking the CPropertySheet
By Mustafa Demirhan
It pays to look before you post
|
|
|
|
|
|
Thanks Mike,
Your answer was a big help, and pointed me in the right direction. It works well, but I have to override OnQueryCancel() for every page in the PropertySheet, because the PropertySheet doesn't seem to receive this message at all.
This works fine for me (there is only 3 pages), but I can't help thinking that there must be an easier or more direct way of doing this...
Thanks Heaps,
Paul.
|
|
|
|
|
Dear All,
I am developing an application in which I require to calucate free space, used space present in all physical Drives. I have developed the program for that and is working fine. But I want to represent free space, used space in terms of graphical representation ie. pie chart.
(The same we use to see when we Click on MY Computer=> C Drive. On left hand side of windows it shows Capacity, used space and free space and thier corresponding representataion form of pie chart of that particular drive selected.)
I suppose that there might be some in built API provided for this??.
Please give your useful suggestions.
Thanks in advance
Rohit Dhamija
|
|
|
|
|
|
I need to process OnNewWindow2 method of the WebBrowser control, and I found that some sample codes sounds different. Which one is correct, assignment directly or QueryInterface? Why?
void CMainView::OnNewWindow2(LPDISPATCH* ppDisp, BOOL* Cancel)
{
CMainView* pNewView = CreateNewView();
ppDisp = pNewView->GetBrowserInterface(); // the 1st method
// pNewView->GetBrowserInterface()->QueryInterface(IID_IDispatch, (LPVOID*)ppDisp); // the 2nd method
}
|
|
|
|
|
That all depends on what GetBrowserInterface() does. Does it return an IDispatch* ? Does it call AddRef() on the pointer it returns? If both answers are "yes" then either will do. If either answer is "no" then the second method is the right one.
--Mike--
Latest blog entry: *drool* (Alyson) [May 10]
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
GetBrowserInterface() is a simple wrapper of IHtmlView::GetApplication. It does not change RefCount.
I'm not sure because the explaination of CHtmlView::OnNewWindow2 method in MSDN is to some extent ambiguity.
Thank you very much.
|
|
|
|
|
YuHao wrote:
It does not change RefCount
Then calling GetBrowserInterface() alone is not sufficient. Since you're returning an interface to the caller, the interface you return must be AddRef 'ed. QueryInterface() does that as part of its normal work if it succeeds.
--Mike--
Latest blog entry: *drool* (Alyson) [May 10]
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
Hej,
Im using M$VC++6.0 and when i compile my application, VC will just get stuck during compiling or linking. Could someone help me on that?
My current solution is CTRL ALT SUPPR, and restart VC++, i guess there is something better...
Thanks,
Remy
PS: I have now this problem even with small projects.
|
|
|
|