Click here to Skip to main content
15,885,278 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionPrinting with CRichEditCtrl control Pin
sdancer7526-Sep-12 23:05
sdancer7526-Sep-12 23:05 
AnswerRe: Printing with CRichEditCtrl control Pin
sdancer755-Oct-12 3:55
sdancer755-Oct-12 3:55 
GeneralRe: Printing with CRichEditCtrl control Pin
chaau7-Oct-12 18:44
chaau7-Oct-12 18:44 
GeneralRe: Printing with CRichEditCtrl control Pin
sdancer757-Oct-12 20:21
sdancer757-Oct-12 20:21 
QuestionQuality based Video encoding in H.264 Codec Pin
Ajesh Kumar.T.T26-Sep-12 21:01
Ajesh Kumar.T.T26-Sep-12 21:01 
QuestionHow to Convert palette buffer to RGB buffer Pin
Ajesh Kumar.T.T26-Sep-12 21:00
Ajesh Kumar.T.T26-Sep-12 21:00 
AnswerRe: How to Convert palette buffer to RGB buffer Pin
CPallini26-Sep-12 22:09
mveCPallini26-Sep-12 22:09 
QuestionDialogBox 64bit ? Pin
Smart Arab26-Sep-12 0:07
Smart Arab26-Sep-12 0:07 
Hi have a good day,

Does any body manage to Build application using Dialog Resource for windows 64 bit ?

It Didn't Work for me , I get this error :
error C2664: 'DialogBoxParamW' : cannot convert parameter 4 from 'BOOL (__cdecl *)(HWND,UINT,WPARAM,LPARAM)' to 'DLGPROC'


I try to change
C#
BOOL CALLBACK DialogProc
to
C#
INT_PTR CALLBACK DialogProc


But I still get ,
conversion from 'INT_PTR' to 'int', possible loss of data. 


I also try to edit , winuser.h , From
C#
typedef INT_PTR (CALLBACK* DLGPROC)(HWND, UINT, WPARAM, LPARAM);

To
C#
typedef BOOL (CALLBACK* DLGPROC)(HWND, UINT, WPARAM, LPARAM);


But the Application Exit with out showing the dialog box ,

C#
BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
.
.
.
    return true;

}

int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
    hInst = hInstance;
	return DialogBox(hInstance, MAKEINTRESOURCE(DLG_MAIN), NULL, DialogProc);
}


P.S:
the code work perfectly when building for Win32.


Thank you.
AnswerRe: DialogBox 64bit ? Pin
Richard MacCutchan26-Sep-12 2:42
mveRichard MacCutchan26-Sep-12 2:42 
QuestionRe: DialogBox 64bit ? Pin
CPallini26-Sep-12 3:40
mveCPallini26-Sep-12 3:40 
AnswerRe: DialogBox 64bit ? Pin
Smart Arab26-Sep-12 5:01
Smart Arab26-Sep-12 5:01 
GeneralRe: DialogBox 64bit ? Pin
Richard MacCutchan26-Sep-12 5:12
mveRichard MacCutchan26-Sep-12 5:12 
GeneralRe: DialogBox 64bit ? Pin
Smart Arab26-Sep-12 5:54
Smart Arab26-Sep-12 5:54 
GeneralRe: DialogBox 64bit ? Pin
Jochen Arndt26-Sep-12 6:10
professionalJochen Arndt26-Sep-12 6:10 
GeneralRe: DialogBox 64bit ? Pin
Smart Arab26-Sep-12 22:45
Smart Arab26-Sep-12 22:45 
GeneralRe: DialogBox 64bit ? Pin
Richard MacCutchan26-Sep-12 6:29
mveRichard MacCutchan26-Sep-12 6:29 
GeneralRe: DialogBox 64bit ? Pin
Smart Arab26-Sep-12 22:42
Smart Arab26-Sep-12 22:42 
GeneralRe: DialogBox 64bit ? Pin
CPallini26-Sep-12 11:47
mveCPallini26-Sep-12 11:47 
GeneralRe: DialogBox 64bit ? Pin
Smart Arab26-Sep-12 22:39
Smart Arab26-Sep-12 22:39 
GeneralRe: DialogBox 64bit ? Pin
CPallini26-Sep-12 22:45
mveCPallini26-Sep-12 22:45 
QuestionHow to make slider movement smooth in MFC.? Pin
mbatra3125-Sep-12 20:39
mbatra3125-Sep-12 20:39 
QuestionRandom Number Pin
pix_programmer25-Sep-12 20:05
pix_programmer25-Sep-12 20:05 
AnswerRe: Random Number Pin
Ingo25-Sep-12 20:38
Ingo25-Sep-12 20:38 
AnswerRe: Random Number Pin
CPallini25-Sep-12 22:25
mveCPallini25-Sep-12 22:25 
AnswerRe: Random Number Pin
Ingo25-Sep-12 23:55
Ingo25-Sep-12 23:55 

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.