|
When i m using Tabstop property of controls,then the cursor go to the next control on the clicking of Tab Key.
Cursor go to on all Controls like EditBox,CheckBox,Radio Button,Button etc,but the cursor not come on ListCtrl.
So plz tell me when i press the TabKey how can i focus on ListCtrl.
Thanks.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Good day for all.
I am a beginner in VC++. I have a question about the remote shutdown of the computers in local area network.
Server and clients are connected using WinSock - Simple Chat.
Have i a way to shutdown this computer woithout creating COM-objects ?
|
|
|
|
|
|
hi, is it possible to load a txt-file into the combobox list?
any suggestions on how to do this easy..
tanx
EDIT: nevermind, i found some working code to load csv files into combos dropdown..
modified on Saturday, June 7, 2008 8:17 AM
|
|
|
|
|
Text file in ComboBox????????????
-@SuDhIrKuMaR@-
|
|
|
|
|
yes, to load a list from a text-file into the combobox drop down list.
some code to load the file and split it with commas or something,
and then somthing like:
m_myComboCtrl.AddString(1rstLineInFile);
m_myComboCtrl.AddString(2ndLineInFile);
and so on.
|
|
|
|
|
Yes its possible but you dont use of Editbox or ListBox or ListCtrl?
|
|
|
|
|
I am doin the following...
Class A
{
public:
void out_func1();
class B
{
public:
string path;
in_func1();
};
};
How do I use the value of path in 'out_func1()'??
I tried ...
void A::out_func1()
{
B obj;
obj.path;
ofstream myfile;
myfile.open (obj.path.c_str(), ios::app);
...
}
This causes problem during runtime and the program crashes
Please let me know how to rectify this.
THANKS.
|
|
|
|
|
It seems you are using it correctly except that you are not setting the file path so the IO to the file will fail. Are you sure program is crashing in this function? Have you actually debugged to see where is the crash?
-Saurabh
|
|
|
|
|
Well, since you haven't initialized the obj.path variable, not wonder if the application doesn't behave correctly.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
I am sorry. This is how it is...
My Class is defined in newclass.h as...
Class A
{
public:
void out_func1();
void out_func2();
class B
{
public:
string path;
in_func1();
};
};
I then Get the path at intialize.cpp as follows....
void A::out_func1()
{
B obj;
obj.path="c:\folder\file1.txt";
}
Then I try to open the file to write in write.cpp...
void A::out_func2()
{
B obj;
ofstream myfile;
myfile.open (obj.path.c_str(), ios::app);
...
}
This crashes.I have included the header initialise.h too.
Please let me know were I could have gone wrong. I think I am having problem with the scope of the varible. But I am not sure.
THANKS.
|
|
|
|
|
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
|
|
|
|
|