Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
16
Posts with Upvotes
14
Upvoting Members
3
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
~23.1K People Reached
Favorite Forums
Favorite Tags
c++ x 21
c x 11
Member Avatar for linq

[code] // Windows Programming Tutorial Series #include "stdafx.h" #include <windows.h> int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { MessageBox (NULL, "Hello World! This is my first WIN32 program", "Lesson 1", MB_OK); return 0; }[/code] 2 errors: Linking... LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main Debug/a.exe : …

Member Avatar for NathanOliver
2
194
Member Avatar for linq

I know how to read string values from Access db, like: CString strFields[5]; COleVariant varstring for(field=0; field<5;field++) { recordset.GetFieldValue(field, varstring); strFields[field]=V_BSTRT(&varstring); } then the string value from db. goes into strFields But what if I know the strFields, and want write to update the db. Does anyone know the adverse …

Member Avatar for Ancient Dragon
0
85
Member Avatar for linq

I am a new learner to the Dao database operation through MFC access.For now I am trying to write a program, saving two values in two edit boxes to a column of MS Access 2000 table. There are not many samples available. Could any one write little sample codes or …

Member Avatar for Ancient Dragon
0
89
Member Avatar for linq

like .... CString name[5]; for(int i=0;i<5;i++) name[i]="Jack"; .... is this the right way?

Member Avatar for Ancient Dragon
0
95
Member Avatar for linq

string strd1 = "9"; int m=atoi(strd); Got the error: error C2664: 'atoi' : cannot convert parameter 1 from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' to 'const char *' how to change the second line to make it work?

Member Avatar for Salem
0
130
Member Avatar for linq

how to solve this error: error C2664: 'strcpy' : cannot convert parameter 1 from 'class CString' to 'char *' when I am using strcpy(StdGrades.StudentName, this->m_StudentName); StdGrades is a struct, StudentName is a CString type, m_StudentName is a CString variable. Actually it is from: [URL]http://www.functionx.com/visualc/fileprocessing/cppserialization.htm[/URL] there is only one error

Member Avatar for Ancient Dragon
0
97
Member Avatar for linq

if I have three words in there lines in a .txt file, and I want to read them to three string, how to do this using c++ ifstream? how to read every line(word)?

Member Avatar for WaltP
0
21K
Member Avatar for linq

I am using C++ in VC++ 2003 there are some examples like this [URL]http://www.codeproject.com/cpp/miniexcel.asp[/URL] but I don't quite understand. I hope someone could help me or guide me to some related documents, bow!

0
53
Member Avatar for linq

I am using the MFC dialog application. There are 3 edit box, add1, add2 and sum and a button "add", when exectuing, I input add1, add2, and use the "add" function dlg.m_sum=dlg.m_add1+dlg.m_add2 how to make the sum appears in the "sum" edit box? Do I have to add a view …

Member Avatar for Ancient Dragon
0
107
Member Avatar for linq

look at "dc.SelectObject(&pen)" and "dc.SelectObject (&brush)",here no matter I use "&" or not it results the same. why is that? [code] void CMainWindow::OnPaint () { CPaintDC dc (this); CBrush brush (RGB (255, 0, 0)); CPen pen (PS_NULL, 0, (RGB (0, 0, 0))); dc.SelectObject(&pen); dc.SelectObject (&brush); dc.Ellipse (0, 0, 200, 100); …

Member Avatar for Ancient Dragon
1
86
Member Avatar for linq

the following code is from the examples on the book CPen pen (PS_SOLID, 0, RGB (192, 192, 192)); CPen* pOldPen = dc.SelectObject (&pen); //do some drawing staff here dc.SelectObject (pOldPen); I know once I create a pen, I can do some drawing staff, but why should I add "CPen* pOldPen …

Member Avatar for Ancient Dragon
1
116
Member Avatar for linq

it is the classic "hello,world" example, I am using VC++6.0,when I create a project and include the .h and .cpp file into it and compile, it pops out these errors: --------------------Configuration: chapter 1_0 - Win32 Debug-------------------- Compiling... hello.cpp Linking... nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex nafxcwd.lib(thrdcore.obj) : error …

Member Avatar for Ancient Dragon
1
98
Member Avatar for linq

I want to create my own cursor image by importing an exsiting .ico file, but every time the VS6.0 automatically imported it into resources as ICON file, even I name it as IDC_CURSOR1, I can not use " wndclass.hCursor = LoadCursor (hInstance, MAKEINTRESOURCE (IDC_CURSOR1)) ;" to create my own cursor

Member Avatar for WolfPack
1
94
Member Avatar for linq

by adding these code to the case WM_PAINT: hdc = BeginPaint(hWnd, &ps); MoveToEx (hdc, 100, 100, NULL) ; LineTo (hdc, 100, 200) ; EndPaint(hWnd, &ps); why can I adding them to the case WM_CREATE to realise it?

Member Avatar for Ancient Dragon
1
65
Member Avatar for linq

It may not be the problem of my own procedure, because no matter what new projects I create, I got those 15 errors. who can copy his winuser.h file and send to me? I am using VC6.0++ Thanks a lot! my email: <<email snipped>>

Member Avatar for Ancient Dragon
1
105
Member Avatar for linq

another question: when I create a window, I use function CALLBACK WndProc(), if another dialog box will be triggered by clicking a certain button in this window, I may use another function CALLBACK DlgProc(). if there is other more, I may use another CALLBACK DlgProc().... could I integrate all those …

Member Avatar for GloriousEremite
0
409
Member Avatar for linq

pop out so many errors, which seemed don't even exist: --------------------Configuration: 12 - Win32 Debug-------------------- Compiling... StdAfx.cpp c:\program files\microsoft visual studio\vc98\include\winuser.h(3) : error C2143: syntax error : missing ';' before '.' c:\program files\microsoft visual studio\vc98\include\winuser.h(3) : error C2501: 'winuser' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\winuser.h(3) : …

Member Avatar for ~s.o.s~
1
317
Member Avatar for linq
Member Avatar for Ancient Dragon
1
102
Member Avatar for linq

the MSDN description: hIconSm: Handle to a small icon that is associated with the window class hIcon: Handle to the class icon. But I still confused! when I creat a window "WNDCLASSEX wc", I could always only see the icon load by the wc.hIconSm when excuting, where to find the …

Member Avatar for GloriousEremite
1
92
Member Avatar for linq

[cpp code] hIcon = LoadImage(NULL, "menu_two.ico", IMAGE_ICON, 32, 32, LR_LOADFROMFILE); error C2440: '=' : cannot convert from 'void *' to 'struct HICON__ *' Conversion from 'void*' to pointer to non-'void' requires an explicit cast So I think I should make a cast to make this work at C++ compiler,but how?

Member Avatar for Ancient Dragon
1
65
Member Avatar for linq

[CODE] #include "stdafx.h" #include <iostream> using namespace std; int a=10; void main() { a=20; cout<<a<<endl; cout<<::a<<endl; } [/CODE] [CODE] output: 20 20[/CODE] I actually want the [INLINECODE]"cout<<::a<<endl"[/INLINECODE] output 10, but failed. Does "::a" mean a is in the gloable scope? What should I have to change the code to make …

Member Avatar for ~s.o.s~
1
104