Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
R

Richard Cheng

@Richard Cheng
About
Posts
57
Topics
33
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • COM Port question
    R Richard Cheng

    Does anyone know any function in VC++ that can let me access or read or write data from or to COM port??

    C / C++ / MFC question c++ com

  • How to clear screen???
    R Richard Cheng

    I know I can use GetDocument->UpdateAllViews(0) to clear the screen in VIEW.CPP ..... but how can i clear the screen if my function is located in another non-MFC file??????? I just use something liked ::InvalidateRect(Handler, NULL, FALSE); to update the view..... Can you help me???? What i want to do is keep printing a list of number.....for example, 1 2 3 4 5 6 7 and the program has to compare the previous number....if the previous number is 7...then I have to erase the 7 and put an A there......but I have to display "7" first...then when it's going to display another .....let say 8....then the list should be 1 2 3 4 5 6 A 8

    C / C++ / MFC c++ tutorial question help announcement

  • What happened here????? Wrong variable type???
    R Richard Cheng

    When i use this code to save the result to a char, char Buffer[128]; sprintf(Buffer, " %f %f", a,b); my program is forced to terminate....why?

    C / C++ / MFC beta-testing tutorial testing help question

  • What happened here????? Wrong variable type???
    R Richard Cheng

    Oh thanks!!!! It works now... but i have one more question. For example, a = 180.98763 I just want to display 180.99....and save it to a char or CString because i want to save to my CStringList........what can i do??? can i use: char Buffer[128]; sprintf(Buffer, " %f %f", a,b); I have a and b......I want to display liked: | 180.98 | 123.56 | ??????

    C / C++ / MFC beta-testing tutorial testing help question

  • What happened here????? Wrong variable type???
    R Richard Cheng

    Here is the codes float a,b; a = (( (AlphaTotal - PrevAlphaTotal) / PrevAlphaTotal ) * 100 ); b = (( (BetaTotal - PrevBetaTotal ) / PrevBetaTotal ) * 100 ); CString testing; CStringList ReturnedData; testing.Format("Alpha Percentage %f", a ); ReturnedData.AddTail(testing); testing.Format("Beta Percentage %f", b ); ReturnedData.AddTail(testing); (--->ReturnedData will be used to output in view class) The results would be: If a or b = 65.50...it displays 0.00 If a or b = 180.50...it displays 100.00 Why i know that because.....I try just type some number in the formula...for example, a = ((700-500)/500)*100; b = ((81-60)/60)*100; Then output is: Alpha Percentage 0.00 Beta Percentage 0.00 How to fix it?????????????????????? ;P

    C / C++ / MFC beta-testing tutorial testing help question

  • What's wrong here??? Pointer question
    R Richard Cheng

    :-D :-D :-D :-D :-D :-D You guys are great!!!!!!! :laugh: :laugh: :laugh: :laugh: :laugh: :laugh:

    C / C++ / MFC question performance help

  • What's wrong here??? Pointer question
    R Richard Cheng

    Actually, I'm looking for a infinite size of "array", so I want to see if i can use pointer to do that.......sometimes i need 10....but sometimes i need 40......that's why i create pointer..... Do you know how?

    C / C++ / MFC question performance help

  • NT...Win9X...problem.....memory leak???
    R Richard Cheng

    Oh.....i understand that now......let me try.... Thanks, Tomaxz....... THANK YOU THANK YOU THANK YOU!!!!!;P

    C / C++ / MFC help c++ graphics question performance

  • Why my program cannot show colour?
    R Richard Cheng

    CDC* CDCPoint is a global variable for another files in the project. But pDC is just using in OnDraw(). Therefore, CDCPoint and pDC are the same but used in different area.

    C / C++ / MFC question

  • Why my program cannot show colour?
    R Richard Cheng

    My program doesn't have CreatCompatibleBitmap...something liked that.....i just have in OnDraw(CDC* pDC): if(CDCPoint==NULL) { CDCPoint=new CDC; } CDCPoint->m_hDC=pDC->m_hDC; CDCPoint->m_hAttribDC=pDC->m_hAttribDC; //creating a global window handler to help with output Handler=m_hWnd; //setting background mode so there wouldn't be a border around text (just in case) pDC->SetBkMode(TRANSPARENT); //setting fixed width font CFont newFont; newFont.CreateFont(18, 9, 0, 0, FW_REGULAR, 0, 0, 0, ANSI_CHARSET, OUT_DEVICE_PRECIS, CLIP_CHARACTER_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_MODERN, "Courier New"); pDC->SelectObject(&newFont); Also, I found that there is another problem........normally the output font is Courier New....but suddently....all fonts change to another one....including all message box. Thanks for your help anyway... :) :)

    C / C++ / MFC question

  • Why my program cannot show colour?
    R Richard Cheng

    My code : CPen penObject; penObject.CreatePen(PS_SOLID, 4, RGB(255,0,0)); CDCPoint->SelectObject(&penObject); CDCPoint->MoveTo(100,100); CDCPoint->LineTo(100,200); Why the line is in colour BLACK instead of RED?????? Also, when i put: CDCPoint->MoveTo(100,100); CDCPoint->LineTo(100,100); It cannot print a dot. It prints nothing.....do you know why???? :eek:

    C / C++ / MFC question

  • Error message..???
    R Richard Cheng

    Here is my code... CPen pen, pen1, pen2; pen.CreatePen(PS_SOLID, 2, WHITE); CDCPointer->SelectObject(&pen); ..* ..* ..* pen1.CreatePen(PS_SOLID, 2, BLACK); CDCPointer->SelectObject(&pen1); ..* ..* ..* pen2.CreatePen(PS_SOLID, 2, RED); CDCPointer->SelectObject(&pen2); ..* ..* ..* When i compile it....there is an error message on the line of pen1.CreatePen.. "error C2668: 'CreatePen' :ambiguous call to overloaded functinn" What is it?

    C / C++ / MFC question help

  • CScrollView question
    R Richard Cheng

    i'm trying to use SetScrollSizes() and ScrollToPosition() in my program. I've put #include in my program. However, the debugger still keep saying "undeclared identifier". What happen?????? X| p.s.: again....it works in my previous program....i just copy the code to my new program....

    C / C++ / MFC question debugging

  • Error message??!!!!!
    R Richard Cheng

    Hi Tomasz, Thanks for your quick response!!! You are superb!!!!! ;) :) ;P :-D :rolleyes: :-O :cool: :suss: :eek: Richard

    C / C++ / MFC c++ help question

  • Error message??!!!!!
    R Richard Cheng

    i have two C files and want to add to my new project. I've used these files in MFC programming before and everything fines. However, this time when i compiled these files, i got the following error message: "fatal error C1010: unexpected end of file while looking for precompiled header directive" I didn't change anything.......then i tried to just compile the file (this lead me to create a new project).....i used the same directory...same location...nothing change.......and it works!!!!!!!!!! Does anyone know what happeneD? :confused:

    C / C++ / MFC c++ help question

  • Input box on toolbar
    R Richard Cheng

    Does anyone know how to put an input box or dragdown menu on the toolbar???? I want to let someone to choose from the menu or type the command directly in the input textbox.

    C / C++ / MFC tutorial question

  • Tree Control Question
    R Richard Cheng

    Thanks for your reply. I know I can use NM_CLICK, but I don't know which function in CTreeCtrl i should use. Seems liked they just return a HTREEITEM variable. The following is how i make a tree: HTREEITEM ABC, XYZ, node; ABC = m_Tree.InsertItem("ABC", TVI_ROOT); node = m_Tree.InsertItem("A", ABC); node = m_Tree.InsertItem("B", ABC); ...etc... if I want to choose B...but it returns a HTREEITEM....how can i know which "node"....

    C / C++ / MFC tutorial question data-structures

  • Launch MS Word and open file
    R Richard Cheng

    Does anyone know how to open a *.doc file with launching the MS WORD?

    Visual Basic tutorial question

  • Tree Control Question
    R Richard Cheng

    I have the following tree: .ABC .|_A .|_B .|_C .XYZ .|_X ...|_XX .|_Y .|_Z I want to display something when i use a mouse to click on particular item. How to do that? For example, if I highlight XX, then pop up a message box say "XX"....etc... Thanks

    C / C++ / MFC tutorial question data-structures

  • MFC tutorial on the web
    R Richard Cheng

    This one is really good.....try it..... http://devcentral.iftech.com/learning/tutorials/submfc.asp

    C / C++ / MFC graphics c++ help tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups