Well, I was trying to get FreeDOS to be able to boot off of my 12GB FAT32 partition (I suppose I could have given it the recommended amount of space, but why?
). I ended up screwing over my computer's whole booting step in the process, so I tried installing my old Windows 98 to that partition where FreeDOS is instead, and see if it would boot up, however upon completion of install of Windows 98 SE I found that it didn't work
<It was complaining about disk I/O errors>. So after some testing I figured it must have installed incorrectly and didn't feel like reinstalling 98, so I got my Vista disc and tried running some system recovery tools, though that didn't work... So I was thinking "What if I had my own program to do exactly what I need in a situation like this?", but realized there was probably no way to access my hard drive, but tried none the less. I figured out exactly how to though, and even managed to get mspaint to run and I was able to take screenshots using PRNT SCR.
Side Note: The reason I was trying to get FreeDOS to boot was for some reason my internet would go out after about 5 minutes then stopped working in total on both Vista AND XP.
Anyways, I managed to do some pretty cool stuff from within the Vista installer! Granted explorer.exe wouldn't run <Complained about BROWSEUI.DLL and ordinal 176 or something similar>, so I tried to build my own version of explorer, which I sort of did to an extent. <I'll include the program + source if anyone's interested>
So, without further a-do, here is my Vista installer fun screenshots.
Damn Errors
Didn't Work
Just wow... (Dev-Cpp)
lol - During Vista Install
w00t! Code::Blocks Works
My app works too
My App (This screen in WinXP)
Source code to the app I made WHILE in the Vista install CD.
#include <TwilightEngine.h>
/*
// Twilight Engine - Graphical User Interface - Header
#ifndef _TW_GUI_H_
#define _TW_GUI_H_
// Defines
#define twsOverlapped 0x00000000L
#define twsPopup 0x80000000L
#define twsChild 0x40000000L
#define twsMinimize 0x20000000L
#define twsVisible 0x10000000L
#define twsDisabled 0x08000000L
#define twsClipSiblings 0x04000000L
#define twsClipChildren 0x02000000L
#define twsMaximize 0x01000000L
#define twsCaption 0x00C00000L
#define twsBorder 0x00800000L
#define twsDlgFrame 0x00400000L
#define twsVScroll 0x00200000L
#define twsHScroll 0x00100000L
#define twsSysMenu 0x00080000L
#define twsThickFrame 0x00040000L
#define twsGroup 0x00020000L
#define twsTabStop 0x00010000L
#define twsMinimizeBox 0x00020000L
#define twsMaximizeBox 0x00010000L
#define twsOverlappedWindow twsOverlapped | twsCaption | twsSysMenu | twsThickFrame | twsMinimizeBox | twsMaximizeBox
#define twsNormalWindow twsOverlappedWindow
#define twsRenderWindow twsOverlappedWindow | twsClipSiblings | twsClipChildren
#define twsMdiWindow twsOverlappedWindow | twsClipSiblings | twsClipChildren | twsVScroll | twsHScroll
#define twsChildWindow twsOverlappedWindow | twsChild
#define twbFileNew 0
#define twbFileOpen 1
#define twbFileSave 2
#define twbCut 3
#define twbCopy 4
#define twbPaste 5
#define twbUndo 6
#define twbRedo 7
#define twbPrint 8
#define twbFind 9
#define twbReplace 10
#define twbProperties 11
#define twbKill 12
#define twbHelp 13
// Functions
DWORD twMakeWindow(DWORD dwStyle, DWORD dwWidth, DWORD dwHeight, LPSTR szTitle, DWORD dwParent);
void twKillWindow(DWORD dwWindow);
void twPositionWindow(DWORD dwWindow, int x, int y);
void twResizeWindow(DWORD dwWindow, int width, int height);
int twGetWindowX(DWORD dwWindow);
int twGetWindowY(DWORD dwWindow);
int twGetWindowWidth(DWORD dwWindow);
int twGetWindowHeight(DWORD dwWindow);
void twSetWindowText(DWORD dwWindow, char* szText);
char* twGetWindowText(DWORD dwWindow);
void twShowWindow(DWORD dwWindow);
void twHideWindow(DWORD dwWindow);
void twSetWindowVisible(DWORD dwWindow, BOOL fVisible);
void twSetWindowParent(DWORD dwWindow, DWORD dwParent);
DWORD twGetWindowParent(DWORD dwWindow);
DWORD twMakeButton(LPSTR text, int x, int y, int width, int height, DWORD parent);
DWORD twMakeImageButton(LPSTR text, int x, int y, int width, int height, LPSTR image, DWORD parent);
DWORD twMakeCheckbox(LPSTR text, int x, int y, int width, int height, DWORD parent);
DWORD twMakeRadiobox(LPSTR text, int x, int y, int width, int height, DWORD parent);
DWORD twMakeGroupbox(LPSTR text, int x, int y, int width, int height, DWORD parent);
int twButtonPressed(DWORD hWnd);
int twBoxChecked(DWORD hWnd);
void twSetBoxChecked(DWORD dwWnd, int checked);
DWORD twMakeCombobox(int x, int y, int width, int height, int list, DWORD parent);
void twInsertString(DWORD hWnd, LPSTR string, int index);
void twRemoveString(DWORD hWnd, int index);
int twFindString(DWORD hWnd, LPSTR text);
int twGetItemCount(DWORD hWnd);
int twGetCurrentItem(DWORD hWnd);
char* twGetItemText(DWORD hWnd, int num);
void twClearItemData(DWORD hWnd);
DWORD twMakeEditbox(int x, int y, int width, int height, int singleline, int type, char* text, DWORD parent);
char* twGetEditText(DWORD hWnd, int lineNum);
DWORD twMakeDateTimePicker(int x, int y, int width, int height, DWORD parent);
DWORD twMakeProgressBar(int x, int y, int width, int height, int rangeSize, int type, DWORD parent);
void twSetProgressBarPosition(DWORD hWnd, int pos);
void twSetProgressBarRange(DWORD hWnd, int rangeSize);
int twGetProgressBarPosition(DWORD hWnd);
int twGetProgressBarRange(DWORD hWnd);
DWORD twMakeLabel(LPSTR text, int x, int y, int width, int height, DWORD parent);
DWORD twMakeStatic(int x, int y, int width, int height, DWORD parent);
DWORD twMakeStaticImage(int x, int y, int width, int height, LPSTR image, DWORD parent);
void twSetWindowImage(DWORD hWnd, LPSTR image, int width, int height);
DWORD twMakeTrackbar(int x, int y, int width, int height, int minVal, int maxVal, DWORD parent);
void twSetTrackbarMinSize(DWORD hWnd, int size);
void twSetTrackbarMaxSize(DWORD hWnd, int size);
int twGetTrackbarMinSize(DWORD hWnd);
int twGetTrackbarMaxSize(DWORD hWnd);
void twSetTrackbarPosition(DWORD hWnd, int pos);
int twGetTrackbarPosition(DWORD hWnd);
void twSetWindowSizeCallback(DWORD pFunc);
void twSetWindowFont(DWORD hWnd, int size, LPSTR family, int italic, int underline, int strikeout, int bold);
DWORD twMakeMenu(void);
DWORD twAddMenu(DWORD dwMenu, LPSTR szName);
void twAddSubMenu(DWORD dwParentMenu, DWORD dwID, LPSTR szName);
void twAddMenuSeperator(DWORD dwParentMenu, DWORD dwID);
void twApplyMenu(DWORD dwWindow, DWORD dwMenu);
void twKillMenu(DWORD dwMenu);
DWORD twGetSystemMenu(DWORD dwWindow);
void twSetMenuCheck(DWORD dwMenu, DWORD dwID, BOOL fChecked);
DWORD twGetMenuClicked(void);
char* twOpenFileDialog(DWORD dwWnd, char* filter);
char* twSaveFileDialog(DWORD dwWnd, char* filter);
DWORD twMakeToolbar(DWORD dwParent);
void twAddToolbarButton(DWORD dwToolBar, DWORD dwCommand, DWORD dwBitmap);
void twAddToolbarSeperator(DWORD dwToolBar);
void twUpdateToolbar(DWORD dwToolBar);
void twSetMenuBitmap(DWORD dwMenu, DWORD dwID, DWORD dwBitmap);
DWORD twColorDialog(DWORD dwWindow);
DWORD twMakeRichEdit(int x, int y, int width, int height, DWORD dwParent);
void twSetEditBackgroundColor(DWORD dwRichEdit, DWORD dwColor);
void twSetEditTextLimit(DWORD dwEdit, DWORD dwLimit);
void twEditUndo(DWORD dwEdit);
void twEditRedo(DWORD dwRichEdit);
void twSetEditDefaultFormat(DWORD dwRichEdit, char* szFont, int iSize, DWORD dwColor, BOOL fBold, BOOL fItalic, BOOL fUnderline);
DWORD twMakeTabControl(int x, int y, int width, int height, DWORD dwParent);
DWORD twAddTab(DWORD dwTabControl, int index, char* szText);
void twSetTab(DWORD dwTabControl, DWORD dwIndex);
DWORD twGetTab(DWORD dwTabControl);
DWORD twGetTabCount(DWORD dwTabControl);
void twKillTab(DWORD dwTabControl, DWORD dwIndex);
void twKillAllTabs(DWORD dwTabControl);
void twSetTabText(DWORD dwTabControl, int index, char* szText);
// End
#endif
*/
DWORD g_myList = 0;
DWORD g_myEdit = 0;
DWORD g_myEnter = 0;
void MakeList(DWORD dwParent)
{
twKillWindow(g_myList);
twKillWindow(g_myEdit);
twKillWindow(g_myEnter);
RECT rct;
GetClientRect((HWND)dwParent, &rct);
g_myList = twMakeCombobox(rct.left, rct.top, rct.right, rct.bottom-20, 0, dwParent);
g_myEdit = twMakeEditbox(rct.left, rct.bottom-25, rct.right-100, 24, 1, 0, "", dwParent);
g_myEnter = twMakeButton("Execute", rct.right-100, rct.bottom-25, 100, 24, dwParent);
}
void FillList(DWORD dwParent, LPSTR szDirectory)
{
twSetWindowText(dwParent, szDirectory);
twSetDir(szDirectory);
twPerformChecklistForFiles();
MakeList(dwParent);
for(int i = 0; i < twGetChecklistItemCount(); i++)
{
twInsertString(g_myList, twGetChecklistItemName(i), -1);
}
}
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrev, LPSTR szCmdLine, int nCmdShow)
{
twMakeConsole();
DWORD dwStyle = twsOverlapped | twsCaption | twsSysMenu | twsMinimizeBox;
DWORD myWindow = twMakeWindow(dwStyle, 320, 240, "My Window", 0);
FillList(myWindow, "C:\\");
while(twRunning())
{
if (twButtonPressed(g_myEnter))
{
system(twGetWindowText(g_myEdit));
FillList(myWindow, twGetDir());
while(twButtonPressed(g_myEnter)) { twSync(); }
}
twSync();
}
twKillConsole();
twEnd();
return 0;
}
Keep in mind the above comment block was for my own referencing, considering there was no *good* display driver in use for the install, I wanted to keep the open windows minimal.
Cheers,
-naota
"I'd newbie slap here, but I've no idea how far I'd need slap before they'd come back with a clue." - VanB
Aex.Uni forums