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

Raymond So

@Raymond So
About
Posts
2
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Need help displaying Chinese characters in a CListCtrl
    R Raymond So

    Hi, I need help on trying to display Chinese characters in a CListCtrl. I have _UNICODE flag in project settings, and I'm using the unicode conventions (i.e., _T() for string literals, _tcscpy in place of strcpy(), etc.). Still no luck, I've even tried to set the font: CFont *cFontPtr = m_CertListCntrl.GetFont(); LOGFONT lFontObj; int success = cFontPtr->GetLogFont(&lFontObj); lFontObj.lfCharSet = CHINESEBIG5_CHARSET; CFont cfObj; BOOL s = cfObj.CreateFontIndirect(&lFontObj); m_CertListCntrl.SetFont(&cfObj, TRUE); And still no luck. Note: I tried to test the code by hard coding chinese characters and filling in the list. Not sure if that has an effect on it. Thanks, Raymond

    C / C++ / MFC help

  • GetModuleFileName instance and registering app
    R Raymond So

    I'm trying to place a value in HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run so that my app starts up when windows starts up, as a background app. I've implemented DLLRegisterServer so that it is invoked when the setup.exe runs (I've set the .exe to self-register under InstallShield). In DLLSelfRegister, I need the path to the .exe so that the value in the registry is set properly and the .exe runs from that path. I use GetModuleFileName to get the path of the app, but when regsvr32 myApp.exe is run, the app is not instantiated yet. I used MFC to create a dialog based app Here's a code snipet: CSysTrayDemoApp theApp; //MFC generated ... //Implement this funciton so that regsvr32 can invoke it to register exe. STDAPI DllRegisterServer() { char path[MAX_PATH]; DWORD pathLen = sizeof(fileName); __asm int 3; GetModuleFileName(theApp.m_hInstance, path, pathLen); ... theApp.m_hInstance is not instantiated and thus I can't get the path name. Does anyone have experience in registering an app/is there a better way of doing this? Thanks, Raymond

    C / C++ / MFC c++ windows-admin question workspace
  • Login

  • Don't have an account? Register

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