|
Please help me out with the above problem.
THANKS.
|
|
|
|
|
Hi all,
How can Search a record in Access Databace,according to Month and year.While record saved in database in Medium Date format.
Thanks in Advance .
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Depends the type of column in database.
-@SuDhIrKuMaR@-
|
|
|
|
|
Means
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
I compiled and run a dialog based application in VC++ 2005, but there is no Exe in "Release" or "Debug" folder.
How to get the exe file?
Thanks,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
please check the path of "Output File" in linker option
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Hi,
It is there.
The folder structure is like:
Appl.Name\Appl.Name\(Debug and Release folder)
But the exe is created at:
Appl.Name\(Debug and Release)
ie, one folder upper level than what I checked.
Regards,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
Always use default studio settings to resolve the probem.In this case you can comapare the same setting of anather project.
-@SuDhIrKuMaR@-
|
|
|
|
|
Different max texture size for PFD_DRAW_TO_BITMAP & PFD_DRAW_TO_WINDOW.
Is there is any solution to get same max texture size?
1. I am using CreateDIBSection() for off screen rendering.
2. Which is working fine in my code as listed below.
3. But i am getting problem with textures as i am getting max texture size is 1024
4. I am getting desired 4096 texture size when i render to application window.
5. Pixel format of main application window and offscreen window is different.
6. The difference of pixel format and returned max texture size is mentioned below.
How can i get 4096 max texture size for off screen window also?
Getting 1024 max texture size
PFD_DRAW_TO_BITMAP |
PFD_SUPPORT_OPENGL |
PFD_STEREO_DONTCARE,
PFD_TYPE_RGBA,
Getting 4096 max texture size
PFD_DRAW_TO_WINDOW |
PFD_SUPPORT_OPENGL |
PFD_DOUBLEBUFFER,
PFD_TYPE_RGBA,
What pixel format should i use to get 4096 max texture size.
bool Create(unsigned int width, unsigned int height)
{
m_uiWidth = width;
m_uiHeight = height;
m_hWnd = g_pMainApplicationWindow->GetHWND();
m_hMainApplicationWindowDC = g_pMainApplicationWindow->GetHDC();
m_hMainApplicationWindowRC = g_pMainApplicationWindow->GetHGLRC();
memset(&m_bmi, 0, sizeof(BITMAPINFO));
m_bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
m_bmi.bmiHeader.biWidth = m_uiWidth;
m_bmi.bmiHeader.biHeight = m_uiHeight;
m_bmi.bmiHeader.biPlanes = 1;
m_bmi.bmiHeader.biBitCount = 32;
m_bmi.bmiHeader.biCompression = BI_RGB;
m_bmi.bmiHeader.biSizeImage = m_uiWidth * m_uiHeight * 4;
HDC hDC = ::GetDC(m_hWnd);
m_hDib = ::CreateDIBSection(hDC, &m_bmi, DIB_RGB_COLORS, (void**)&m_pTextureData, NULL, (DWORD)0);
ReleaseDC(m_hWnd, hDC);
m_hMemDC = ::CreateCompatibleDC(NULL);
if(!m_hMemDC)
{
DeleteObject(m_hDib);
m_hDib = NULL;
return (false);
}
m_hOldDib = SelectObject(m_hMemDC, m_hDib);
if (!SetDCPixelFormat(m_hMemDC, PFD_DRAW_TO_BITMAP | PFD_SUPPORT_OPENGL | PFD_STEREO_DONTCARE))
{
SelectObject(m_hMemDC, m_hOldDib);
DeleteObject(m_hDib);
m_hDib = NULL;
DeleteDC(m_hMemDC);
m_hMemDC = NULL;
return (false);
}
m_hRC = ::wglCreateContext(m_hMemDC);
if (!m_hRC)
{
SelectObject(m_hMemDC, m_hOldDib);
DeleteObject(m_hDib);
m_hDib = NULL;
DeleteDC(m_hMemDC);
m_hMemDC = NULL;
return (false);
}
}
bool SetDCPixelFormat(HDC hDC, DWORD dwFlags)
{
HDC NewHdc = hDC;
static PIXELFORMATDESCRIPTOR pixelDesc =
{
sizeof(PIXELFORMATDESCRIPTOR),
1,
PFD_DRAW_TO_BITMAP |
PFD_SUPPORT_OPENGL |
PFD_STEREO_DONTCARE,
PFD_TYPE_RGBA,
32,
0, 0, 0, 0, 0, 0,
0,
0,
0,
0, 0, 0, 0,
16,
1,
0,
PFD_MAIN_PLANE,
0,
0, 0, 0
};
GLuint PixelFormat;
int nPixelIndex = ::ChoosePixelFormat(NewHdc, &pixelDesc);
if (nPixelIndex == 0)
{
nPixelIndex = 1;
if (::DescribePixelFormat(hDC, nPixelIndex,
sizeof(PIXELFORMATDESCRIPTOR), &pixelDesc) == 0)
return false;
}
if (!::SetPixelFormat(hDC, nPixelIndex, &pixelDesc))
return false;
return true;
}
bool DIBBuffer::StartRendering(void)
{
wglMakeCurrent(m_hMemDC, m_hRC);
BitBlt();
GLint texSize;
glGetIntegerv( GL_MAX_TEXTURE_SIZE, &texSize );
static PIXELFORMATDESCRIPTOR pfd =
{
sizeof(PIXELFORMATDESCRIPTOR),
1,
PFD_DRAW_TO_WINDOW |
PFD_SUPPORT_OPENGL |
PFD_DOUBLEBUFFER,
PFD_TYPE_RGBA,
MAIN_APPLICATION_WINDOW_BITS_PER_PIXEL,
0, 0, 0, 0, 0, 0,
0,
0,
0,
0, 0, 0, 0,
16,
1,
0,
PFD_MAIN_PLANE,
0,
0, 0, 0
};
}
|
|
|
|
|
Hi all,
i m working on vc++ 2005,i want to each validation on each control.
how can i do this.
thankns in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
You can create a general function like "ValidateString(CString strInput)" and call this function on "EN_KILLFOCUS" event of edit control with user input as argument.
Or you can validate each field separately.
Thanks,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
Hello All,
I create a simple MFC based application and compile it for 64 bit machine. but when i test it to 64 bit vista machine than error message occur.
"The application has failed to start because its side-by-side configuration is incorrect"
I googled it but not find any result.
Thanks in advanced
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
modified on Saturday, June 7, 2008 3:09 AM
|
|
|
|
|
|
Hi Suman,
Thanks for your reply
But my issue was different and now it is solved. actually the entry point is blank in setting so that error occur
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Nice to hear ur problem has been resolved..
Regards,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
I want show a list to user to select his nationality.
For this I want to store all countries in a 2D character array or in 1D CString array and use it at OnInitDialog() .
Is there any program already available for this so that I can reduce type/edit work?
Thanks,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
This will help you
Click here[^]
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
U Can CMap,CStringArray etc.
-@SuDhIrKuMaR@-
|
|
|
|
|
Hi all,
i m working on VC++2005,SDI type application,in Dialog Box for Tabstop function of control i m using both Tab Key and Enter key.i m using this code .
BOOL CDlg::PreTranslateMessage(MSG* pMsg)
{
if (pMsg->message == WM_KEYDOWN && (pMsg->wParam == VK_RETURN))
{
pMsg->wParam = VK_TAB;
}
return CDialog::PreTranslateMessage(pMsg);
}
But i want tabstop function with use of both keys working on other controls like Edit,Combo etc but not for Button.
How can i do this. please help me for this.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
One simple method is to get the controlId from pMsg->hwnd by using GetDlgCtrlID() and check whether its that of your button control. See the code snippet rewritten for you.
BOOL CDlg::PreTranslateMessage(MSG* pMsg)
{
if (pMsg->message == WM_KEYDOWN && (pMsg->wParam == VK_RETURN))
{
UINT CtrlID = ::GetDlgCtrlID( pMsg->hwnd );
if( CtrlID != IDC_BUTTON1 &&
CtrlID != IDC_BUTTON2 )
{
pMsg->wParam = VK_TAB;
}
}
return CDialog::PreTranslateMessage(pMsg);
}
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Thanks Its working, But when i click on Button then after clicking its lost the focous on Dialog Box.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
ThatsMe. wrote: Thanks Its working, But when i click on Button then after clicking its lost the focous on Dialog Box.
I didn't get it.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
i want after clicking on Button the cursor go to next control, but here the cursor is not visible after clicking on button.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
I am creating DB application using VC++ & MS Access.
To store D.O.B. to MS Access DB, in VC++ dialog which control is good, is Date Time Picker useful?
Thanks,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
yes it is nice ,Create its COleDateTime type variable for storing value in DB.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|