well ...scaling must be done with a "scaling factor" meaning... double scale=1; CreatFont.withsize(12*scale) //... that will equal to 100% scaling... scale=2; CreatFont.withsize(12*scale) //... that will equal to 200% scaling... scale=3; CreatFont.withsize(12*scale) //... that will equal to 300% scaling... everything must be done the same way ... (by a scaling factor) bitmap scaling must be done with a generic algorithm (StrechBlt is only good in winXP) or use GDI+
imsniper
Posts
-
Implement scale view -
WM_KEYDOWN -
WM_KEYDOWNlook at Win32 Hooks ... WH_KEYBOARD .. SetWindowsHookEx you can capture any type of user command (at any time)
-
Can not find classClose VC++ go and delete the "NameOfProject.clw" in the Projects directory.. then open VC++ open the project open ClassWizard it will ask you if you want to rebuild the "NameOfProject.clw" just do it and it will give you what you want
-
database with SDIfirst #include "afxdb.h" in your stdafx.h file then simply add the CRecordSet Classes into your code with the ClassWizard
-
PS or PDF display/print -
Writing helpthere are 2 1. (help workshop) ... should be in the microsoft visual tools ...if not, download it 2. (HTLP help workshop)... should be in the microsoft visual tools ...if not, download it
-
I want to hide command line windowIf you wish to use ShellExecute HINSTANCE ShellExecute( HWND hwnd, LPCTSTR lpOperation, LPCTSTR lpFile, LPCTSTR lpParameters, LPCTSTR lpDirectory, INT nShowCmd ); nShowCmd If lpFile specifies an executable file, nShowCmd specifies how the application is to be shown when it is opened. This parameter can be one of the following values: SW_HIDE Hides the window and activates another window. SW_MAXIMIZE Maximizes the specified window. SW_MINIMIZE Minimizes the specified window and activates the next top-level window in the z-order. SW_RESTORE Activates and displays the window. If the window is minimized or maximized, Windows restores it to its original size and position. An application should specify this flag when restoring a minimized window. SW_SHOW Activates the window and displays it in its current size and position. SW_SHOWDEFAULT Sets the show state based on the SW_ flag specified in theSTARTUPINFO structure passed to theCreateProcess function by the program that started the application. An application should callShowWindow with this flag to set the initial show state of its main window. SW_SHOWMAXIMIZED Activates the window and displays it as a maximized window. SW_SHOWMINIMIZED Activates the window and displays it as a minimized window. SW_SHOWMINNOACTIVE Displays the window as a minimized window. The active window remains active. SW_SHOWNA Displays the window in its current state. The active window remains active. SW_SHOWNOACTIVATE Displays a window in its most recent size and position. The active window remains active. SW_SHOWNORMAL Activates and displays a window. If the window is minimized or maximized, Windows restores it to its original size and position. An application should specify this flag when displaying the window for the first time.
-
X-MOTIF like User InterfaceHi ... I Think there is a windows version of the QT library for windows. There is also a Windows Fltk version you could try. Dont forget to look at GTK+ windows version...
-
Immediate help required for RADIO BUTTONSplease make more clear what you want
-
Data packing librariesTry out "ZLIB" it is GNU but it is worth it...
-
Want to find sample codes used to send E-Mail.Look for "CMapi" class it should exist in the codeproject,... if not.. www.google.com http://www.codeproject.com/internet/cmapi.asp the latest release.... http://www.naughter.com/cmapi.html
-
MatricesTaken from MSDN...... Array An array is a collection of like objects. The simplest case of an array is a vector. C++ provides a convenient syntax for declaration of fixed-size arrays: Syntax decl-specifiers dname [ constant-expressionopt ] ; The number of elements in the array is given by the constant-expression. The first element in the array is the 0th element, and the last element is the (n-1th) element, where n is the size of the array. The constant-expression must be of an integral type and must be greater than 0. A zero-sized array is legal only when the array is the last field in a struct or union and when the Microsoft extensions (/Ze) are enabled. Arrays are derived types and can therefore be constructed from any other derived or fundamental type except functions, references, and void. Arrays constructed from other arrays are multidimensional arrays. These multidimensional arrays are specified by placing multiple [ constant-expression ] specifications in sequence. For example, consider this declaration: int i2[5][7]; It specifies an array of type int, conceptually arranged in a two-dimensional matrix of five rows and seven columns 5 ROWS X 7 COLUMNS!
-
How to ignore Window activate ?Sorry about previews post... You must also disable the "Desabled" style from "More Styles" in the resource editor and use this m_UpdateDlg.ShowWindow (SW_SHOWNA); m_UpdateDlg.ModifyStyle (WS_DISABLED,NULL,0); instead of m_UpdateDlg.ShowWindow (SW_SHOWNOACTIVATE);
-
How to ignore Window activate ?First create the Dialog that you want with the resource editor. BE CAREFULL YOU MUST REMOVE THE "Visible" style from ("More Styles") in the dialog properties. OR YOU WILL GET A CRASH.!! Then you must Create a new Class Inherited from CDialog. Lets say CUpdateDialog :: public CDialog with a resource template.. (the dialog editor); then Create a variable (Object) of the new class. Lest say CUpdateDlg m_UpdateDlg; then go .... m_UpdateDlg.Create (IDD_UPDATEDIALOG,this); // This will actuallly do the trick! m_UpdateDlg.ShowWindow (SW_SHOWNOACTIVATE);
-
Execution questionLook for Singleton applications...
-
trapping keyboard messageCEdit is a CWnd object maybe you can Overide afx_msg void OnChar( UINT nChar, UINT nRepCnt, UINT nFlags );
-
COLORREFWell .. COLORREF can handle 16 million colors i dont think that there are names for each one of them... What you could do is to have a small array or string resource that you can map to the default colors (white, black,green,yellow,blue....) you know ..the basic ones.
-
Maximizing app at startup - how?Both of them are correct!! but only if you join both of their answers at InitInstanse there is a variable called p_MainWnd do the following p_MainWnd->ShowWindow(WS_MAXIMISE); a good place to put it is at the end of that function
-
Dos command from mfc appOne Way is This UINT WinExec( LPCSTR lpCmdLine, // address of command line UINT uCmdShow // window style for new application );