Windows programming

Moderators: None (Apply to moderate this forum)
Number of threads: 3711
Number of posts: 9173

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Edit Report
Broken Windows (programming!) Posted by paul on 19 Dec 2000 at 3:46 PM
Hi everybody,<br>
<br>
i'm having a spot of bother with Win32 programming - just a basic step probably but heh its new to me. i'm using Borland C++ 4.5.<br>
in my code i've issued a<br>
<br>
static HINSTANCE g_hInst = NULL;<br>
<br>
BOOL CALLBACK AboutDlgProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)<br>
{<br>
blah blah...<br>
}<br>
<br>
LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)<br>
{<br>
int ret;<br>
<br>
...handle messages...<br>
...and amongs things.......<br>
<br>
ret=DialogBox(g_hInst, &quot;ABOUTDLG&quot;, hwnd, AboutDlgProc);<br>
}<br>
<br>
however, when i compile i keep getting the following errors!<br>
<br>
Error DLG_ONE.CPP 50: Cannot convert 'int (__stdcall *)(void *,unsigned int,unsigned int,long)' to 'int (__stdcall *)()' in function __stdcall WndProc(void *,unsigned int,unsigned int,long)<br>
<br>
Error DLG_ONE.CPP 50: Type mismatch in parameter 'lpDialogFunc' in call to '__stdcall DialogBoxParamA(void *,const char *,void *,int (__stdcall *)(),long)' in function __stdcall WndProc(void *,unsigned int,unsigned int,long)<br>
<br>
<br>
i really don't understand what i'm doing wrong.<br>
i wondered if anybody knew whats up!<br>
<br>
thanks and merry christmas in advance.<br>
<br>
Paul.<br>






 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.