|
f.o.b wrote:
Together with another article i get the solution
Can I ask which article?
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
You will find it under:
http://www.codeproject.com/useritems/collectsid.asp
thx for your help.
Ciao,
f.o.b
|
|
|
|
|
hello,
i'm stuck in a problem with IShellView. here's my story :
i've implemented an IShellBrowser to make a file explorer holding to the windows one. problem : the THUMBNAILS display (only in windows 2000 and later).
when i switch to THUMBNAILS display, all is right, except when i change to another directory : the THUMBNAILS display isn't kept. nevertheless, i've been careful in saving the FOLDERSETTINGS of IShellView, and moreover, thanks to it, the "large icons" display, the "small icons", the "list" and the "details" ones are well and truly restored when i visit another directory. only the THUMBNAILS display is lost when the directory is changed.
why ? how to keep the THUMBNAILS display ? where is this parameter stocked if it isn't in FOLDERSETTINGS ?
|
|
|
|
|
i've made a test with SetWindowsHookEx to capture keyboard messages to MY OWN APPLICATION. it works, except the fact that the hook doesn't hook anything else when i use the keyboard in another application. when i switch back to my own application, the hook doesn't hook my keyboard inputs anymore.
why ? how to solve the problem ?
here is how i create the hook :
HHOOK hookdata;
hookdata = SetWindowsHookEx( WH_KEYBOARD, KeyboardProc, hInstance, 0 );
and here is my callback function :
LRESULT CALLBACK KeyboardProc ( int code, WPARAM w, LPARAM l )
{
MessageBox( g_hWnd, "KEYBOARD", "HOOKED", MB_OK );
return 0;
}
|
|
|
|
|
its because ur breaking the hook chain
Papa
Murex Co.
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
no that's not the problem, but it's ok now. i've found the solution :
hookdata = SetWindowsHookEx( WH_KEYBOARD, KeyboardProc, hInstance, GetCurrentThreadId() );
|
|
|
|
|
how to convert from c style char string to bstr.I am going to use it in win32 application.so i want the appropriate macro.May be some macro will work in ATL classes.
|
|
|
|
|
You can use _bstr_t class to manipulate BSTRs. See MSDN.
Pavel
Sonork 100.15206
|
|
|
|
|
There are a whole bunch of conversion macros. You will have to look up MSDN for which one you need. Searchfor A2W, A2OLE, USES_CONVERSION. You should be able to find the right macro. Or alternatively use the _bstr_t class.
|
|
|
|
|
|
Kinda new to MFC and I got what will probably be a simple question for everyone to answer. In regards to property pages and tab pages, do the controls that you put on them have to be created at runtime? I know with just a simple dialog I can use the resource editor to add controls at design time but I'm not sure how to do it with property pages and tab pages.
Thanks for the help.
- Monrobot13
|
|
|
|
|
monrobot13 wrote:
do the controls that you put on them have to be created at runtime?
No, you can work with your CPropertyPage derived classes like with CDialog derived ones. Use wizard to add property sheet with pages to your project: in VC6 menu select Project/Add to project/Components and Controls, then go to Visual C++ Components, select Property sheets and press Insert.
Pavel
Sonork 100.15206
|
|
|
|
|
-> First of all excuse my English
-> My answer:
You can, but you don't have to,
You have to create the property pages (tabs) and the property sheet (tabs recipient) separately.
In order to do that, you must create the property sheet class:
1. Menu insert -> new class.
2. Type the new class name.
3. Select the CPropertySheet base class.
Now you have the property sheet created, but this won't have any tab (property page).
To create pages (PropertyPages) you will have to:
1. Create a dialog resource (a normal dialog)
2. in the dialog properties select:
2.1. (Tab styles) Style = child
2.2. (Tab styles) Border = thin
2.3. (Tab styles) checked Title Bar (the other options in this tab must be unchecked)
3. Doubleclick the dialog (in order to create a new class for it)
3.1. Write the new name of the class.
3.2. Select the CPropertyPage base class.
Now you have created a property page and a property sheet, you can create all the property pages you want. (Surely there will be a limit of property pages, I don’t know it…)
Now you have to insert the property pages to the property sheet.
In order to do that:
Make sure that you have included the header files of the PropertyPages in the header file of the Property Sheet:
<br />
#if !defined(AFX_PSPARAMETRITZACIONS_H__8CB4FA88_5A89_4479_A479_4734680B1775__INCLUDED_)<br />
#define AFX_PSPARAMETRITZACIONS_H__8CB4FA88_5A89_4479_A479_4734680B1775__INCLUDED_<br />
<br />
#if _MSC_VER > 1000<br />
#pragma once<br />
#endif // _MSC_VER > 1000<br />
<br />
#include "PPDlgParametritzacions.h" <br />
…<br />
And you should add a PropertyPage variable for each PropertyPage that you want to add:
CPropertyPageClassThatYouWillHaveAdded m_CPPCTYHA;
In the constructor of the Property sheet class you should add the PropertyPages:
this->AddPage(&m_CPPCTYHA);
And that’s all…
(Just kidding…)
You will need to call the Property sheet:
In order to do that:
You should include the CMyPropertySheet class (header file) to the header file of from where you want to include the property sheet call.
Add a variable of the type CMyPropertySheet in the same class (dialog or xxx) from where you want to call the property sheet:
CMyPropertySheet m_MyPropertySheet;
(In order to try it you can create a CButton in a dialog) and in its click event you can call
m_MyPropertySheet.DoModal();
Hope this helps...
Its possible that I have done a typing error or that I have missed something, if this don't works, email me (or try it by yourself...).
|
|
|
|
|
Thanks for the info that helps out quite a bit. Just so I'm clear is it pretty much the same deal for tabpages?
|
|
|
|
|
AAArgh!
what a mess!
I have written down a lot for nothing!
sorry, as I told you I'm not a natural english speaker...
but, I think that there is an article that can help you:
http://www.codeproject.com/listctrl/listctrldemo.asp
it is a listctrl article, but it uses tabcontrols...
hope this helps more...
sorry, you must be still laughing...
|
|
|
|
|
I think you miss read my message because your post actually helped me out and I didn't really see any problem with your english at all. Sorry if it sounded like it didn't help me.
|
|
|
|
|
I want to create a list of five currencies, which can be selected by typing the number 1 thru 5. Depending on the number selected would display a message to input a currency amount. The currency amount would then perform a calculation and display the amount in US dollars. If a number or character other than 1 thru 5 is selected, then an error message would display, and a prompt to select the correct number.
|
|
|
|
|
Cool school assignment. I hope you will have an A for it (by yourself).
Michel
It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard
|
|
|
|
|
I need to include a .lib file in my project and to use
classes defined inside it.
I have set the name of the .lib file in the project
settings (Link section)and I have placed it in the
project folder.
Now I don't know how to access to the library content !!!
What have I to do???
Thanks a lot
|
|
|
|
|
Include its header file. If its Windows lib, see documentation in MSDN.
--BlackSmith--
/*The roof is on fire, we don't need no water, let the MF burn*/. BHG.
|
|
|
|
|
Just one additon:
Instead of adding the file to the project settings you can also put this line into your sourcecode:
<br />
#pragma comment(lib, "yourlib.lib")<br />
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I have a problem with a DialogBox where the code and it's resources are all in a DLL. I want the dialog to act like
a Dialog based app when it is "called up". Meaning I want it to have a taskbar icon, minimize, etc. I have disabled the Maximize and Size
commands from the system menu. The dialog can be "called up" by an entry point in the DLL, or by a RUNDLL32 style entry point
int the dll. The dialog behaves properly under W2K, but under Win9X I get no taskbar icon and when I minimize the dialog I get a
very small window that sit right above the taskbar in the lower left corner of the screen.
Can anyone provide me with some help on this ?
Thanks in advance
Tony Teveris
Here is my dialog setup
IDD_FONTMANAGER DIALOG DISCARDABLE 0, 0, 500, 293
STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION |
WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "Gerber Font Manager"
MENU IDR_MENU1
FONT 8, "MS Sans Serif"
BEGIN
.
.
.
END
Here is the dialog class init
CFontManagerDlg::CFontManagerDlg(CWnd* pParent /*=NULL*/)
: CDialog(CFontManagerDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CFontManagerDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDI_FONTMANAGEMENT);
.
.
}
Here is my Dialog INIT code
BOOL CFontManagerDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// subclass self draw listboxes
// m_Styles_List.SubclassListBox(IDC_STYLES_LIST,this);
m_NotSecured.SetTextColor(FT_I_NOT_VALID_FONT_COLOR);
m_NotInCatalog.SetTextColor(FT_I_NOT_ON_CD_COLOR);
m_NotInCatalog.SetWindowText("");
CMenu* pSysMenu = GetSystemMenu(FALSE);
pSysMenu->EnableMenuItem (SC_MAXIMIZE,MF_BYCOMMAND | MF_GRAYED);
pSysMenu->EnableMenuItem (SC_SIZE,MF_BYCOMMAND | MF_GRAYED);
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
.
.
.
return TRUE
}
Tony Teveris
Gerber Scientific Products
Senior Software Engineer
Phone: 860 648 8151
Fax: 860 648 8214
83 Gerber Road West
South Windsor, CT 06074
|
|
|
|
|
If I have a CEDit and a "DONE" button, after I finish entering text and press DONe, I can do something with the GetWindowText
from the edit.
What I want is for the user to hit Enter after he is all done entering text in the CEdit and then for the code thats in the OnDone function to run. (So I do not even have a DONE button). Somehow I want a function to run when I hit enter on this CEdit (and not anywhere else on the UI). Its done commonly in all Windoiws apps but all I have found is EN_CHANGE for CEit and taht just traps character by character, not on the final Enter.
Thanks,
ns
|
|
|
|
|
Use GetWindowText and your OnDone code in CMyDialog::OnOk() asuming it's a Dialog your using.
Or read Mike Dunn's FAQ thers's a link on top of the page!
van Padoea.
|
|
|
|
|
One way would be to override PreTranslateMessage in your dialog and catching the enter key:
BOOL CMyDialog::PreTranslateMessage( MSG* pMSG )
{
if ( pMSG->message == VM_KEYDOWN && pMSG->wParam == VK_RETURN )
{
if ( GetFocus( ) == &m_wndMyEditBoxThatIWantToCatchTheEnterKeyIn )
{
}
}
}
Of course there are many other ways also.
Hope this helps,
- d a b s -
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|