   why my dialog box won't show up?
  here''s my code#include <windows.h>#include "resource.h"BOOL CALLBACK DialogProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam){switch(msg){case WM_COMMAND :switch(LOWORD(wParam)){case IDOK :EndDialog(hWnd,0);break;}break;case WM_CLOSE :EndDialog(hWnd,0);break;default : return FALSE;}return TRUE;}int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow){return DialogBox(hInstance,MAKEINTRESOURCE(IDD_SLIDE),NULL,DialogProc);}Why it didn''t work?the dialog box (IDD_SLIDE) won''t show upat first I use a window as my main parent and a dialog box as child window and it worked but I want to have just a dialog box from the start and finally I met this problem.....I just can''t figure it out..... 
  There is no problem with your code, I''ve tried it out and it works.  The only thing I can think of is because you are creating the dialog by itself - you will need to have it as a popup. #include "resource.h"#include <windows.h>///////////////////////////////////////////////////////////////////////////////// Dialog//IDD_SLIDE DIALOG DISCARDABLE  0, 0, 235, 156STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENUCAPTION "Property Page"FONT 8, "MS Sans Serif"BEGIN    LTEXT "TESTING!",IDC_STATIC,73,74,90,8ENDNotice the WS_POPUP style.   ======Very good programming site:Programmers Unlimited   ;  I've tried your suggestion but still my dialog box won't show uphere's my file :http://ronzak.kapsul.org/sharingfile/files/slider.zip[\URL]   <br><br><SPAN CLASS=editedby>[edited by - Zacharya on December 18, 2003 9:24:16 PM]</SPAN>;  Hmmm, wierd - I''ve imported over your source code, deleted some of the erroneous code that Microsoft''s editor put in there, compiled it, and ran it.  The dialogbox shows up when I run it.  Try clearing out your resource file and copy and paste the code I''ve posted into your resource file.  It should work.  I''m using Dev C++ if that has anything to do with your problem, but it should work.   ======Very good programming site:Programmers Unlimited   ;  I''ve tried your code and still it didn''t workI use MSVC++.....Is it the code or the compiler?????or should I just use a window as my parent (not visible) and then add the dialog box as child......I just don''t get it why my code doesn''t work.... ;  well, I deleted the slider control from my dialog box and ran it again, and you know what it works!!!but I still need the slider control, why doesn''t it work with a slider control? ;  I ran into the same problem, you have to add a line of code to get sliders, and other special dialog items to work. I use MSVC++ 6. Add this line in WinMain before you set up any window or dialogs    InitCommonControls();i think that will fix it. ;  Yea I guess that would do, the common controls, although I wonder why it automatically showed up on mine...Some things we may never know.Oh yea, I think there is also a common control library file you have to link to also, I am not on my computer so this is just a guess.   ======Very good programming site:Programmers Unlimited   