Click here to Skip to main content
15,899,313 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: showing graphics in view after closing dialog Pin
vcplusplus25-Oct-03 23:49
vcplusplus25-Oct-03 23:49 
QuestionHow to display Real-Time data Pin
JAM0124-Oct-03 13:11
JAM0124-Oct-03 13:11 
AnswerRe: How to display Real-Time data Pin
vcplusplus24-Oct-03 15:35
vcplusplus24-Oct-03 15:35 
AnswerRe: How to display Real-Time data Pin
Azghar Hussain24-Oct-03 22:56
professionalAzghar Hussain24-Oct-03 22:56 
GeneralRe: How to display Real-Time data Pin
JAM0125-Oct-03 11:49
JAM0125-Oct-03 11:49 
GeneralRe: How to display Real-Time data Pin
Azghar Hussain25-Oct-03 17:09
professionalAzghar Hussain25-Oct-03 17:09 
GeneralHelp!! .Net building errors Pin
Anonymous24-Oct-03 10:36
Anonymous24-Oct-03 10:36 
Generaltrying to make a rainbow out of a palette Pin
ns24-Oct-03 10:29
ns24-Oct-03 10:29 
Paintbrush wont open the image created by this code:out of memory for no apparent reason:

	FILE* fp = fopen("E:\\ATrainerNew\\AS3Train\\STrain23d\\Pallett.bmp","rb");

	fseek(fp,0,SEEK_SET);
	fseek(fp,0,SEEK_END);

	long sz = ftell(fp);

	if (sz == -1L) return(1);
	
	char* pImagePointer  = new char[sz];;

	fseek(fp,0,SEEK_SET);

	int rtn = fread(pImagePointer,sz,1,fp);

	fclose(fp);

	if (rtn != 1) return(1);

	PBITMAPINFO pBMInfo = (PBITMAPINFO)(pImagePointer + sizeof(PBITMAPFILEHEADER));

	int numberOfRows    =  32;
	int numberOfColumns = 256;

	pBMInfo->bmiHeader.biWidth = numberOfColumns;

	pBMInfo->bmiHeader.biHeight = numberOfRows;

	unsigned char* pPixel = (unsigned char*)(pBMInfo->bmiColors) + 1024;

	int i,j;

	for (i = 0 ; i < numberOfRows ; i++)
		for (j = 0 ; j < numberOfColumns ; j++) *pPixel++ = j;

	FILE* fpOut = fopen("e:\\rainbow.bmp","wb");

	int nPixel = numberOfColumns * numberOfRows;

	int size = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + 1024 + nPixel;;
	fwrite(pImagePointer,size,1,fpOut);
	fclose(fpOut);

	return 0;
}


Thanks for the help,
ns
GeneralRe: trying to make a rainbow out of a palette Pin
igor196024-Oct-03 11:05
igor196024-Oct-03 11:05 
GeneralRe: trying to make a rainbow out of a palette Pin
Ravi Bhavnani25-Oct-03 17:40
professionalRavi Bhavnani25-Oct-03 17:40 
GeneralRe: trying to make a rainbow out of a palette Pin
ns3-Nov-03 5:23
ns3-Nov-03 5:23 
QuestionHow to hide a tab from the Property Sheet Pin
ElizabethC24-Oct-03 10:18
ElizabethC24-Oct-03 10:18 
AnswerRe: How to hide a tab from the Property Sheet Pin
vcplusplus24-Oct-03 15:38
vcplusplus24-Oct-03 15:38 
GeneralArrays, heap, delete and crash! Pin
Rickard Andersson2024-Oct-03 10:03
Rickard Andersson2024-Oct-03 10:03 
GeneralRe: Arrays, heap, delete and crash! Pin
Alexander M.,24-Oct-03 10:08
Alexander M.,24-Oct-03 10:08 
GeneralRe: Arrays, heap, delete and crash! Pin
Rickard Andersson2024-Oct-03 10:17
Rickard Andersson2024-Oct-03 10:17 
GeneralRe: Arrays, heap, delete and crash! Pin
Gary R. Wheeler25-Oct-03 4:18
Gary R. Wheeler25-Oct-03 4:18 
GeneralRe: Arrays, heap, delete and crash! Pin
Kelly Herald24-Oct-03 10:52
Kelly Herald24-Oct-03 10:52 
GeneralRe: Arrays, heap, delete and crash! Pin
Rickard Andersson2024-Oct-03 11:00
Rickard Andersson2024-Oct-03 11:00 
GeneralRe: Arrays, heap, delete and crash! Pin
igor196024-Oct-03 10:55
igor196024-Oct-03 10:55 
GeneralClass Wizard Problem Pin
ElizabethC24-Oct-03 9:20
ElizabethC24-Oct-03 9:20 
GeneralRe: Class Wizard Problem Pin
ElizabethC24-Oct-03 10:17
ElizabethC24-Oct-03 10:17 
GeneralYUV image format Pin
Raphael Kindt24-Oct-03 7:05
Raphael Kindt24-Oct-03 7:05 
GeneralRe: YUV image format Pin
David Crow24-Oct-03 8:29
David Crow24-Oct-03 8:29 
GeneralBUG: Registration of Attributed ATL Component fails with Web References Pin
arun140524-Oct-03 6:41
arun140524-Oct-03 6:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.