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
  1. Home
  2. Mobile Development
  3. Mobile
  4. What's going on with this code?

What's going on with this code?

Scheduled Pinned Locked Moved Mobile
comjsonquestion
1 Posts 1 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SonicJet
    wrote on last edited by
    #1

    Hi My own code is a dll includes dialog box,written based on Win32 API(For WinCE). I plan to attached a command bar when Dialog shown,but it doesn't work. Why SHCreateMenuBar(&mbi) always return a NULL? HINSTANCE hInst=NULL; BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { hInst = (HINSTANCE) hModule; return TRUE; } HWND MyCreateRpCommandBar(HWND hwnd) { SHMENUBARINFO mbi; memset(&mbi, 0, sizeof(SHMENUBARINFO)); mbi.cbSize = sizeof(SHMENUBARINFO); mbi.hwndParent = hwnd; //HWND of dialog mbi.nToolBarId = IDR_SIV_MENUBAR; mbi.hInstRes = hInst; //HINSTANCE of dll mbi.nBmpId = 0; mbi.cBmpImages = 0; if (!SHCreateMenuBar(&mbi)) //Command bar was dead here!!! return NULL; return mbi.hwndMB; } BOOL CALLBACK DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { static HWND hwndCB=NULL; switch (message) { case WM_INITDIALOG: hwndCB=MyCreateRpCommandBar(hDlg); return TRUE; case WM_DESTROY: CommandBar_Destroy(hwndCB); return TRUE; } return FALSE; } Please mail to sonicjet@pchome.com.tw ,if you have any recommend.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

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