|
And why do you think it is not possible?
To create a resource only DLL check out this link.
Creating a Resource-Only DLL[^]
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I have a dialog based application named: basicreport
and created
one dialog called: CExternalDataDlg ,
3 property page called: CImportPage, COptionPage, CConfirmPage
and 1 property sheet named: CImportPropertySheet.
inside: BOOL CBasicReportApp::InitInstance()
BOOL CBasicReportApp::InitInstance(){
......
CExternalDataDlg dlg;
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
}
else if (nResponse == IDCANCEL)
{
}
return FALSE;
}
CExternalDataDlg displayed correctly, worked fine!
I have change above code to:
BOOL CBasicReportApp::InitInstance(){
......
CImportPropertySheet importWizardSheet(_T("Import Spreadsheet Wizard"));
CImportPage importpage;
COptionPage optionpage;
CConfirmPage confirmpage;
importWizardSheet.AddPage(&importpage);
importWizardSheet.AddPage(&optionpage);
importWizardSheet.AddPage(&confirmpage);
importWizardSheet.SetWizardMode();
m_pMainWnd = &importWizardSheet;
INT_PTR nWizardResponse = importWizardSheet.DoModal();
if(nWizardResponse == ID_WIZFINISH){
AfxMessageBox(_T("Importing..........."));
}
else if(nWizardResponse == IDCANCEL){
AfxMessageBox(_T("Cancel"));
}
else{
}
return FALSE;
}
CImportPropertySheet displayed correctly, worked fine!
but when i combinated the both above into once. It looked like
CExternalDataDlg dlg;
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
CImportPropertySheet importWizardSheet(_T("Import Spreadsheet Wizard"));
CImportPage importpage;
COptionPage optionpage;
CConfirmPage confirmpage;
importWizardSheet.AddPage(&importpage);
importWizardSheet.AddPage(&optionpage);
importWizardSheet.AddPage(&confirmpage);
importWizardSheet.SetWizardMode();
INT_PTR nWizardResponse = importWizardSheet.DoModal();
if(nWizardResponse == ID_WIZFINISH){
AfxMessageBox(_T("Importing..........."));
}
else if(nWizardResponse == IDCANCEL){
AfxMessageBox(_T("Cancel"));
}
else{
}
}
else if (nResponse == IDCANCEL)
{
return FALSE;
}
return FALSE;
The ExternalDataDlg displayed, when i press OK button on ExternalDataDlg the CImportPropertySheet blink and the immediately disappear without any action by user.
i dont know why? Please kindly advise
modified on Saturday, April 11, 2009 9:16 AM
|
|
|
|
|
Image *pIm = bm.GetThumbnailImage(size.Width, size.Height);
ImageType imt = pIm->;GetType();
Bitmap *pBm = dynamic_cast<bitmap>(pIm);</bitmap>
I need an HBITMAP object, so I need a Bitmap first.
In this code, imt will be ImageTypeBitmap ,
but pBm will be NULL . What is the problem?
Though Graphcs::DrawImage can do the work, but it's better
to save a Graphcs object.
|
|
|
|
|
Hello,
Right now I am facing a program to program the program I'm willing to use in my project.I am using a at89s52 micro controller to trip a few relays as per my convenience. but the problem i am facing is to program my microcontroller i.e., in writing the source code for my micro controller...
hope I got the response..
vikram singh
|
|
|
|
|
|
hi ı have got a project name sudoku. ıhave already write c code but something wrong ı couldn't find it .please help me !!!
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>
#define size 9
#define size2 81
int checkingSquare( int *i,int *j,int *row,int *column,int **a);
int main(){
int i,j,row,column,controller=0;
int **a=0;
srand(time(NULL));
for(i=1;i<10;i++)
{//start for1
for(j=1;j<10;j++)
{//start for2
while(controller==0)
{ printf("access1");
controller=checkingSquare(&i,&j,&row,&column,a);
}
}//end for 2
}//end for 1
for(i=1;i<10;i++){
for(j=1;j<10;j++){
printf("%d\n",a[i][j]);}}
return 0;
}
void square(int *inte,int *inte2,int *row,int *column){
*row=*inte/3;
if(*row!=1)
{
*row++;
}
*column=*inte2/3;
if(*column!=1)
{
*column++;
}
}
int checkingSquare( int *i,int *j,int *row,int *column,int **f)
{
int x,y;
* (*(f+*i)+*j)=rand()%9+1;
printf("access");
//checkin big squares
square(i,j,row,column);//to determine which big square we are in
for(x=(*row * 3 -2);x<(*row*3+1);x++)
{
for(y=*column*3-2;y<*column*3+1;y++)
{
if(f[x][y]==f[*i][*j])
return 0;
}
}
//checkin sides
for(x=1;x<10;x++)
{
if(f[x][*j]==f[*i][*j]){
return 0;}
}
for(y=1;y<10;y++)
{
if(f[*i][y]==f[*i][*j]){
return 0;}
}
return 1;
}
|
|
|
|
|
I suggest you help yourself getting helped by making things somewhat easier, such as showing formatted code (use the "code block" button) and by specifying the symptoms, i.e. why do you think something is wrong?
|
|
|
|
|
tayyyar wrote: but something wrong
as per Luc's comments - define 'something' for us - what are the symptoms/error messages - can you step by step debug the program for example
we dont read minds - give us a bit more to go on - no-one (ok, almost no one, unless they are incredibly generous) is going to take code posted in that condition, attempt to compile it etc for you given your description.
'g'
|
|
|
|
|
arrays are zero-based, NOT one-based; so your array loops should be like :
for (x=0;x<9;x++)
This signature was proudly tested on animals.
|
|
|
|
|
tayyyar wrote: ...but something wrong...
Such as?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
ıwas complie many times but the program coming we can say read when ı execute program ısaw the window just
"access1 "
and then stop and givme error .
after that ı have to shutdown the program.
I'm stuck ı have no idea how can ı get rid of that ?
some people say give me spesific ı think this message a little bit specific .
ı have got an appointment my lecturer next week for this program .
I'm still searching to fix that but unfortunately nobody knows .
modified on Saturday, April 11, 2009 12:10 AM
|
|
|
|
|
tayyyar wrote: ıwas complie many times but the program coming we can say read when ı execute program ısaw the window just
"access1 "
and then stop and givme error .
after that ı have to shutdown the program.
I'm stuck ı have no idea how can ı get rid of that ?
some people say give me spesific ı think this message a little bit specific .
Common, ... Can't you try at least to write something understandable ? People asked you to give details about the problem you encountered and you reply that the program stop and "givme error". Which error ? Do we really need to ask 20 questions before we can get a clear description of your problem ?
Anyway, did you consider using your debugger to track the problem ?
|
|
|
|
|
http://img2.imageshack.us/img2/4065/adszpfn.jpg
|
|
|
|
|
You'll have to translate that text. In any case, why do you refuse to use the debugger? Anything short of that and you're just wasting everyone's time, including your own.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
tayyyar wrote: some people say give me spesific ı think this message a little bit specific .
You thought wrong. When you take you car to the shop to have it serviced, do you just hand the keys to the mechanic and say, "It won't run" and expect him to know where to start looking?
tayyyar wrote: ı have got an appointment my lecturer next week for this program .
So why has he not been consulted earlier?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I've gone through and formatted your code for easier reading for the sake of everyone else's sanity. Please make proper use of tabs and whitespace. Whitespace is ESPECIALLY needed between operators and after comma's (,) I've also added some comments where I think you've made simple mistakes that probably don't affect the problem you're having but are otherwise problems waiting to happen. Most of the changes are however cosmetic in nature.
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>
#define size 9 //Don't use #define for your constants. Instead use the const keyword and the desired type of the object you are creating.
#define size2 81
int checkingSquare(int *i, int *j, int *row, int *column, int **a);
int main()
{
int i, j, row, column, controller = 0;
int **a = 0;
srand(time(NULL));
for(i = 1; i < 10; i++)
{
for(j = 1; j < 10; j++)
{
while(controller == 0)
{
printf("access1");
controller = checkingSquare(&i, &j, &row, &column, a);
}
}
}
for(i=1;i<10;i++)
{
for(j=1;j<10;j++)
{
printf("%d\n",a[i][j]);
}
}
return 0;
}
void square(int *inte, int *inte2, int *row, int *column)
{
*row = *inte / 3;
if(*row != 1)
{
*row++;
}
*column=*inte2 / 3;
if(*column != 1)
{
*column++;
}
}
int checkingSquare(int *i, int *j, int *row, int *column, int **f)
{
int x, y;
*(*(f + *i) + *j) = rand() % 9 + 1;
printf("access");
square(i, j, row, column);
for(x = (*row * 3 - 2); x < (*row * 3 + 1); x++)
{
for(y = *column * 3 - 2; y < *column * 3 + 1; y++)
{
if(f[x][y] == f[*i][*j])
{
return 0;
}
}
}
for(x = 1; x < 10; x++)
{
if(f[x][*j] == f[*i][*j])
{
return 0;
}
}
for(y = 1; y < 10; y++)
{
if(f[*i][y] == f[*i][*j])
{
return 0;
}
}
return 1;
}
|
|
|
|
|
Hi Pallini, many thanks in advane. Yes, my stepper motor driver supports serial port communication.
Sahih
|
|
|
|
|
Hi,
sahih wrote: Yes, my stepper motor driver supports serial port communication.
That's fine. Now you should study the driver documentation in order to know what you need to send on the serial line.
Have you such a documentation?
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
[My articles]
|
|
|
|
|
If this in reference to a previous thread, then you should have continued the conversation right there. You need not (and should not) start a new thread for every message that you post.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
I am able to get my *->DevicePath variable to pass to CreateFile (displayed a bit below) however I am unable to get a proper handle. It seems that no matter which attributes or whatever I change to my CreateFile function, the function ALWAYS returns INVALID_HANDLE_VALUE
\\?\usb#vid_04e6&pid_5116#5&9b0a1df&0&1#{50dd5230-ba8a-11d1-bf5d-0000f805f530}
Is it that I have an improper *->DevicePath name, or is it something with my CreateFile? Or am I missing a step here? Any help would be greatly appreciated!
|
|
|
|
|
Hi Forum
I am new in VC++ and i want to make a application which will recovery deleted file from Pen Drive?Can any one give me tips or source link?Plz hep me for find solution.
Thank's
Mike
|
|
|
|
|
Check TestDisk[^]. It is open source and has the following features among others:
# Undelete files from FAT, NTFS and ext2 filesystem
# Copy files from deleted FAT, NTFS and ext2/ext3 partitions.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Hi everyone,
thank you to all who have helped me so far. I have a question about creating classes.
I was wondering if I would keep int main() completely separate, and then have the function which retrieves the local computer name a subclass of the retrieval process. I am more or less trying to organize my program.
My program is designed to retrieve information, that's it. Right now I have it working to retrieve the local computer name through a NetBIOS function. I do however want to learn how to do this through the registry.
Question Number one, is it more accurate to pull the computer name from the registry or from the NetBIOS?
Question Number two, can you retrieve the group policy that user is under as well?
Question Number three, where can I find a good reading for retrieving information via the registry? I have looked on MSDN and did not find a registry library.
Thank you in advance!
|
|
|
|
|
rbwest86 wrote: I was wondering if I would keep int main() completely separate, and then have the function which retrieves the local computer name a subclass of the retrieval process. I am more or less trying to organize my program.
What is the object in this case? What would its properties and methods be?
rbwest86 wrote: Question Number three, where can I find a good reading for retrieving information via the registry? I have looked on MSDN and did not find a registry library.
What about these and this?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
rbwest86 wrote: I was wondering if I would keep int main() completely separate, and then have the function which retrieves the local computer name a subclass of the retrieval process. I am more or less trying to organize my program.
I can't decide for you how your program should be designed. What I can do is point out that the organization of code, largely referred to as Design, is a fairly large subject. The good news is that much is known about the subject and it is therefore a well covered topic. Covered in writing in many Books as well as articles that can be found on the internet.
Specifically in terms of designing object oriented code, there are Software Design Patterns[^] that you should read about.
To conclude, one should prefer to read, learn and understand the subject of Software Design as opposed to asking people in internet forums how a specific program should be designed.
|
|
|
|
|