open the menu options, go to the directories tab and add the directx include paths on top of all include paths in the IDE directories.
k_dehairy
open the menu options, go to the directories tab and add the directx include paths on top of all include paths in the IDE directories.
k_dehairy
i am using unicode when displaying strings from the string table on a message box AfxMessageBox(IDS_MSG_STRING, ...); where IDS_MSG_STRING is an entry in the sting table, the following occure: 1- in debug mode: every thing foes nice. 2- in release mode: the message box pops up as usual but displaying the following string "an unnamed file". why is that and how to avoid it? thankx in advance
k_dehairy
I already drived a class from the CToolBar and implemented the ON_NOTIFY_REFLECT(NM_CUSTOMDRAW, OnCustomDraw) within it, and it worked fine untill I implemented the xp theme manifest in the application!! why is that? I don't know? .. I need help on that thanks very much for your care .. really
k_dehairy
how can i implement the NM_CUSTOMDRAW message for the default Toolbar for an MDI application (toolbar ID = IDR_MAINFRAME) ? thanks in advance ..
k_dehairy
you still need to put your ADO code in a try .. catch blocks, just like what I pointed earlier. then tell me what did the messagebox say. generally speeking any code that deals with COM objects (like ADO) is better written inside try .. catch blocks. k_dehairy
to allocate memory for an object of type OBJECT OBJECT* obj = new OBJECT;
to allocate memory for an array of objects of type OBJECT OBJECT* obj = new OBJECT[array_size];
to deallocate memory for an object of type OBJECT delete obj;
to deallocate memory for an array of objects of type OBJECT delete [] obj;
k_dehairy
first put your code inside a try catch block: try { //your ADO code } catch(_com_error &err) { AfxMessageBox(err.Description()); }
this will issue a message box with the error description returned by the ADO.Recordset object no body can help you with this error with the information you supplied here!! k_dehairy
Try using this member function of the dialog //this will hide the title ModifyStyle(WS_CAPTION,0); //then call SetWindowPos() with cx and cy of your own ::SetWindowPos(m_hWnd,HWND_TOP,0,0,cx,cy,SWP_SHOWWINDOW);
to get it back: //this will show the title ModifyStyle(0,WS_CAPTION); ::SetWindowPos(m_hWnd,HWND_TOP,0,0,cx,cy,SWP_SHOWWINDOW);
good luck my friend k_dehairy
I guess I am lucky !! .. thanks very much but.. I put the code in the OnCreate() in the CFrameWnd derived class. It worked with the menu. For the title bar it became not functioning but still here, visible. Why is that? and again thank you --------------------------------- I just tried this now It worked when I made a call to SetWindowPos() but Why is that? k_dehairy
there certianly is more, cause I tried that and .. !! Could you be kind and try with me ? k_dehairy
Does any body knows how to remove the title bar and the menu from the main frame window in an SDI application with MFC ??? k_dehairy
well .. sizing a dialog is a little bit deferent than other kind of windows, because of its measuring units. In a dialog when you say that width = 100, it doesn't mean 100 pixels (!!) it means 100 dialog units (depends on the font you are using in the dialog). open user dialog resource in the visual c++ and look at the status bar (right most), you will find the size of your dialog in dialog units. so, 1- write down size of your dialog when in the scientific mode (from the status bar), these are in the dialog measuring units. 2- ... CRect rect; rect.left = 0; rect.top = 0; //replace Width with the value of width you wrote rect.right = Width; //replace Height with the value of height you wrote rect.bottom = Height; //Call this function which converts the dialog units //into pixel units and pass it a pointer to rect MapDialogRect(&rect);
now you have the new size in pixel units. you can use it freely. 3- Call the function SetWindowPos() and give it the width and height of the rect. I suggest you move with the debugger to watch the change in the units after the MapDialogRect() call. hope it is helpfull good luck k_dehairy
I managed to maximize it in the CApp InitInstance() by passing SW_SHOWMAXIMIZED instead of SW_SHOW BUT... the window is shown normal first for a second then go maximixed. I want it to be shown maximized from the very begining. So... in the PreCreateWindow() of the frame window I add the following line cs.style |= WS_MAXIMIZE; but didn't work.. the question is why didn't it work and how to make it work?