flat assembler
Message board for the users of flat assembler.
Index
> Windows > Can't get spin control working\visible |
Author |
|
silkodyssey 08 May 2006, 17:45
You are not using the correct classname for the spin-control. It is actually
"msctls_updown32". The info in the api docs is wrong. Iczelion's tutorial on common controls has a correct list. http://win32asm.cjb.net/ A tip for finding errors. If you run GetLastError after CreateWindowEx in this case it returns 57f which in decimal is 1407. Looking up the system error codes we find: ERROR_CANNOT_FIND_WND_CLASS 1407 _________________ silkodyssey |
|||
08 May 2006, 17:45 |
|
moriman 08 May 2006, 19:06
silkodyssey wrote: You are not using the correct classname for the spin-control. It is actually Many thanks silkodyssey, that fixed it It was actually code from a website tutorial of a supposedly work app Here's their code... Code: CreateWindow(UPDOWN_CLASS, "Spin1", UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_SETBUDDYINT | WS_CHILD | WS_VISIBLE | UDS_ARROWKEYS, 105, 5, 20, 20, hwndDlg, (HMENU )FirstUpDownId, InstanceHandle, 0); No surprise here. UPDOWN_CLASS is the name for an predefined wnd-class for updown controls. So I assumed it was something I was doing wrong. Quote:
Strange, I actually tried this and was getting an error code of 0 (Everything OK). Oh! well lol Thx again |
|||
08 May 2006, 19:06 |
|
silkodyssey 08 May 2006, 19:45
Ah I see what's going on now.
Code: CommCtrl.h: //====== UPDOWN CONTROL ======================================================= #ifndef NOUPDOWN #ifdef _WIN32 #define UPDOWN_CLASSA "msctls_updown32" #define UPDOWN_CLASSW L"msctls_updown32" #ifdef UNICODE #define UPDOWN_CLASS UPDOWN_CLASSW #else #define UPDOWN_CLASS UPDOWN_CLASSA #endif #else #define UPDOWN_CLASS "msctls_updown" #endif UPDOWN_CLASS is a constant or C macro thing _________________ silkodyssey |
|||
08 May 2006, 19:45 |
|
moriman 08 May 2006, 20:09
Right, thx again, I'll know where to check in future
|
|||
08 May 2006, 20:09 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.