C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 22nd, 2003, 12:15 AM
Alex McLin Alex McLin is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 3 Alex McLin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
About MAKEINTRESOURCE

I'm compiling a MFC application and I need to use the MAKEINTRESOURCE macro to pass the appropriate variable to the CreateDialog function to open a dialog. I keep getting the following error messages,

Compiling...
Process SpeechDlg.cpp

C:\Documents and Settings\summer\Desktop\Process Speech\Process SpeechDlg.cpp(932) : error C2065: 'MAKEINTRESOURCEA' : undeclared identifier

C:\Documents and Settings\summer\Desktop\Process Speech\Process SpeechDlg.cpp(932) : error C2146: syntax error : missing ';' before identifier 'templateID'

C:\Documents and Settings\summer\Desktop\Process Speech\Process SpeechDlg.cpp(932) : error C2065: 'templateID' : undeclared identifier

Error executing cl.exe.
Creating browse info file...

Process Speech.exe - 3 error(s), 0 warning(s)

As you can see, it seem like it's caused by a spelling mistake in my code, yet I've double checked and triped checked, I've spelled MAKEINRESOURCE correctly without the A on the end.

I'm using Visual C++ 6.0 on a XP system. Any help to clear up this problem would be great.

Alex

Reply With Quote
  #2  
Old July 22nd, 2003, 03:24 AM
TechNoFear TechNoFear is offline
Offensive Member
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2002
Location: in the perfect world
Posts: 594 TechNoFear User rank is Sergeant (500 - 2000 Reputation Level)TechNoFear User rank is Sergeant (500 - 2000 Reputation Level)TechNoFear User rank is Sergeant (500 - 2000 Reputation Level)TechNoFear User rank is Sergeant (500 - 2000 Reputation Level)TechNoFear User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 14 h 6 m 15 sec
Reputation Power: 22
Have you included windows.h ?

(as it will include winuser.h that contains the macro MAKEINTRESOURCE and its variants)
__________________
The essence of Christianity is told us in the Garden of Eden history. The fruit that was forbidden was on the Tree of Knowledge. The subtext is, All the suffering you have is because you wanted to find out what was going on. You could be in the Garden of Eden if you had just kept your f***ing mouth shut and hadn't asked any questions.

Frank Zappa

Reply With Quote
  #3  
Old July 22nd, 2003, 01:59 PM
#define Gangsta's Avatar
#define Gangsta #define Gangsta is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Representin' Quebec
Posts: 106 #define Gangsta User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Where are you learning MFC? Because I have a 'basic' Win32 tutorial. And all of them are the same. So could you please tell me???

Reply With Quote
  #4  
Old July 22nd, 2003, 03:45 PM
Alex McLin Alex McLin is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 3 Alex McLin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I found out what the problem was, I had used the macro incorrectly, I was trying to assign a value to a variable defined by the macro via the assignment operator but apprently it wasn't how it was supposed to be done. That area's working fine. Now I'm off to try to figure out the other problem.

I have a dialog that I wish to create in another dialog window. So I call CreateDialog but it doesn't work, apparently the GetSafeHwnd function used to supply the hwnd of the parent window is returning NULL which according to the documentation indicates that CWnd isn't attached to the parent dialog. I have no idea what that means. I've only been using MFC for a short time.

I'm learning MFC largely by trial and error and using the advise of another person who's well versed in MFC programming.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > About MAKEINTRESOURCE


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT