Thanks for help "on help";). I couldn't find hpj file on the second computer, but I found it in the folder I copied the project from and edited it.
dart13
Posts
-
problem with building help -
problem with building helpI have copied SDI app project from one computer to another. Visual studio on the first is installed on d: partition, so when I try to build app on second I get this error:
MySDIApp.hpj HC5011: Error: MySDIApp.hpj : Cannot open the file "d:\Microsoft Visual Studio\VC98\MFC\include \afxhelp.hm."
Which setting should I change to fix this problem? -
Navigating through CForimView controlsI just want to move focus from one button to another, so the desired button can be activated by pressing ENTER. It is possible to move focus with TAB key as well as with arrow keys, but focus goes from one button to the other as it was set in Layout -> Tab Order. What I want to accomplish is to move focus in one of four directions using arrow keys, but I am not sure what's the best way to implement this behaviour.
-
Navigating through CForimView controlsHow to implement movement between button controls placed on a CFormView with arrow keys? Buttons are positioned like chessboard squares - so when the arrow key for left is pressed the focus should move to the button placed left and so on. Should SetFocus() be overriden?
-
Changing colors in VS6 image editorI created a bitmap image with image editor in VS6 and attached to a CButton. However, there is a problem with showing colors accurately. I changed light gray - RGB(192,192,192) that was in original palette with RGB(208,208,200) using Adjust Colors... in Image menu, but when the app starts the bitmap's color is the old light gray. What should I do to fix this problem?
-
CStatic window textText in a CStatic control, which is on CFormView (SDI app), gets erased after CPropertySheet dialog ends. Dialog is called from the menu. Does anyone knows what's the reason for such behaviour and how to prevent it?
-
Closing SDI applicationThank you.
-
Closing SDI applicationWhat code should I put in a handler for CButton in order to close SDI application? I tried with
PostMessage(WM_QUIT)
, butCDocument::OnCloseDocument()
doesn't get called in this case. CButton is created in a CFormView class. -
Capture Keyboard InputThe solution Andy Q gave you should work with tab and enter keys. I used a similar technique to trap Enter key in a form view.
BOOL CMyFormView::PreTranslateMessage(MSG* pMsg) { // keyboard input for 'enter' and 'esc' if(pMsg->message==WM_KEYDOWN) { if(pMsg->wParam == 0x0d) // if Enter pressed { //your handler return TRUE; } else if(pMsg->wParam == 0x1b) // if Esc pressed { //... return TRUE; } } return CFormView::PreTranslateMessage(pMsg); }
-
problem with inline keywordThanks for help. The inline function was in a CPP file. Does this rule of putting inline functions in a header file applies only to VC++ or it is a part of standard?
-
Please help me. how to attach a dialog to a view?Just use CFormView class.
-
problem with inline keywordThe function is a member function of derived CDocument class, and I use it to access protected member variable which I created. If it is used within CMyDoc then it's ok, but when I call it from CMyView then the linker reports that error. Here is a full text of the error msg:
MyVew.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CMyDoc::IsButtonPressed(void)const " (?IsButtonPressed@CMyDoc@@QBE_NXZ)
-
Design issue with SDI appThanks for your input. I'll probably opt for registry.
-
problem with inline keywordI have a function in CDocument file which I declared inline. When I call it from CView class, the linker reports LNK2001 error. If it's not inline then it works fine. Does anyone know what might be the problem?
-
Mapping array of CButtonsthanx for your help. I appreciate it.
-
Mapping array of CButtonsThanks for your help, but shoudn't DoDataExchange() be in some way involved in this? I have an array CButton btns[10] that need to be 'connected' to 10 buttons on a dialog form. If I use ClassWizard (Member Variables) I can map each button with a single CButton variable, but it doesn't allow me to use btns[0], for example, as a name of a variable.
-
Mapping array of CButtonsIt being CMap. Sorry for misunderstanding.
-
Mapping array of CButtonsI looked in MSDN, but I'm not quite sure if I know how to use it in this case.
-
Mapping array of CButtonsHow to map array of CButtons to button resources on Dialog form?
-
closing dialog by clicking on itYou can do it like this:
void CAboutDlg::OnRButtonDown(UINT nFlags, CPoint point) { SendMessage(WM_CLOSE); CDialog::OnRButtonDown(nFlags, point); }
and then in OnClose(), you can do the cleanup. OnClose() is called after WM_CLOSE is processed, I guess. So it doesn't actually close the window.