|
It will be created automatically when opening project
|
|
|
|
|
What if it isn't? I rebuild the project many times and it is not there. NCB files must be a compiler option somewhere...
Norman Fung
|
|
|
|
|
The intellisense database is rebuilt when you open the solution/project, not when you rebuild it.
I'm not sure where the options are in VC6 but look in help for Intellisense. In VS2003 the settings are in the Tools|Options dialog in the Text Editor section.
Mark
|
|
|
|
|
Hi,
I have two list boxes ( ListBox1 and ListBox2 ) and an EditBox ( Edit1 ) box.
1. Select an item in ListBox1.
2. Enter a string in EditBox and Press Enter Key.
3. The String will go to ListBox2.
4. Like that add any number of items by selecting an item in ListBox1.
Problem : When we select an item in ListBox1, ListBox2 should display all the items we entered under ListBox1 dynamically. How I can achieve this ?
It's kind of fun to do the impossible.
|
|
|
|
|
Create in memory a data structure to store all items in Listbox2 associated with each item in Listbox1. A dictionary or hashing table will be appropriate. When adding an item to listbox2, again adding it to that data structure. When selected item in listbox1 changed, reload all items associated with listbox1 selected item to listbox2.
Hope that helps
|
|
|
|
|
Think about using a collection class for storing the data(CMap will be better choice)..
Put the item in list1 as "Key" and the items corresponding to it in List2 as "value"(use CStringArray here).
|
|
|
|
|
I would like to know how to disable the joystick by programming?
Please help!
|
|
|
|
|
I have a appication to load menu from resource, and want to change the menu style dynamically from "POPUP" to "STRING".
I wrote the following code:
pSubMenu->ModifyMenu(6,MF_BYPOSITION|MF_POPUP,(UINT)m_Menu.m_hMenu,"xxxM(&I)\tI");
m_Menu is a pop menu.
And now i want to change the menu style to "STRING":
pSubMenu->ModifyMenu(6,MF_BYPOSITION|MF_STRING,(UINT)IDM_RECV,"xxxM(&I)\tI");
The menu caption and icon was changed, but the menu was still "POPUP" style.
Who can tell me how to solve this problem?
Help!!!
-- modified at 22:52 Thursday 23rd November, 2006
hi
|
|
|
|
|
Hello, where can I found an example to communicate with a database in windows mobile (in native c++ and simple sql strings)
I found on the net that I must use OLEDB with SQL Server Mobile
In java it's very simple to do that
thx
|
|
|
|
|
What kind of database do you have or need?
Do you plan to have the data locally? I have worked on a mobile application where we just took a snapshot of data as XML locally. We could then just use some standard XML access code for navigating the data.
|
|
|
|
|
hi, I need a real database with sql support for insert records and also query the database
|
|
|
|
|
I assume Java worked because you had a library you could use. So maybe you could take the same approach with implementing this in C++, look for a library.
Gooling I found: http://www.sqlapi.com/[^]
If your mobile database does not need to connect to another database then you could choose any database supported by the library you choose to use. You might want to look around more to find one with a small foot print.
|
|
|
|
|
|
What is length (i.e. how is declared)?
|
|
|
|
|
I think the problem is the line before the one you've highlighted
try changing
open.read((char*) length, sizeof(short));
to
open.read((char*)(&length), sizeof(short));
System.IO.Path.IsPathRooted() does not behave as I would expect
|
|
|
|
|
|
No worries
What about this...
// Add a terminator
buf[4] = '\n';
usually you would terminate a string with '\0'
System.IO.Path.IsPathRooted() does not behave as I would expect
|
|
|
|
|
Oops... I'm just used to seeing that \n all the time... Thanks!
Windows Calculator told me I will die at 28.
|
|
|
|
|
Please suggest me any correction for this code.
This code is saving image in inverted format.
//This is for getting data from clipboard in CBitmap's object.
OpenClipboard();
Glb=EnumClipboardFormats(0);
HANDLE hBitMap = GetClipboardData(Glb); //getting from clipboard
if(hBitMap == NULL)
{
AfxMessageBox("Error in Capturing Image");
return;
}
//CBitmap * bmp = CBitmap::FromHandle(hBitMap);
CBitmap bmp;
if(!bmp.Attach((HBITMAP)hBitMap))
{
AfxMessageBox( "Error in Loading Image" );
}
BITMAP bitmap ;
bmp.GetBitmap(&bitmap);
int size = ((bitmap.bmWidth)*(bitmap.bmHeight)*(bitmap.bmBitsPixel))/8;
BYTE *lpBits = new BYTE[size];
::GetBitmapBits((HBITMAP)hBitMap,size,lpBits);
WriteBmp("C\\Patient.bmp",&bitmap,(int*)lpBits);
CloseClipboard();
}
For writing ang saving .bmp file.......
void WriteBmp(char* name,BITMAP *bmp,int* data)
{
BITMAPINFO Bmi;
memset(&Bmi,0,sizeof(BITMAPINFO));
Bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
Bmi.bmiHeader.biWidth = (bmp->bmWidth);
Bmi.bmiHeader.biHeight = (bmp->bmHeight);
Bmi.bmiHeader.biPlanes = 1;
Bmi.bmiHeader.biBitCount = bmp->bmBitsPixel;
Bmi.bmiHeader.biCompression = BI_RGB;
Bmi.bmiHeader.biSizeImage = bmp->bmHeight*bmp->bmWidth*bmp->bmBitsPixel/8;
FILE* image = fopen (name,"wb");
if(image==0)
return;
int h = abs(Bmi.bmiHeader.biHeight);
int w = abs(Bmi.bmiHeader.biWidth);
Bmi.bmiHeader.biHeight=h;
Bmi.bmiHeader.biWidth=w;
int sz = Bmi.bmiHeader.biSizeImage;
BITMAPFILEHEADER bfh;
bfh.bfType=('M'<<8)+('B');
bfh.bfOffBits=sizeof(BITMAPFILEHEADER)+ sizeof(BITMAPINFOHEADER);
bfh.bfSize=sz+bfh.bfOffBits;
bfh.bfReserved1=0;
bfh.bfReserved2=0;
fwrite(&bfh,sizeof(bfh),1,image);
fwrite(&Bmi.bmiHeader,sizeof(BITMAPINFOHEADER),1,image);
fwrite(data,sz,1,image);
fclose(image);
}
|
|
|
|
|
|
you have to invert the sign of biHeight see the following excerp of (MSDN):
biHeight
Specifies the height of the bitmap, in pixels. If biHeight is positive, the
bitmap is a bottom-up DIB and its origin is the lower-left corner. If
biHeight is negative, the bitmap is a top-down DIB and its origin is the
upper-left corner.
hope that helps.
|
|
|
|
|
Hi Everyone,
I have created a .Net User control which includes reference to a C++ /CLI component developed with /clr . Since there are some unmanaged resoucrces, i am calling the disposing the C++ /CLI in the dipose method of the user control. If we drag and drop this control in to a Windows form and then try to delete it,it is throwing an exception that the "C++ / CLI " dll could not be located.... however it is working fine while running the application
can anyone help me out.The sample code is
///
/// Clean up any resources being used.
///
/// <param name="disposing" />true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
if (unmanagedComponent != null)
{
unmanagedComponent = null;
}
}
|
|
|
|
|
|
Hello there.. I have a CTreeCtrl which has the checkboxes style set. I would like all the checkboxes to be set (ticked) by default.
I have function which loops around all the tree items and calls SetCheck() on each tree item.
However when calling this function from inside OninitDialog the checkboxes do not get set.
If i call this function afer the OninitDialog it works fine. Can anyone help me here.
|
|
|
|
|