|
You're very welcome. Now that I've finished my "Extending MFC Applications with the .NET Framework" book, I'll be putting up a book support site this weekend that will contain things like an errata and discussion board. If you'd like I'll email you once it's live (aiming for Monday).
Cheers,
Tom Archer
Inside C#, Extending MFC Applications with the .NET Framework
It's better to listen to others than to speak, because I already know what I'm going to say anyway. - friend of Jörgen Sigvardsson
|
|
|
|
|
I would very much like that; yes please. I'm also the happy owner of Inside C# 2nd Ed, i.e. such a site could come in handy
Thanks again...
|
|
|
|
|
Greetings,
I am trying to print some text data from a form view, and I overwrote the "OnPrint" to ouput text data from some edit fields on the form. I just get the string member data from the edit boxes, and do a drawstring on the dc.
The printed hard copy output of the text outputs fine, but when I do a preview of the text it appears to be a much smaller font size, and hardly shows up in the preview window.
I assume it has something to do with it be screen coordinates, whereas the printer coordinates are different. But I am not sure.
Thanks in advance for any suggestions.
|
|
|
|
|
Does anyone know how to implement docking toolbars in a dialog app? There are articles about toolbars in dlgs but the ones for docking all use EnableDocking called on CMainFrm which as far as I can see is not available.
|
|
|
|
|
Add a toolbar data member to your dialog class then in oninitdlg
m_Tool.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC );
create your toolbar
then right after that call
RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);
and that should do it
|
|
|
|
|
Hi!
I have a problem
Well, I have a MS Web Browser activeX in my application, and I want to fill in automatically the username and password in a htaccess authenticatification window (like logs.powerhouseprogramming.com [^]). If you have any idea at all how to do this, please let me know.
Thanks!
PS: you can write directly to dorutzu@personal.ro
|
|
|
|
|
yea..I also wanted to know what if we wanted to fill the form on the webpage automatically (This is bit different that the question asked)
like latest GOOGLe toolbar does...
Thnaks in advance..
|
|
|
|
|
You probably could use appropriate POST request, but it will require some winsock spying. I assume that site intstalls cookie on authorisation.
However, I would probably go with well tested by me techniques of just writing win32 hook, or spawning a separate thread:
that will wait for:
1. ShowWindow or FindWindow (Caption: "Enter Network Password", class #32770(Dialog));
2. GetDlgItem(0x411) -> should exist, it should be static control and GetWindowText should return "logs.powerhouseprogramming.com";
3. GetDlgItem(0x4C2) -> should exist, it should be edit control and here you SetWindowText to "UserName";
3. GetDlgItem(0x4C3) -> should exist, it should be edit control and here you SetWindowText to "Password";
4. After you've done all 3 above: just Send or PostMessage to the dialog: WM_COMMAND, IDOK --> "OK" button has id=1 (IDOK)...
Use SPY to see if I'm right in above sequence.
Don't blame me, not the best solution: but fast to implement...
Regards
"...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..."
Me
|
|
|
|
|
I have an application where the user opens many files at once ( MFC MDI ), and the filenames are stored in the MRU list under the File menu. That is fine with me. I would like to disable all these filenames showing up under "Recent Documents" in Windows XP. Is there a way to open files in Win32 and MFC so that the documents do not show up in this list ?
|
|
|
|
|
Are you not wanting files added to the MRU list itself (a CRecentFileList object maintained by CWinAPP), or are you just not wanting the items from the MRU list showing up in the File menu?
Read Paul DiLascia's August 1999 MSDN article about this very subject.
http://www.microsoft.com/msj/0899/c/c0899.aspx
|
|
|
|
|
Checking the MSDN
void LoadStdProfileSettings( UINT nMaxMRU = AFX_MRU_COUNT );
states
Call this member function from within the InitInstance member function to enable and load the list of most recently used (MRU) files and last preview state. If nMaxMRU is 0, no MRU list will be maintained.
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
Sorry, maybe I'm not being clear.
When you click on the start button in Windows XP, a small window pops up and one of the selections is "My Recent Documents". I do not want my files to be added to THAT list.
|
|
|
|
|
Hi,
I'm having a problem with a combobox using VC++ 6 and Windows 98.
When I click in the combobox and call his ondropdown event, it seems that the mouse focus stays in this object and if I click (using mouse) in another control of the dialog, my code calls again the ondropdown event of this combobox.
So, I'm not able to click using mouse in another part of the dialog.
Some tests I have made show that this behaviour occurs just on Windows 98 SO.
Could anybody help me out, please?
Thanks in advance,
Felipe
|
|
|
|
|
I has found a article in the Knowledge Base Q326254.
The important point is
... When the ComboBox control is dropped down, the ComboBox captures the mouse to use its input to select the items that are in the ComboBox. ...
It means, only the ComboBox receives mouse messages while they is dropped down.
MatLin
|
|
|
|
|
Hi all,
I wish to create a dialog from within my non-mfc dll. I want to start the dialog as soon as possible! Can I do it in PROCESS_ATTACH...? The docs says only simple initialization is allowed there.
Anyone?
/T
|
|
|
|
|
In DLL_PROCESS_ATTACH, I call a function that creates and displays the window. Don't know if this is the correct way, however it works like a charm.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Can you not have the dialog as a static instance of the dll? Then the dialog will be constructed as soon as the dll is loaded, and its done in the correct order?
|
|
|
|
|
Another way is to define a function Initialise, and when the app loads the dll, call GetProcAddress(yourdllhandle, "Initialise"), which returns a pointer to the function which you can use to start the dialog, whether its modal or not.
|
|
|
|
|
Read the docs on DllMain() , it has lots of warnings about what you aren't supposed to do, such as call APIs outside of kernel32. If your code works, then you're lucky.
--Mike--
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
Latest art~!@#2rDFA#@(#*%$Rfa39f3fqwf--=
NO CARRIER
|
|
|
|
|
Oh, I must have overread it, thanks for the info. Maybe I should redesign my code
modified 12-Sep-18 21:01pm.
|
|
|
|
|
|
Ok... so HOW then do I create and call a dialog/window in a dll as soon as possible...?
Actually, what I want is a splash screen that kicks in when somebody calls LoadLibrary(mydll).
/Tommy
|
|
|
|
|
Inside PROCESS_ATTACH, is this a bad thing to do you mean:
----
hSplash = CreateWindow(
"BUTTON",
"Tommy testing Splash Screen...",
WS_POPUP | BS_FLAT,
(sx-W)/2, (sy-H)/2,
W, H,
NULL,
NULL,
hdll,
NULL);
ShowWindow(hSplash, SW_SHOW);
UpdateWindow( hSplash);
}
// ... processing ...
if ( hSplash)
DestroyWindow( hSplash);
----
|
|
|
|
|
I have not yet resolved my problem ... can anyone help me ?
read this
read this topic
|
|
|
|
|
from :|http://www.codeproject.com/listctrl/changerowheight.asp
Problem:
I don't receive a WM_SETFONT or WM_MEASUREITEM message.
(Damian Williams, 1999-10-18)
Solution:
Modify the style of the list control to "owner draw fixed" (LVS_OWNERDRAWFIXED).
Overload CListCtrlEx::DrawItem().
A WM_MEASUREITEM message will be sent to a parent window of list control.
(Chung Hyun, Lee, 2000-05-25)
Solution 2:
Class Wizard does not show you the =WM_MEASUREITEM reflected message. If you use Class Wizard to get WM_MEASUREITEMS, it can only be handled by a class other than the list view control, i.e. a parent window. This is not satisfactory. To get a reflected message you must add the following in the message map in your .CPP file:
ON_WM_MEASUREITEM_REFLECT()
|
|
|
|