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
C

cnhnyu

@cnhnyu
About
Posts
9
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to Understand the macro ON_ONCTROL_RANGE
    C cnhnyu

    Thank you very much for reply. I have already solved this problem. You said right, The handler for a *_RANGE macro has one UINT parameter, which is the control ID.

    ---------------------------------------- Don't let habit prevent you from trying something new.

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

  • How to Understand the macro ON_ONCTROL_RANGE
    C cnhnyu

    I wrote a test mfc project based on dialog, just one main dialog, three check boxes on it. in .h file I define a bool var. BOOL m_fCheck[3]; and a function: afx_msg void OnCheck(); in .cpp file : (1) in constructor: for ( int i = 0; i < 3; i++ ) m_fCheck[i] = FALSE; (2) in DoDataExchange void CTestDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CTestDlg) // NOTE: the ClassWizard will add DDX and DDV calls here //}}AFX_DATA_MAP for ( int i=0; i<3; i++ ) DDX_Check(pDX, IDC_CHECK1 + i, m_fCheck[i]); } (3) On Message Map ON_CONTROL_RANGE(BN_CLICKED, IDC_CHECK1, IDC_CHECK3, OnCheck) (4) OnCheck() function void CTestDlg::OnCheck() { } ???: When I run this test program in debug mode, I click any check box and has no error. But when I run this program in release mode: A fatal error occured: First-chance exception in ChtVCData.exe: 0xC0000096: Privileged Instruction. I do one test today. I change macro ON_CONTROL_RANGE(BN_CLICKED, IDC_CHECK1, IDC_CHECK3, OnCheck) to : ON_BN_CLICKED(IDC_CHECK1, OnCheck) ON_BN_CLICKED(IDC_CHECK2, OnCheck) ON_BN_CLICKED(IDC_CHECK3, OnCheck) And then I run in debug an release mode, no error found again. Now I can asure that the problem is on the macro ON_CONTROL_RANGE(BN_CLICKED, IDC_CHECK1, IDC_CHECK3, OnCheck) it equals the three macro ON_BN_CLICKED(IDC_CHECK1, OnCheck) ON_BN_CLICKED(IDC_CHECK2, OnCheck) ON_BN_CLICKED(IDC_CHECK3, OnCheck) YES OR NO ?

    ---------------------------------------- Don't let habit prevent you from trying something new.

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

  • What do you think about China ?
    C cnhnyu

    Ashley van Gerven wrote:

    I don't know enough about China to think much of it. I saw a documentary once about how male children are hugely preferred, and because of the child-limit, couples try to abort female fetoeses etc. Is that correct?

    Yes, it is very common in China. Because the male is the main labour force of a family, if a couple don't have a male child, no people will support the rest of their life.

    ---------------------------------------- Don't let habit prevent you from trying something new.

    The Lounge tutorial question discussion learning

  • What do you think about China ?
    C cnhnyu

    toxcct wrote:

    i'm curious to know what you think of north corea then ?!

    As much as I know, it's much worse than China. The people of North Corea lives in a misery.When I'm a child, the schoolbook tells me that the capitalism is a devil, and the socialism is very beautiful. But When I grow up, I find that it is a lie.The government befools me, and befools all people. I would never believe the socialism which the ruler said. They said the official serve the people heart and soul, but in fact they heist people heart and soul. They are just a flock of robbers.

    ---------------------------------------- Don't let habit prevent you from trying something new.

    The Lounge tutorial question discussion learning

  • What do you think about China ?
    C cnhnyu

    Josh Gray wrote:

    Its very hard to find a Chinese restaurant here that does not use it

    That's right. MSG in Chinese we say "味精" as a kind of seasoning in Chinese cooking. Many Chinese people like it and are used to it. I just eat it a little, much MSG makes dishes taste sweet.

    ---------------------------------------- Don't let habit prevent you from trying something new.

    The Lounge tutorial question discussion learning

  • What do you think about China ?
    C cnhnyu

    Can you tell me what is 'MSG' ?

    ---------------------------------------- Don't let habit prevent you from trying something new.

    The Lounge tutorial question discussion learning

  • What do you think about China ?
    C cnhnyu

    Thank you very much. I found that people who reply my question have a very positive attitude against life, which makes me realize that I should work hard and have less complaint. Complaint brings me nothing but annoyance. From today on, I will keep working harder and try my best to change my life, change my fate.

    ---------------------------------------- Don't let habit prevent you from trying something new.

    The Lounge tutorial question discussion learning

  • What do you think about China ?
    C cnhnyu

    Thank you. But I think most of citizens in China can nerver live better if they are ruled by the current Party. Because in China, many many things which are solved NOT by your abilities but your relations. The "relations" makes things in China are very unfair. And the "relations" make some people become very rich and make other people become very poor.

    Don't let habit prevent you from trying something new.

    The Lounge tutorial question discussion learning

  • What do you think about China ?
    C cnhnyu

    I born in China. And I live in China for 20 years and more. I love this country, and I love the greate people in this country, but I hate the ruler, and I hate the government. It tells you that it's a democracy country, as a mater of fact, it is an autarchy country. The government is very very corrupt. Citizens in this country have no free speech. The media never report the facts. It stands the profits of the ruler and dusts the eyes of its citizens. In this country, citizens can NOT afford their children's education fees. Citizens have no money to see the doctor, because the fees are too high to afford. And citizens can NOT afford enough money to buy a house which can only live for 70 years. Citizens in this country can NOT move from one place to another freely. If you want to move to another place, you should support some certifications. For example, citizens who are not in Shenzhen want to go to that place, you should buy a certification. Besides those I mentioned, there are many many things which make you feels as if you live in hell but in fact you live in China.:mad: :((

    Don't let habit prevent you from trying something new.

    The Lounge tutorial question discussion learning
  • Login

  • Don't have an account? Register

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