mirror of
https://github.com/VincentWei/minigui-docs.git
synced 2025-10-22 08:00:49 +08:00
tune format
This commit is contained in:
@@ -39,14 +39,14 @@ static BOOL mymain_onCreate (mWidget* self, DWORD add_data)
|
||||
|
||||
if (lv) {
|
||||
mRecordSet *rs;
|
||||
rs = _c(g_pStaticDS)->selectRecordSet (g_pStaticDS,
|
||||
rs = _c(g_pStaticDS)->selectRecordSet (g_pStaticDS,
|
||||
"/listview/header", NCS_DS_SELECT_READ);
|
||||
_c(lv)->setSpecial (lv, NCSID_LISTV_HDR, (DWORD)rs, NULL);
|
||||
rs = _c(g_pStaticDS)->selectRecordSet (g_pStaticDS,
|
||||
rs = _c(g_pStaticDS)->selectRecordSet (g_pStaticDS,
|
||||
"/listview/content", NCS_DS_SELECT_READ);
|
||||
_c(lv)->setSpecial (lv, NCS_CONTENT, (DWORD)rs, NULL);
|
||||
}
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
// END_OF_SETDATA
|
||||
@@ -65,10 +65,10 @@ static NCS_EVENT_HANDLER mymain_handlers[] = {
|
||||
|
||||
static NCS_WND_TEMPLATE _ctrl_templ[] = {
|
||||
{
|
||||
NCSCTRL_LISTVIEW,
|
||||
NCSCTRL_LISTVIEW,
|
||||
IDC_LISTVIEW,
|
||||
10, 10, 320, 190,
|
||||
WS_BORDER | WS_VISIBLE | NCSS_LISTV_SORT
|
||||
WS_BORDER | WS_VISIBLE | NCSS_LISTV_SORT
|
||||
| NCSS_LISTV_LOOP,
|
||||
WS_EX_NONE,
|
||||
"",
|
||||
@@ -77,7 +77,7 @@ static NCS_WND_TEMPLATE _ctrl_templ[] = {
|
||||
};
|
||||
|
||||
static NCS_MNWND_TEMPLATE mymain_templ = {
|
||||
NCSCTRL_MAINWND,
|
||||
NCSCTRL_MAINWND,
|
||||
1,
|
||||
0, 0, 350, 240,
|
||||
WS_CAPTION | WS_BORDER | WS_VISIBLE,
|
||||
@@ -98,14 +98,14 @@ int MiniGUIMain (int argc, const char* argv[])
|
||||
ncsInitialize ();
|
||||
|
||||
// START_OF_REGDS
|
||||
ncsRegisterStaticData ("/listview/header", (void*)_header, 3,
|
||||
sizeof(NCS_LISTV_CLMRD)/sizeof(DWORD), sizeof(DWORD),
|
||||
ncsRegisterStaticData ("/listview/header", (void*)_header, 3,
|
||||
sizeof(NCS_LISTV_CLMRD)/sizeof(DWORD), sizeof(DWORD),
|
||||
gListVColumnRecordTypes);
|
||||
ncsRegisterStaticData ("/listview/content", (void*)_content, 3,
|
||||
ncsRegisterStaticData ("/listview/content", (void*)_content, 3,
|
||||
3, sizeof(char*), NULL);
|
||||
// END_OF_REGDS
|
||||
|
||||
mydlg = (mDialogBox *)ncsCreateMainWindowIndirect
|
||||
mydlg = (mDialogBox *)ncsCreateMainWindowIndirect
|
||||
(&mymain_templ, HWND_DESKTOP);
|
||||
|
||||
_c(mydlg)->doModal (mydlg, TRUE);
|
||||
|
Reference in New Issue
Block a user